<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
  <meta name="Generator" content="Zarafa WebApp v7.1.5-41923">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>RE: [Mono-dev] NancyFX self hosting (HttpListener) locking up on linux</title>
</head>
<body>
<pre wrap="" style="white-space: pre-wrap; word-wrap: break-word;">Nikita: Have you filed a bug for this yet? If so please give me the bug number so I can follow it.</pre><pre wrap="" style="white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;">-----Original message-----<br>> From:&quot;Andrés G. Aragoneses&quot; <<a href="mailto:knocte@gmail.com">knocte@gmail.com</a>><br>> Sent: Wednesday 7th August 2013 13:15<br>> To: <a href="mailto:mono-devel-list@lists.ximian.com">mono-devel-list@lists.ximian.com</a><br>> Subject: Re: [Mono-dev] NancyFX self hosting (HttpListener) locking up on linux<br>> <br>> If you're able to reproduce it with 3.3 and not with 2.10.x, you should <br>> definitely open a bug report for it in <a href="http://bugzilla.xamarin.com" target="_blank">http://bugzilla.xamarin.com</a>/ <br>> stating "[regression]" in the bug summary.<br>> <br>> Also, I would open a separate bug report for the segfault you're getting <br>> when running with MONO_DISABLE_AIO (pasting the backtrace of the <br>> segfault, with debug symbols installed).<br>> <br>> On 07/08/13 14:02, Alfred Hall wrote:<br>> > Tried running it with sgen or boehm on 2.10? Worth trying both I think.<br>> > Also how about 3.3 (master) ?<br>> ><br>> >     -----Original message-----<br>> >     *From:* Nikita Tsukanov <<a href="mailto:keks9n@gmail.com">keks9n@gmail.com</a>><br>> >     *Sent:* Wednesday 7th August 2013 12:54<br>> >     *To:* <a href="mailto:mono-devel-list@lists.ximian.com">mono-devel-list@lists.ximian.com</a><br>> >     *Subject:* Re: [Mono-dev] NancyFX self hosting (HttpListener)<br>> >     locking up on linux<br>> ><br>> >     I've rewritten my SCGI server to work with TPL directly instead of<br>> >     using async/await to make it run on mono 2.10. Then I've tried to<br>> >     run it with mono 2.10.8.1 and mono 3.2 with System.Net.Sockets<br>> >     backend and to hammer it with jmeter. 500K requests without any<br>> >     lockups on Mono 2.10, lockup at 22164th request on mono 3.2.<br>> ><br>> >     Server source code is still on GitHub -<br>> >     <a href="https://github.com/kekekeks/scgi-sharp" target="_blank">https://github.com/kekekeks/scgi-sharp</a><br>> ><br>> ><br>> >     2013/8/7 Greg Young <<a href="mailto:gregoryyoung1@gmail.com">gregoryyoung1@gmail.com</a><br>> >     <mailto:<a href="mailto:gregoryyoung1@gmail.com">gregoryyoung1@gmail.com</a>>><br>> ><br>> >         I believe attaching a debugger changes things like optimizations<br>> >         from occurring (not positive but it does in clr)<br>> ><br>> ><br>> >         On Wednesday, August 7, 2013, Nikita Tsukanov wrote:<br>> ><br>> >             Huh, it doesn't require debugger to be <span style="text-decoration: underline">_attched_</span>, just<br>> >             debugging subsystem initialized i. e. if I launch this<br>> >             program as a "debugger" it doesn't lock up.<br>> ><br>> >             publicstaticvoidMain(string[]args)<br>> >             {<br>> >             intport=27042;<br>> >             if(args.Length !=0)<br>> >             port=int.Parse(args[0]);<br>> >             while(true)<br>> >             {<br>> >             varvm= Mono.Debugger.Soft.VirtualMachineManager.Listen(newIPEndPoint(IPAddress.Loopback,port));<br>> >             vm.Resume();<br>> >             vm.Detach();<br>> >             }<br>> >             }<br>> ><br>> >             I'll use running with<br>> >             --debugger-agent=transport=dt_socket,address=127.0.0.1:27042<br>> >             <http://127.0.0.1:27042> as a temporary workaround since<br>> >             performance doesn't degrade a lot.<br>> ><br>> ><br>> >             2013/8/7 Nikita Tsukanov <<a href="mailto:keks9n@gmail.com">keks9n@gmail.com</a>><br>> ><br>> >                 I suspect that the problem is actually with thread pool<br>> >                 itself. I've created socket layer implementation using<br>> >                 libevent (wrapped with Oars) and send/recv that utilizes<br>> >                 thread pool for cases when it's unable to complete<br>> >                 operation synchronously. It survives longer, but still<br>> >                 locks up after a while. Same behavior with debugger -<br>> >                 I'm unable to reproduce the issue when running under it.<br>> >                 I also unable to grab thread stack traces, it prints<br>> >                 "Full thread dump: " and nothing else.<br>> ><br>> ><br>> >                 2013/8/7 Greg Young <<a href="mailto:gregoryyoung1@gmail.com">gregoryyoung1@gmail.com</a>><br>> ><br>> >                     We will see your test then as it will probably<br>> >                     affect us as well<br>> ><br>> ><br>> >                     On Tuesday, August 6, 2013, Nikita Tsukanov wrote:<br>> ><br>> >                         Greg, I've tried running my server with mono<br>> >                         compiled from master (with pull request #703<br>> >                         merged in), still freezes after a while.<br>> ><br>> ><br>> >                         2013/8/7 Greg Young <<a href="mailto:gregoryyoung1@gmail.com">gregoryyoung1@gmail.com</a>><br>> ><br>> >                             Do you have our pull req? We are stable<br>> >                             after (and seriously read history of this list)<br>> ><br>> ><br>> >                             On Tuesday, August 6, 2013, Nikita Tsukanov<br>> >                             wrote:<br>> ><br>> >                                 <a href="https://github.com/kekekeks/scgi-sharp" target="_blank">https://github.com/kekekeks/scgi-sharp</a> -<br>> >                                 here is my SCGI server with host for<br>> >                                 NancyFx. If you run Sandbox.exe with<br>> >                                 --echo-server it will not use nancy<br>> >                                 infrastructure and will respond<br>> >                                 directly. It locks up after several<br>> >                                 thousands of requests under jmeter.<br>> ><br>> >                                 Simple nginx configuration:<br>> ><br>> >                                 location /<br>> >                                 {<br>> >                                     include /etc/nginx/scgi_params;<br>> >                                     scgi_pass 127.0.0.1:10081<br>> >                                 <http://127.0.0.1:10081>;<br>> >                                 }<br>> ><br>> >                                 Now I'm looking for alternative socket<br>> >                                 library to use it as a replacement for<br>> >                                 System.Net.Sockets.<br>> ><br>> ><br>> >                                 2013/8/6 Greg Young<br>> >                                 <<a href="mailto:gregoryyoung1@gmail.com">gregoryyoung1@gmail.com</a>><br>> ><br>> >                                     Actually not that surprised we also<br>> >                                     found out file stream.flush(true)<br>> >                                     only works sometimes and ms never<br>> >                                     back supported it to actually work :)<br>> ><br>> ><br>> >                                     On Tuesday, August 6, 2013, Alfred<br>> >                                     Hall wrote:<br>> ><br>> >                                         __<br>> >                                         Yeah you're having exactly the<br>> >                                         same issues as I am. I'm<br>> >                                         surprised others haven't had<br>> >                                         this problem before. Not sure<br>> >                                         who works on this area of the<br>> >                                         mono codebase these days. If you<br>> >                                         got a minimal test case it may<br>> >                                         be worth us raising a Xamarin<br>> >                                         bug in bugzilla.<br>> ><br>> >                                             -----Original message-----<br>> >                                             *From:* Nikita<br>> >                                             Tsukanov <<a href="mailto:keks9n@gmail.com">keks9n@gmail.com</a>><br>> >                                             *Sent:* Tuesday 6th August<br>> >                                             2013 20:18<br>> >                                             *To:*<br>> >                                             <a href="mailto:mono-devel-list@lists.ximian.com">mono-devel-list@lists.ximian.com</a><br>> >                                             *Subject:* Re: [Mono-dev]<br>> >                                             NancyFX self hosting<br>> >                                             (HttpListener) locking up on<br>> >                                             linux<br>> ><br>> >                                             Running with mono from<br>> >                                             master haven't helped.<br>> ><br>> >                                             And I'm not sure what the<br>> >                                             hell is going on, but I<br>> >                                             cann't reproduce the issue<br>> >                                             when running under...<br>> >                                             Monodevelop's debugger. It<br>> >                                             runs perfectly under it, but<br>> >                                             when I try to run the same<br>> >                                             binary from console (even<br>> >                                             with --debug option) it<br>> >                                             locks up or segfaults. Does<br>> >                                             anyone know what does it mean?<br>> ><br>> ><br>> >                                             2013/8/6 Nikita Tsukanov<br>> >                                             <<a href="mailto:keks9n@gmail.com">keks9n@gmail.com</a>><br>> ><br>> >                                                 Great. It locked up with<br>> >                                                 my more complex logic.<br>> >                                                 Funny fact: NancyFx<br>> >                                                 increases request<br>> >                                                 processing time from 2ms<br>> >                                                 to 70ms with the same<br>> >                                                 echo response.<br>> >                                                 Another funny fact: with<br>> >                                                 MONO_DISABLE_AIO I've<br>> >                                                 got segfault.<br>> ><br>> >                                                 Now I'll try to use<br>> >                                                 build patched mono. Not<br>> >                                                 sure that it's the same<br>> >                                                 issue, because in my<br>> >                                                 case it never tries to<br>> >                                                 read and write simultane<br>> ><br>> ><br>> ><br>> >         --<br>> >         Le doute n'est pas une condition agréable, mais la certitude est<br>> >         absurde.<br>> ><br>> ><br>> >     _______________________________________________<br>> ><br>> >     Mono-devel-list mailing list<br>> ><br>> >     <a href="mailto:Mono-devel-list@lists.ximian.com">Mono-devel-list@lists.ximian.com</a><br>> ><br>> >     <a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-devel-list</a><br>> ><br>> ><br>> ><br>> > _______________________________________________<br>> > Mono-devel-list mailing list<br>> > <a href="mailto:Mono-devel-list@lists.ximian.com">Mono-devel-list@lists.ximian.com</a><br>> > <a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-devel-list</a><br>> ><br>> <br>> <br>> _______________________________________________<br>> Mono-devel-list mailing list<br>> <a href="mailto:Mono-devel-list@lists.ximian.com">Mono-devel-list@lists.ximian.com</a><br>> <a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-devel-list</a><br>> <br>> </pre>
</body>
</html>