* Re: Cannot find new threads: generic error
@ 2008-08-29 17:48 Laurent Carlier
2008-08-31 2:30 ` Laurent Carlier
0 siblings, 1 reply; 6+ messages in thread
From: Laurent Carlier @ 2008-08-29 17:48 UTC (permalink / raw)
To: gdb
Sorry if i break the thread, i find these mails wihile seraching about this
problem.
I got the same problem when running gdb with a program using dlopen() too and
under debian sid (the same problem occur under the last ubuntu release)
I've filled a bug report on debian bug tracking system:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=496494
So the output from gdb is:
lordh@debian:~/gb2projets/TunnelSDL$ gdb gbx3
GNU gdb 6.8-debian
Copyright (C) 2008 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 "x86_64-linux-gnu"...
(gdb) run -p
Starting program: /usr/local/bin/gbx3 -p
[Thread debugging using libthread_db enabled]
Error while reading shared library symbols:
Cannot find new threads: generic error
Cannot find new threads: generic error
(gdb) bt
#0 0x00007ff0873787b7 in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#1 0x00007ff087374366 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#2 0x00007ff0873780eb in _dl_open () from /lib64/ld-linux-x86-64.so.2
#3 0x00007ff086ee0fbb in dlopen_doit () from /lib/libdl.so.2
#4 0x00007ff087374366 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#5 0x00007ff086ee136c in _dlerror_run () from /lib/libdl.so.2
#6 0x00007ff086ee0f21 in dlopen@@GLIBC_2.2.5 () from /lib/libdl.so.2
#7 0x0000000000420685 in LIBRARY_load (lib=0x15dd400) at gbx_library.c:468
#8 0x0000000000441f4b in COMPONENT_load (comp=0x15dd3a0) at
gbx_component.c:250
#9 0x0000000000441b22 in COMPONENT_load_all () at gbx_component.c:110
#10 0x000000000041fd5f in PROJECT_load () at gbx_project.c:456
#11 0x0000000000432d2e in init (file=0x446378 ".") at gbx.c:85
#12 0x00000000004332ef in main (argc=1, argv=0x7fff8f582968) at gbx.c:299
(gdb)
>> [Thread debugging using libthread_db enabled]
>> Error while reading shared library symbols:
>> Cannot find new threads: generic error
>>
>> I'm using kernel 2.6.24 on a recent debian/unstable libc6.
>>
>> Where does that error come from?
>
>This is most often the result of either
>A. mismatch between libc.so.6 and libthread_db.so.1, or
>B. libpthread.so.0 being stripped.
>
>What does 'nm /lib/libpthread.so.0 | grep _version' say?
The output is:
lordh@debian:~$ nm /lib/libpthread.so.0 | grep _version
0000000000010420 r nptl_version
Regards,
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Cannot find new threads: generic error
2008-08-29 17:48 Cannot find new threads: generic error Laurent Carlier
@ 2008-08-31 2:30 ` Laurent Carlier
2008-08-31 5:05 ` Paul Pluzhnikov
0 siblings, 1 reply; 6+ messages in thread
From: Laurent Carlier @ 2008-08-31 2:30 UTC (permalink / raw)
To: gdb
Le Thursday 28 August 2008 15:53:36 Laurent Carlier, vous avez écrit :
> Sorry if i break the thread, i find these mails wihile seraching about this
> problem.
>
> I got the same problem when running gdb with a program using dlopen() too
> and under debian sid (the same problem occur under the last ubuntu release)
>
> I've filled a bug report on debian bug tracking system:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=496494
>
> So the output from gdb is:
> lordh@debian:~/gb2projets/TunnelSDL$ gdb gbx3
> GNU gdb 6.8-debian
> Copyright (C) 2008 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 "x86_64-linux-gnu"...
> (gdb) run -p
> Starting program: /usr/local/bin/gbx3 -p
> [Thread debugging using libthread_db enabled]
> Error while reading shared library symbols:
> Cannot find new threads: generic error
> Cannot find new threads: generic error
> (gdb) bt
> #0 0x00007ff0873787b7 in dl_open_worker () from
> /lib64/ld-linux-x86-64.so.2 #1 0x00007ff087374366 in _dl_catch_error ()
> from /lib64/ld-linux-x86-64.so.2 #2 0x00007ff0873780eb in _dl_open () from
> /lib64/ld-linux-x86-64.so.2 #3 0x00007ff086ee0fbb in dlopen_doit () from
> /lib/libdl.so.2
> #4 0x00007ff087374366 in _dl_catch_error () from
> /lib64/ld-linux-x86-64.so.2 #5 0x00007ff086ee136c in _dlerror_run () from
> /lib/libdl.so.2
> #6 0x00007ff086ee0f21 in dlopen@@GLIBC_2.2.5 () from /lib/libdl.so.2
> #7 0x0000000000420685 in LIBRARY_load (lib=0x15dd400) at gbx_library.c:468
> #8 0x0000000000441f4b in COMPONENT_load (comp=0x15dd3a0) at
> gbx_component.c:250
> #9 0x0000000000441b22 in COMPONENT_load_all () at gbx_component.c:110
> #10 0x000000000041fd5f in PROJECT_load () at gbx_project.c:456
> #11 0x0000000000432d2e in init (file=0x446378 ".") at gbx.c:85
> #12 0x00000000004332ef in main (argc=1, argv=0x7fff8f582968) at gbx.c:299
> (gdb)
>
> >> [Thread debugging using libthread_db enabled]
> >> Error while reading shared library symbols:
> >> Cannot find new threads: generic error
> >>
> >> I'm using kernel 2.6.24 on a recent debian/unstable libc6.
> >>
> >> Where does that error come from?
> >
> >This is most often the result of either
> >A. mismatch between libc.so.6 and libthread_db.so.1, or
> >B. libpthread.so.0 being stripped.
> >
> >What does 'nm /lib/libpthread.so.0 | grep _version' say?
>
> The output is:
> lordh@debian:~$ nm /lib/libpthread.so.0 | grep _version
> 0000000000010420 r nptl_version
>
> Regards,
I've find a workaround, i've link the debugging app with libpthread and now gdb
feels happy, and i can run it with gdb !
Does anybody got an idea how to fix definitivly this problem ?
Thank for your advices.
Regards,
Laurent Carlier
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Cannot find new threads: generic error
2008-08-31 2:30 ` Laurent Carlier
@ 2008-08-31 5:05 ` Paul Pluzhnikov
2008-08-31 14:07 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Paul Pluzhnikov @ 2008-08-31 5:05 UTC (permalink / raw)
To: Laurent Carlier; +Cc: gdb
On Fri, Aug 29, 2008 at 5:13 PM, Laurent Carlier <lordheavym@gmail.com> wrote:
> I've find a workaround, i've link the debugging app with libpthread and now gdb
> feels happy, and i can run it with gdb !
Are you dlopen()ing a library which is linked against libpthread.so
into a program which isn't?
Very few OSes support processes "suddenly" becoming multithreaded
(I know only of Solaris 10 and AIX 5).
If you do that on Linux, you should expect all kinds of trouble,
because e.g. glibc very early on decides whether pthreads are
present, and permanently switches to thread-unsafe behavior if they
are not.
Cheers,
--
Paul Pluzhnikov
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Cannot find new threads: generic error
2008-08-31 5:05 ` Paul Pluzhnikov
@ 2008-08-31 14:07 ` Daniel Jacobowitz
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2008-08-31 14:07 UTC (permalink / raw)
To: Paul Pluzhnikov; +Cc: Laurent Carlier, gdb
On Fri, Aug 29, 2008 at 05:43:38PM -0700, Paul Pluzhnikov wrote:
> If you do that on Linux, you should expect all kinds of trouble,
> because e.g. glibc very early on decides whether pthreads are
> present, and permanently switches to thread-unsafe behavior if they
> are not.
I'm pretty sure that's not correct. It checks at each runtime spot,
not initialization time - a lot of the complexity in glibc is to
support this.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 6+ messages in thread
* Cannot find new threads: generic error
@ 2008-08-17 23:07 Russell Shaw
2008-08-18 13:16 ` Paul Pluzhnikov
0 siblings, 1 reply; 6+ messages in thread
From: Russell Shaw @ 2008-08-17 23:07 UTC (permalink / raw)
To: gdb
Hi,
When trying to debug a dlopen() call in gdb 6.8 on debian/unstable,
i get:
...
[Thread debugging using libthread_db enabled]
Error while reading shared library symbols:
Cannot find new threads: generic error
I'm using kernel 2.6.24 on a recent debian/unstable libc6.
Where does that error come from?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Cannot find new threads: generic error
2008-08-17 23:07 Russell Shaw
@ 2008-08-18 13:16 ` Paul Pluzhnikov
0 siblings, 0 replies; 6+ messages in thread
From: Paul Pluzhnikov @ 2008-08-18 13:16 UTC (permalink / raw)
To: Russell Shaw; +Cc: gdb
On Sun, Aug 17, 2008 at 5:32 AM, Russell Shaw <rjshaw@netspace.net.au> wrote:
> [Thread debugging using libthread_db enabled]
> Error while reading shared library symbols:
> Cannot find new threads: generic error
>
> I'm using kernel 2.6.24 on a recent debian/unstable libc6.
>
> Where does that error come from?
This is most often the result of either
A. mismatch between libc.so.6 and libthread_db.so.1, or
B. libpthread.so.0 being stripped.
What does 'nm /lib/libpthread.so.0 | grep _version' say?
--
Paul Pluzhnikov
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-08-30 1:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-29 17:48 Cannot find new threads: generic error Laurent Carlier
2008-08-31 2:30 ` Laurent Carlier
2008-08-31 5:05 ` Paul Pluzhnikov
2008-08-31 14:07 ` Daniel Jacobowitz
-- strict thread matches above, loose matches on Subject: below --
2008-08-17 23:07 Russell Shaw
2008-08-18 13:16 ` Paul Pluzhnikov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox