This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug threads/10757] New: GDB does not attach all threads of a multithreaded process => inferior gets SIGTRAP
- From: "ppluzhnikov at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 11 Oct 2009 17:19:08 -0000
- Subject: [Bug threads/10757] New: GDB does not attach all threads of a multithreaded process => inferior gets SIGTRAP
- Reply-to: sourceware-bugzilla at sourceware dot org
Possibly related to PR8963.
This was originally reported with gdbserver across a relatively high-latency
connection: attach remote process, set breakpoints, continue:
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
The program no longer exists.
Reproduces with attached test case on Fedora 11 with both
GNU gdb (GDB) Fedora (6.8.50.20090302-38.fc11)
GNU gdb (GDB) 7.0.50.20091011-cvs
$ ulimit -s 32
$ ./a.out 20 &
[2] 16717
$ ~/gdb-cvs/build/gdb/gdb --pid $(pgrep a.out)
GNU gdb (GDB) 7.0.50.20091011-cvs
...
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Attaching to process 16717
Reading symbols from /home/paul/tmp/a.out...done.
Reading symbols from /lib/libpthread.so.0...Reading symbols from
/usr/lib/debug/lib/libpthread-2.10.1.so.debug...done.
[Thread debugging using libthread_db enabled]
[New Thread 0xb7f3eb70 (LWP 5139)]
(no debugging symbols found)...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libc.so.6...Reading symbols from
/usr/lib/debug/lib/libc-2.10.1.so.debug...done.
(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...Reading symbols from
/usr/lib/debug/lib/ld-2.10.1.so.debug...done.
(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
0x001ef424 in __kernel_vsyscall ()
(gdb) b foo
Breakpoint 1 at 0x80485c7: file manythreads2.c, line 10.
(gdb) commands 1
>c
>end
(gdb) c
[Thread 0xb7f3eb70 (LWP 5139) exited]
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
The program no longer exists.
(gdb) quit
[2]+ Trace/breakpoint trap (core dumped) ./a.out 20
It appears that to trigger the bug, I need a program which rapidly creates
threads while gdb/gdbserver is attaching.
The same program works fine when started from within GDB. Race in attach?
--
Summary: GDB does not attach all threads of a multithreaded
process => inferior gets SIGTRAP
Product: gdb
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: threads
AssignedTo: unassigned at sourceware dot org
ReportedBy: ppluzhnikov at google dot com
CC: gdb-prs at sourceware dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://sourceware.org/bugzilla/show_bug.cgi?id=10757
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.