> >> 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
But gdb on NetBSD don't support threads.


nick_vm: {10} gdb parrot 226
GNU gdb 5.0nb1
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386--netbsdelf"...
/usr/home/nick/parrotcode/parrot/226: No such file or directory.
Attaching to program: /usr/home/nick/parrotcode/parrot/parrot, process 226
Reading symbols from /usr/libexec/ld.elf_so...done.
Loaded symbols for /usr/libexec/ld.elf_so
Reading symbols from /usr/lib/libm387.so.0...done.
Loaded symbols for /usr/lib/libm387.so.0
Reading symbols from /usr/lib/libm.so.0...done.
Loaded symbols for /usr/lib/libm.so.0
Reading symbols from /usr/lib/libcrypt.so.0...done.
Loaded symbols for /usr/lib/libcrypt.so.0
Reading symbols from /usr/pkg/lib/libpthread.so.20...done.
Loaded symbols for /usr/pkg/lib/libpthread.so.20
Reading symbols from /usr/lib/libc.so.12...done.
Loaded symbols for /usr/lib/libc.so.12
0x48281d6f in select () from /usr/lib/libc.so.12
(gdb) thread 1
Thread ID 1 not known.  Use the "info threads" command to
see the IDs of currently known threads.
(gdb) bac
#0  0x48281d6f in select () from /usr/lib/libc.so.12
#1  0x4823996c in __pth_sc_select () from /usr/pkg/lib/libpthread.so.20
#2  0x48232c77 in __pth_sched_eventmanager ()
   from /usr/pkg/lib/libpthread.so.20
#3  0x48232277 in __pth_scheduler () from /usr/pkg/lib/libpthread.so.20
#4  0x48233e64 in pth_spawn_trampoline () from /usr/pkg/lib/libpthread.so.20
#5  0x482313ad in pth_mctx_set_bootstrap () from
/usr/pkg/lib/libpthread.so.20
#6  0x48231321 in pth_mctx_set_trampoline () from
/usr/pkg/lib/libpthread.so.20
#7  0x8272fa0 in ?? ()
#8  0x1f in ?? ()
Error accessing memory address 0x1f: Invalid argument.
(gdb) thread 2
Thread ID 2 not known.  Use the "info threads" command to
see the IDs of currently known threads.
(gdb) info threads
(gdb)

>
> > 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.

Another question.
Do enable link with PTH into config/init/hints/netbsd.pl for NetBSD 1.x
always or only in the presence PTH, or to build without threads  by default?

Nick.


Reply via email to