libc6-dbg puts ld-2.X.so into wrong location

Bug #914448 reported by Ppluzhnikov-google
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gdb
Fix Released
Wishlist
eglibc (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Using libc6_2.13-24ubuntu2_amd64.deb with libc6-dbg_2.13-24ubuntu2_amd64.deb,

gdb -q /bin/date
Reading symbols from /bin/date...done.

(gdb) set stop-on-solib-events 1
(gdb) run
Starting program: /bin/date
Stopped due to shared library event
(gdb) bt
#0 0x00007ffff7deb300 in _dl_debug_state () from /lib64/ld-linux-x86-64.so.2
#1 0x00007ffff7ddf386 in ?? () from /lib64/ld-linux-x86-64.so.2
#2 0x00007ffff7df1014 in ?? () from /lib64/ld-linux-x86-64.so.2
#3 0x00007ffff7de118f in ?? () from /lib64/ld-linux-x86-64.so.2
#4 0x00007ffff7ddd5b8 in ?? () from /lib64/ld-linux-x86-64.so.2
#5 0x0000000000000001 in ?? ()
#6 0x00007fffffffe7bc in ?? ()
#7 0x0000000000000000 in ?? ()
(gdb) quit

Note lack of debug symbols for /lib64/ld-linux-x86-64.so.2

The problem is that /lib64/ld-linux-x86-64.so.2 has .gnu_debuglink of "ld-2.13.so".

This means that GDB will look for /usr/lib/debug/lib64/ld-2.13.so (not present)
and will not look for /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.13.so (which is present).

strace confirms that:

grep 'ld-2.13.so"' /tmp/strace.out
open("/lib64/ld-2.13.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/.debug/ld-2.13.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/debug//lib64/ld-2.13.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/debug/lib64/ld-2.13.so", O_RDONLY) = -1 ENOENT (No such file or directory)
readlink("/lib64/ld-linux-x86-64.so.2", "/lib/x86_64-linux-gnu/ld-2.13.so"..., 4095) = 32
lstat("/lib/x86_64-linux-gnu/ld-2.13.so", {st_mode=S_IFREG|0755, st_size=141088, ...}) = 0

Arguably, GDB should do readlink("/lib64/ld-linux-x86-64.so.2"), and look for
the real path name as well. If GDB did that, it would have worked.

But for now, libc6-dbg should probably provide a symlink from
/usr/lib/debug/lib64/ld-2.13.so to /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.13.so

Revision history for this message
Ppluzhnikov-google (ppluzhnikov-google) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in eglibc (Ubuntu):
status: New → Confirmed
Revision history for this message
Adam Conrad (adconrad) wrote :

Seems this was fixed in gdb, which is good, cause we can't fix it in libc6-dbg without breaking multi-arch (we'd end up with overlapping paths between architectures).

Changed in eglibc (Ubuntu):
status: Confirmed → Won't Fix
affects: eglibc → gdb
Changed in gdb:
importance: Unknown → Wishlist
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.