<div dir="ltr">Hi Kazu,<div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 3, 2013 at 2:52 PM, Kazu Yamamoto <span dir="ltr">&lt;<a href="mailto:kazu@iij.ad.jp" target="_blank">kazu@iij.ad.jp</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
As I said before, I started running HTTP server using Mio in the real<br>
world. Unfortunately, the daemon is not stable.<br>
<br>
After one day or so, the server cannot accept any HTTP requests.  No<br>
error messages from the server.<br>
<br>
The server is alive. To terminate the server (running in a &quot;screen&quot;<br>
terminal), single Ctrl-c is not enough. Typing Ctrl-c again terminates<br>
the server.<br></blockquote><div><br></div><div>Could you run an strace on the process in this state so we can get an idea what it&#39;s doing?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


After several tests, I&#39;m getting convinced that this occurs only when<br>
+RTS -N&lt;x&gt; is specified (where &lt;x&gt; &gt;= 2). The server runs well if +RTS<br>
-N&lt;x&gt; is not specified.<br></blockquote><div><br></div><div>That indicates that the problem is with the threaded RTS and perhaps with the IO manager.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

My question: if the program complied with GHC needs double Ctrl-c to<br>
terminate, what is the situation of the program?<br></blockquote><div><br></div><div>If Ctrl+C generates an exception (does it?) there could be an overzealous exception catcher somewhere that catches all exceptions, including your Ctrl+C.</div>

<div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
P.S.<br>
<br>
It seems to me that the server also is leaking space. The server is<br>
getting fatter gradually.</blockquote><div><br></div><div>Could you use the profiler to see what type of objects are leaking?</div><div> </div></div></div></div>