Subject: toolchain/35657: gdb+threads problems on -current
To: None <toolchain-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <mm_lists@pulsar-zone.net>
List: netbsd-bugs
Date: 02/17/2007 09:25:00
>Number:         35657
>Category:       toolchain
>Synopsis:       gdb+threads problems on -current
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 17 09:25:00 +0000 2007
>Originator:     Matthew Mondor
>Release:        -current
>Organization:
Pulsar-Zone
>Environment:
NetBSD sat.xisop 4.99.10 NetBSD 4.99.10 (GENERIC_LAPTOP_MM) #2: Fri Feb 16 15:54:04 EST 2007  mmondor@sat.xisop:/usr/src/sys/arch/i386/compile/GENERIC_LAPTOP_MM i386
>Description:
After compiling a little test program using threads, where a main
thread launches two crunching children threads and then waits for
them to complete (I tried both linking against -lpthread and
-lpthread -lpthread_dbg).

gdb ./test
> run
<ctrl-c>

Then I notice that "info threads" doesn't provide any output,
although there are three LWPs.  And of course "thread <n>"
doesn't work except with 0.  This works on 3.1.

Then I tell gdb to exit, confirming that I really want to exit
when it says that the program is still running.  Then the process
becomes stuck with two LWPs remaining lwpwait wchan and cannot be
killed anymore, it's stuck until next reboot.

gdb is also stuck but can be killed with SIGKILL.
>How-To-Repeat:

>Fix: