This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
BUG: GDB >=6 vfork from pthread fails with 2.6 vanilla kernels
- From: "Jonathan A. George" <JAGeorge at greshamstorage dot com>
- To: gdb at sources dot redhat dot com
- Date: Fri, 14 May 2004 10:12:42 -0500
- Subject: BUG: GDB >=6 vfork from pthread fails with 2.6 vanilla kernels
- Reply-to: JAGeorge at greshamstorage dot com
BUG: GDB >=6 vfork from pthread fails with 2.6 vanilla kernels
Very simple to duplicate:
Run popen() from within a pthread_create() thread while sleeping in the
base process.
(NOTE: works perfectly outside of GDB and under GDB with 2.4 kernel
pthreads)
Environment:
Any 2.6 series kernel (tested 2.6.0 - 2.6.6 vanilla kernel.org)
Any GDB (tested 6.0 - current CVS)
Any GCC linked with -lpthread (tested 3.0.4 - 3.3.3)
GDB output from test program:
Detaching after fork from child process 7020.
warning: Unexpected waitpid result 00117f when waiting for vfork-done
linux-nat.c:450: internal-error: unknown ptrace event 5
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)
Observations:
It seems as if GDB in linux-nat.c is trying to associate the vfork()d
popen()d process with the root process instead of the parenting thread
started by the root process.