<br><br><div class="gmail_quote">On Mon, Jan 4, 2010 at 7:11 AM, Nathan Gray <span dir="ltr">&lt;<a href="mailto:kolibrie@graystudios.org">kolibrie@graystudios.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Wed, Dec 30, 2009 at 04:55:37PM +0100, Petr Rockai wrote:<br>
&gt; Nathan Gray &lt;<a href="mailto:kolibrie@graystudios.org">kolibrie@graystudios.org</a>&gt; writes:<br>
&gt; &gt; In another terminal I investigated a little bit.  It looks like<br>
&gt; &gt; &#39;darcs unpull&#39; is hanging:<br>
&gt; &gt;<br>
&gt; &gt;   $ date<br>
&gt; &gt;   Tue Dec 29 16:29:33 EST 2009<br>
&gt; &gt;<br>
&gt; &gt;   $ ps ax|grep darcs<br>
&gt; &gt;   5311 pts/0    S+     0:17 darcs-benchmark /home/kolibrie/bin/darcs-2.3.1 /home/kolibrie/bin/darcs<br>
&gt; &gt;   6136 pts/0    Sl+    0:21 /home/kolibrie/bin/darcs-2.3.1 unpull --last 1000 --all +RTS -sdarcs-stats -RTS<br>
&gt; &gt;<br>
&gt; &gt;   $ uptime<br>
&gt; &gt;   16:29:31 up  1:05,  3 users,  load average: 0.10, 0.32, 0.47<br>
&gt;<br>
&gt; I have seen this happen (actually, it happens on buildbot as well, and<br>
&gt; it doesn&#39;t happen on my laptop...), too. The question is what&#39;s going<br>
&gt; wrong... On the buildbot, I haven&#39;t noticed any hanging darcs<br>
&gt; processes. I am starting to suspect, that darcs is waiting for some user<br>
&gt; input in that case. It could be the &quot;this will make unrevert impossible&quot;<br>
&gt; one, but I don&#39;t see anything in the benchmark code that could produce<br>
&gt; one and there is none in the tarballs. Also, it should be reproducible<br>
&gt; that way.<br>
&gt;<br>
&gt; &gt; Any ideas what I should do, besides kill it?<br>
&gt;<br>
&gt; If you could find out what that hanging darcs process is doing (strace<br>
&gt; -p is your friend), that&#39;d be great. Also, running that command manually<br>
&gt; could help to find out: go to _playground/repo and run darcs-2.3.1<br>
&gt; unpull --last 1000 --all.<br>
<br>
</div>Strace repeats the same output forever for the &#39;unpull&#39; process:<br>
<br>
  $ strace -p 6136<br>
  Process 6136 attached - interrupt to quit<br>
  futex(0x91bcbc0, FUTEX_WAIT_PRIVATE, 7, NULL) = ? ERESTARTSYS (To be restarted)<br>
  --- SIGVTALRM (Virtual timer expired) @ 0 (0) ---<br>
  sigreturn()                             = ? (mask now [INT])<br>
  futex(0x91bcbc0, FUTEX_WAIT_PRIVATE, 7, NULL) = ? ERESTARTSYS (To be restarted)<br>
  --- SIGVTALRM (Virtual timer expired) @ 0 (0) ---<br>
  sigreturn()                             = ? (mask now [INT])<br>
  ...<br>
<br>
Strace on the &#39;darcs-benchmark&#39; process has much less output, but<br>
appears to repeat as well:<br>
<br>
  $ strace -p 5311<br>
  Process 5311 attached - interrupt to quit<br>
  select(10, [9], [], NULL, {9, 508000})  = 0 (Timeout)<br>
  gettimeofday({1262616419, 519725}, NULL) = 0<br>
  select(10, [9], [], NULL, {134, 217727}) = 0 (Timeout)<br>
  gettimeofday({1262616553, 739716}, NULL) = 0<br>
  select(10, [9], [], NULL, {134, 217727}...<br></blockquote><div><br>My vague understanding of the GHC runtime system is that it uses select to poll for IO.  This allows the RTS to have very cheap threads for Haskell code. I expect it should be fine if the RTS keeps polling for IO.  So I think the above &quot;forever&quot;-ness is ignorable.<br>
<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Any guidance what I should do?<br></blockquote><div><br>I&#39;m not sure what to do about it either.  Hopefully someone else will chime in.<br><br>Jason<br></div></div><br>