threads branch status update

Stefan Seifert nine at detonation.org
Mon Apr 23 12:12:34 UTC 2012


On Monday 23 April 2012 07:50:41 you wrote:

> In this test, the main thread is stuck waiting in the pause() command in
> Parrot_cx_outer_runloop(PARROT_INTERP).  alarm_count = 1.

Ah, could be the same thing that hit me this weekend. There's a comment in 
parrotinterpreter.pmc predicting exactly this situation but for some unknown 
reason it never hit me till now. As so often with threads it may just me a 
timing problem. Could you try the attached patch if it fixes the test for you?

> Each of the 4 worker threads is stuck in an infinte loop here in
> threads.c:
> 
> Here's the function.  The call to VTABLE_get_integer(interp, scheduler)
> always returns 0.  The next statement,
>         alarm_count = VTABLE_get_integer(interp, sched->alarms);
> also returns 0, and the process repeats indefinitely.

I should just leave out the if (alarm_count > 0). If a child thread has no 
active tasks, it should simply wait for new ones. But as it is, it's harmless 
except for uselessly burning CPU.

> I didn't have time to investigate all the other failures; I figure I
> should start with the simplest one first.  If there's a simpler test
> to look at, I could do so, but since this is my first foray into
> debugging threads on Solaris, and since it's also my first foray into
> threads on Parrot, it takes a long time to make any progress.

Was the same for me :) But let's fix the simple ones, maybe the others will 
disappear as well.

Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: interrupt_pause.diff
Type: text/x-patch
Size: 991 bytes
Desc: not available
URL: <http://lists.parrot.org/pipermail/parrot-dev/attachments/20120423/6793aecc/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.parrot.org/pipermail/parrot-dev/attachments/20120423/6793aecc/attachment.asc>


More information about the parrot-dev mailing list