This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb/458: When GNU/Linux pthreads program calls execv, gdb refuses to exit, must be killed



>Number:         458
>Category:       gdb
>Synopsis:       When GNU/Linux pthreads program calls execv, gdb refuses to exit, must be killed
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 04 10:48:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     patdoyle@ca.ibm.com
>Release:        GNU gdb 20020225
>Organization:
>Environment:
Linux 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 2001 i686 unknown
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
This GDB was configured as "i686-pc-linux-gnu".
>Description:
When I compile the attached program using the makefile below, then debug it as shown below, gdb reports "thread for LWP 10778: generic error".  It then needs to be killed.

Here is the debug session:

$ gdb re-exec
GNU gdb 20020225
Copyright 2002 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 "i686-pc-linux-gnu"...
(gdb) run foo
Starting program: /home/patdoyle/debug/re-exec foo
[New Thread 1024 (LWP 11209)]
Cannot find user-level thread for LWP 11209: generic error
(gdb) quit
The program is running.  Exit anyway? (y or n) y
Cannot find thread 1024: generic error
(gdb) kill
Kill the program being debugged? (y or n) y
Cannot find thread 1024: generic error
(gdb)
[1]+  Stopped                 gdb re-exec
$ kill %

[1]+  Stopped                 gdb re-exec
$
[1]+  Terminated              gdb re-exec
$

Here is the makefile:

re-exec: re-exec.c
        $(CC) -Wall -g $^ -o $@ -lpthread
>How-To-Repeat:
Compile the program, link with pthreads, and run from gdb with some command line argument.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]