[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#399035: marked as done (LD_LIBRARY_PATH=/usr/lib/debug causes switch to ancient libpthread)



Your message dated Thu, 12 Apr 2007 11:47:56 +0200
with message-id <461E004C.8080207@aurel32.net>
and subject line Closing bugs fixed in unreleased version 2.4-1 of the glibc
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: libc6-dbg
Version: 2.3.6-7

I see applications using a different thread library when using unstripped
libraries from /usr/lib/debug:

    $ ldd /usr/sbin/mysqld | grep libpthread
            libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb7f64000)
    $ ls -l /lib/tls/libpthread.so.0
    lrwxrwxrwx  1 root root 19 2006-05-14 15:06 /lib/tls/libpthread.so.0 -> libpthread-2.3.6.so
    $ LD_LIBRARY_PATH=/usr/lib/debug ldd /usr/sbin/mysqld | grep libpthread
            libpthread.so.0 => /usr/lib/debug/libpthread.so.0 (0xb7e63000)
    $ ls -l /usr/lib/debug/libpthread.so.0
    lrwxrwxrwx  1 root root 18 2006-05-14 15:06 /usr/lib/debug/libpthread.so.0 -> libpthread-0.10.so

So mysqld is normally using libpthread-2.3.6 (NPTL), which is what I expected.

But when setting LD_LIBRARY_PATH=/usr/lib/debug, mysqld is now using
libpthread-0.10.so, which I believe is an ancient version of LinuxThreads with
fixed thread locations, for use only to provide compatibility with old/broken
applications.

So seemingly, when switching to unstripped libraries to debug a problem, we
will also switch to a very different threading library, which could easily
cause confusion and seems quite unfortunate.

My understanding of ld.so is unfortunately limited, but perhaps the problem is
related to missing libpthread.so.0 symbolic links?

    $ find /lib /usr/lib -name libpthread.so.0
    /lib/tls/libpthread.so.0
    /lib/libpthread.so.0
    /usr/lib/debug/libpthread.so.0

So I'm wondering if there is missing a symbolic link

    /usr/lib/debug/tls/libpthread.so.0 -> /usr/lib/debug/lib/tls/libpthread-2.3.6.so

but then similar links will also be required for other system libraries, I
suppose.

Alternatively, perhaps the bug is that the /usr/lib/debug/libpthread.so.0
symbolic link is pointing out the wrong libpthread (the ancient compatibility
one), which will usually be the wrong one.

So I'm not sure about the proper fix, but I do think the switch to different
threading lib when using unstripped libraries (as shown by ldd commands above)
is a bug.

 - Kristian.

System info:

$ uname -a
Linux ymer 2.6.13.4 #3 Thu Oct 27 01:07:26 CEST 2005 i686 GNU/Linux
$ ls -l /lib/libc.so.6
lrwxrwxrwx  1 root root 13 2006-05-14 15:06 /lib/libc.so.6 -> libc-2.3.6.so


-- 
Kristian Nielsen, Software Developer
MySQL AB, www.mysql.com
Are you MySQL certified?  www.mysql.com/certification



--- End Message ---
--- Begin Message ---
Version: 2.5-1

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

--- End Message ---

Reply to: