<br><br><div class="gmail_quote">On Mon, Jan 4, 2010 at 7:11 AM, Nathan Gray <span dir="ltr"><<a href="mailto:kolibrie@graystudios.org">kolibrie@graystudios.org</a>></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>
> Nathan Gray <<a href="mailto:kolibrie@graystudios.org">kolibrie@graystudios.org</a>> writes:<br>
> > In another terminal I investigated a little bit. It looks like<br>
> > 'darcs unpull' is hanging:<br>
> ><br>
> > $ date<br>
> > Tue Dec 29 16:29:33 EST 2009<br>
> ><br>
> > $ ps ax|grep darcs<br>
> > 5311 pts/0 S+ 0:17 darcs-benchmark /home/kolibrie/bin/darcs-2.3.1 /home/kolibrie/bin/darcs<br>
> > 6136 pts/0 Sl+ 0:21 /home/kolibrie/bin/darcs-2.3.1 unpull --last 1000 --all +RTS -sdarcs-stats -RTS<br>
> ><br>
> > $ uptime<br>
> > 16:29:31 up 1:05, 3 users, load average: 0.10, 0.32, 0.47<br>
><br>
> I have seen this happen (actually, it happens on buildbot as well, and<br>
> it doesn't happen on my laptop...), too. The question is what's going<br>
> wrong... On the buildbot, I haven't noticed any hanging darcs<br>
> processes. I am starting to suspect, that darcs is waiting for some user<br>
> input in that case. It could be the "this will make unrevert impossible"<br>
> one, but I don't see anything in the benchmark code that could produce<br>
> one and there is none in the tarballs. Also, it should be reproducible<br>
> that way.<br>
><br>
> > Any ideas what I should do, besides kill it?<br>
><br>
> If you could find out what that hanging darcs process is doing (strace<br>
> -p is your friend), that'd be great. Also, running that command manually<br>
> could help to find out: go to _playground/repo and run darcs-2.3.1<br>
> unpull --last 1000 --all.<br>
<br>
</div>Strace repeats the same output forever for the 'unpull' 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 'darcs-benchmark' 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 "forever"-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'm not sure what to do about it either. Hopefully someone else will chime in.<br><br>Jason<br></div></div><br>