[Mono-dev] NancyFX self hosting (HttpListener) locking up on linux

Alfred Hall ahall at ahall.org
Wed Aug 14 15:30:33 UTC 2013


So far so good, done few tests and no lockups.
-----Original message-----
From: Nikita Tsukanov <keks9n at gmail.com>
Sent: Wednesday 14th August 2013 15:04
To: mono-devel-list at lists.ximian.com
Subject: Re: [Mono-dev] NancyFX self hosting (HttpListener) locking up on linux


Should be fixed with https://github.com/mono/mono/commit/a31b580fdcbaa9a8a16d59ffb12d04f5872f54e8

Please, try to compile a fresh version of mono and check if the issue is still present.


2013/8/13 Nikita Tsukanov <keks9n at gmail.com <mailto:keks9n at gmail.com> >
I've filled a bug report: https://bugzilla.xamarin.com/show_bug.cgi?id=13933 (also increased thread count from 2 to 10 to make it easier to reproduce the issue).


2013/8/12 Nikita Tsukanov <keks9n at gmail.com <mailto:keks9n at gmail.com> >

Oh, great. I've got lockup and segfault (on different runs) with this code:
                static INancyEngine _engine;

                public static void Main(string[] args)
                {
                        var pool = new SmartThreadPool ();


                        var bt = new DefaultNancyBootstrapper ();
                        bt.Initialise ();
                        _engine = bt.GetEngine ();
                        for (int c=0; c<2; c++)
                                new Thread (ThreadProc).Start ();
                        Thread.Sleep (-1);
                }

                static void ThreadProc ()
                {
                        int crid = 0;
                        while (true) {
                                crid ++;
                                var resp = _engine.HandleRequest (

                                        new Request ("GET", "/",
                                             new Dictionary<string, IEnumerable<string>> (),
                                             RequestStream.FromStream (new MemoryStream (), 0, 0), "http", "", "127.0.0.1"));
                                resp.Response.Contents (new MemoryStream ());
                                Console.WriteLine ("Request #{0} done", crid);
                        }
                }  

It just uses nancyfx engine from 2 threads.



_______________________________________________

Mono-devel-list mailing list

Mono-devel-list at lists.ximian.com

http://lists.ximian.com/mailman/listinfo/mono-devel-list



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20130814/962124e6/attachment-0001.html>


More information about the Mono-devel-list mailing list