Nick Kostirya <[EMAIL PROTECTED]> wrote:
>> > I have built Parrot on NetBSD with GNU Portable Threads.
>> > All (except SKIP) threads.t tests is successful,
>> > BUT "interp identity" and "thread - kill".
>>
>> > Test "interp identity" sleep perpetual after printing ok1 and ok2.
>>
>> Strange. Actually no PASM thread is started here.

> And why GDB show 2 call of pthread_create function and 1 call of
> pthread_join on Linux?

There are two internal threads running, one handling events, the second
does select and catches signals. That might be the problem with PTH.

>> Could you attach a debugger and look, where it hangs?

> nick_vm: {93} gdb ./parrot

Please try this:

$ parrot hangs.pasm

[ second console ]
$ ps axw | grep [p]arrot
$ gdb parrot <the_pid>
gdb> thread 1
gdb> bac
gdb> thread 2
...

> Probably select have been called without timeout.

Yes that's true. But the event thread wakes up the io_thread (s.
stop_io_thread). This seems to fail with PTH as it doesn't preempt.

Looking at the code, this seems to happen, when a thread is created and
never started. The main interpreter tries to join that thread
nethertheless. I've set another flag which should cure this flaw.

> Nick.

leo

Reply via email to