public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug threads/9635] Cannot find new threads: generic error
       [not found] <bug-9635-4717@http.sourceware.org/bugzilla/>
@ 2011-05-27  5:27 ` john.carter at tait dot co.nz
  2011-05-27  5:35 ` john.carter at tait dot co.nz
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: john.carter at tait dot co.nz @ 2011-05-27  5:27 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=9635

--- Comment #2 from John Carter <john.carter at tait dot co.nz> 2011-05-27 05:26:52 UTC ---
Created attachment 5756
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5756
Very short file that "kills gdb".

To compile and demonstrate the bug...
   gcc -O0 -g -pthread -o kill_gdb kill_gdb.c
/usr/bin/gdb ./kill_gdb 
GNU gdb (GDB) 7.2-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /btrfs/johnc/tmp/kill_gdb...done.
(gdb) start
Temporary breakpoint 1 at 0x8048367: file kill_gdb.c, line 7.
Starting program: /btrfs/johnc/tmp/kill_gdb 
[Thread debugging using libthread_db enabled]
Cannot find new threads: generic error
(gdb)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug threads/9635] Cannot find new threads: generic error
       [not found] <bug-9635-4717@http.sourceware.org/bugzilla/>
  2011-05-27  5:27 ` [Bug threads/9635] Cannot find new threads: generic error john.carter at tait dot co.nz
@ 2011-05-27  5:35 ` john.carter at tait dot co.nz
  2011-05-27 10:46 ` pedro at codesourcery dot com
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: john.carter at tait dot co.nz @ 2011-05-27  5:35 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=9635

John Carter <john.carter at tait dot co.nz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |john.carter at tait dot
                   |                            |co.nz
            Version|6.8                         |7.2
           Severity|enhancement                 |normal

--- Comment #3 from John Carter <john.carter at tait dot co.nz> 2011-05-27 05:34:33 UTC ---
If file being debugged uses libpthread AND has an external symbol "stack_used"
gdb dies before the debugged program enters "main" with the message...
[Thread debugging using libthread_db enabled]
Cannot find new threads: generic error

In the attached file, for example you change all occurrences of "stack_used" by
"tack_used" and recompile and run gdb executes normally.

If you leave it as "stack_used", gdb dies with an entirely mystifying error
message!

Thanks.

Environment

uname -a
Linux parore 2.6.35-28-generic-pae #50-Ubuntu SMP Fri Mar 18 20:43:15 UTC 2011
i686 GNU/Linux
/usr/bin/gcc --version
gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug threads/9635] Cannot find new threads: generic error
       [not found] <bug-9635-4717@http.sourceware.org/bugzilla/>
  2011-05-27  5:27 ` [Bug threads/9635] Cannot find new threads: generic error john.carter at tait dot co.nz
  2011-05-27  5:35 ` john.carter at tait dot co.nz
@ 2011-05-27 10:46 ` pedro at codesourcery dot com
  2011-05-27 10:50 ` pedro at codesourcery dot com
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pedro at codesourcery dot com @ 2011-05-27 10:46 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=9635

Pedro Alves <pedro at codesourcery dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at sourceware    |pedro at codesourcery dot
                   |dot org                     |com

--- Comment #4 from Pedro Alves <pedro at codesourcery dot com> 2011-05-27 10:46:01 UTC ---
Created attachment 5757
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5757
fix

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug threads/9635] Cannot find new threads: generic error
       [not found] <bug-9635-4717@http.sourceware.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2011-05-27 10:46 ` pedro at codesourcery dot com
@ 2011-05-27 10:50 ` pedro at codesourcery dot com
  2011-05-27 11:04 ` gbenson at redhat dot com
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pedro at codesourcery dot com @ 2011-05-27 10:50 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=9635

--- Comment #5 from Pedro Alves <pedro at codesourcery dot com> 2011-05-27 10:49:48 UTC ---
Thanks for the testcase.  It makes the problem dead obvious --- GDB is looking
up symbols in the globally, instead of on the object thread_db requests.

I've attached a proposed fix.  My thread_db always passes in a basenamed
obj=libpthread.so.0.  Not sure that'll always be the case.  Anyone know
otherwise?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug threads/9635] Cannot find new threads: generic error
       [not found] <bug-9635-4717@http.sourceware.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2011-05-27 10:50 ` pedro at codesourcery dot com
@ 2011-05-27 11:04 ` gbenson at redhat dot com
  2011-05-27 11:08 ` pedro at codesourcery dot com
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: gbenson at redhat dot com @ 2011-05-27 11:04 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=9635

Gary Benson <gbenson at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gbenson at redhat dot com

--- Comment #6 from Gary Benson <gbenson at redhat dot com> 2011-05-27 11:03:46 UTC ---
Not sure how relevant this is, but there is a function libpthread_name_p
defined in solib.c.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug threads/9635] Cannot find new threads: generic error
       [not found] <bug-9635-4717@http.sourceware.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2011-05-27 11:04 ` gbenson at redhat dot com
@ 2011-05-27 11:08 ` pedro at codesourcery dot com
  2011-05-27 12:31 ` gbenson at redhat dot com
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pedro at codesourcery dot com @ 2011-05-27 11:08 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=9635

--- Comment #7 from Pedro Alves <pedro at codesourcery dot com> 2011-05-27 11:08:00 UTC ---
Yeah, didn't look useful.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug threads/9635] Cannot find new threads: generic error
       [not found] <bug-9635-4717@http.sourceware.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2011-05-27 11:08 ` pedro at codesourcery dot com
@ 2011-05-27 12:31 ` gbenson at redhat dot com
  2011-06-01 15:48 ` pedro at codesourcery dot com
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: gbenson at redhat dot com @ 2011-05-27 12:31 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=9635

--- Comment #8 from Gary Benson <gbenson at redhat dot com> 2011-05-27 12:30:06 UTC ---
Fair enough :)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug threads/9635] Cannot find new threads: generic error
       [not found] <bug-9635-4717@http.sourceware.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2011-05-27 12:31 ` gbenson at redhat dot com
@ 2011-06-01 15:48 ` pedro at codesourcery dot com
  2011-06-01 15:54 ` pedro at codesourcery dot com
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pedro at codesourcery dot com @ 2011-06-01 15:48 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=9635

--- Comment #9 from Pedro Alves <pedro at codesourcery dot com> 2011-06-01 15:48:33 UTC ---
The patch breaks thread debugging of threaded static programs.  E.g., the
gdb.threads/staticthreads test:

Breakpoint 3, ps_pglobal_lookup (ph=0xf248f8, obj=0x7ffff5b84541
"libpthread.so.0", name=0x7ffff5b84665 "nptl_version", sym_addr=0x7fffffffd5c8)
    at ../../src/gdb/proc-service.c:207
207       ALL_OBJFILES (objfile)

There's no libpthread.so loaded by this program, so all symbol lookups
thread_db tries fail...

Any ideas?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug threads/9635] Cannot find new threads: generic error
       [not found] <bug-9635-4717@http.sourceware.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2011-06-01 15:48 ` pedro at codesourcery dot com
@ 2011-06-01 15:54 ` pedro at codesourcery dot com
  2011-06-01 15:57 ` pedro at codesourcery dot com
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pedro at codesourcery dot com @ 2011-06-01 15:54 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=9635

--- Comment #10 from Pedro Alves <pedro at codesourcery dot com> 2011-06-01 15:53:25 UTC ---
Is there any reason glibc couldn't move the symbols it wants to check against
to the private namespace (nptl_version ==> __nptl_version, etc.)?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug threads/9635] Cannot find new threads: generic error
       [not found] <bug-9635-4717@http.sourceware.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2011-06-01 15:54 ` pedro at codesourcery dot com
@ 2011-06-01 15:57 ` pedro at codesourcery dot com
  2011-06-01 15:58 ` pedro at codesourcery dot com
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pedro at codesourcery dot com @ 2011-06-01 15:57 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=9635

Pedro Alves <pedro at codesourcery dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|pedro at codesourcery dot   |unassigned at sourceware
                   |com                         |dot org

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug threads/9635] Cannot find new threads: generic error
       [not found] <bug-9635-4717@http.sourceware.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2011-06-01 15:57 ` pedro at codesourcery dot com
@ 2011-06-01 15:58 ` pedro at codesourcery dot com
  2014-11-20 11:45 ` palves at redhat dot com
  2014-11-20 11:46 ` palves at redhat dot com
  12 siblings, 0 replies; 14+ messages in thread
From: pedro at codesourcery dot com @ 2011-06-01 15:58 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=9635

Pedro Alves <pedro at codesourcery dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
                 CC|                            |pedro at codesourcery dot
                   |                            |com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug threads/9635] Cannot find new threads: generic error
       [not found] <bug-9635-4717@http.sourceware.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2011-06-01 15:58 ` pedro at codesourcery dot com
@ 2014-11-20 11:45 ` palves at redhat dot com
  2014-11-20 11:46 ` palves at redhat dot com
  12 siblings, 0 replies; 14+ messages in thread
From: palves at redhat dot com @ 2014-11-20 11:45 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=9635

Pedro Alves <palves at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |17629

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug threads/9635] Cannot find new threads: generic error
       [not found] <bug-9635-4717@http.sourceware.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2014-11-20 11:45 ` palves at redhat dot com
@ 2014-11-20 11:46 ` palves at redhat dot com
  12 siblings, 0 replies; 14+ messages in thread
From: palves at redhat dot com @ 2014-11-20 11:46 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=9635

--- Comment #11 from Pedro Alves <palves at redhat dot com> ---
Filed glibc bug: https://sourceware.org/bugzilla/show_bug.cgi?id=17629

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug threads/9635] Cannot find new threads: generic error
       [not found] <20080927173801.9635.carlo@alinoe.com>
@ 2010-06-04  9:21 ` cgrayce at gmail dot com
  0 siblings, 0 replies; 14+ messages in thread
From: cgrayce at gmail dot com @ 2010-06-04  9:21 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From cgrayce at gmail dot com  2010-06-04 09:21 -------
(In reply to comment #0)

Identical problem, with plain C code that also uses no threads, but does use
dynamic libraries:

% gdb xques
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/cgrayce/bin/xques...done.
(gdb) run -i 31d_uconvert.xml example-xhtml
Starting program: /home/cgrayce/bin/xques -i 31d_uconvert.xml example-xhtml
[Thread debugging using libthread_db enabled]
Cannot find new threads: generic error

ldd `which xques`
	linux-gate.so.1 =>  (0x00ce2000)
	libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00164000)
	libz.so.1 => /lib/libz.so.1 (0x0035a000)
	libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x00642000)
	libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x0036f000)
	libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x00ef2000)
	/lib/ld-linux.so.2 (0x0091c000)

uname -a
Linux spock 2.6.32-22-generic #35-Ubuntu SMP Tue Jun 1 14:17:36 UTC 2010 i686
GNU/Linux


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=9635

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-11-20 11:46 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-9635-4717@http.sourceware.org/bugzilla/>
2011-05-27  5:27 ` [Bug threads/9635] Cannot find new threads: generic error john.carter at tait dot co.nz
2011-05-27  5:35 ` john.carter at tait dot co.nz
2011-05-27 10:46 ` pedro at codesourcery dot com
2011-05-27 10:50 ` pedro at codesourcery dot com
2011-05-27 11:04 ` gbenson at redhat dot com
2011-05-27 11:08 ` pedro at codesourcery dot com
2011-05-27 12:31 ` gbenson at redhat dot com
2011-06-01 15:48 ` pedro at codesourcery dot com
2011-06-01 15:54 ` pedro at codesourcery dot com
2011-06-01 15:57 ` pedro at codesourcery dot com
2011-06-01 15:58 ` pedro at codesourcery dot com
2014-11-20 11:45 ` palves at redhat dot com
2014-11-20 11:46 ` palves at redhat dot com
     [not found] <20080927173801.9635.carlo@alinoe.com>
2010-06-04  9:21 ` cgrayce at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).