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

Bug#711913: libc6: ld.so falsely claims the vDSO comes from a file



Package: libc6
Version: 2.17-4
Severity: normal
Control: forwarded -1 http://sourceware.org/bugzilla/show_bug.cgi?id=13097
Control: affects -1 + gdb
Control: found -1 libc6/2.16-0experimental0

Dear Maintainer,

I recently noticed the behaviour in gdb complained of in the below
upstream bug report from Jan Kratochvil:

tl;dr: ld.so is now claiming that the vDSO has been loaded from a file,
which confuses tools like gdb.

For anyone following along at home: the vDSO is a small ELF Dynamic
Shared Object that the kernel injects into the address space of every
userspace program it loads; it contains routines used to make syscalls
as efficiently as possible, or even avoid some of them altogether.

Rather than being stored in the filesystem like a normal ELF DSO, the
vDSO is embedded in the kernel; in fact, I believe there are normally
multiple possible vDSOs from which the kernel chooses based on things
like the type of CPU in use (depending on, say, what syscall mechanism
is most efficient for it).

<http://sourceware.org/bugzilla/show_bug.cgi?id=13097#c0>:
> Description of problem:
> GDB has started to print on each `run':
> warning: Could not load shared library symbols for linux-vdso.so.1.
> Do you need "set solib-search-path" or "set sysroot"?
> 
> Version-Release number of selected component (if applicable):
> FAIL: glibc-2.14.90-5.x86_64
> PASS: glibc-2.14.90-4.x86_64
> Guessing it is due to:
> commit 73d7af4f4c2b394063cb0b3a33ee2b00b5ad80b4
>     Implement LD_DEBUG=scopes
> 
> How reproducible:
> Always.
> 
> Steps to Reproduce:
> echo 'main(){}'|gcc -x c -;../gdb -nx ./a.out -ex start -ex 'info shared'
> -ex c
> -ex q
> 
> Actual results:
> Starting program: .../a.out 
> warning: Could not load shared library symbols for linux-vdso.so.1.
> Do you need "set solib-search-path" or "set sysroot"?
> Temporary breakpoint 1, 0x0000000000400478 in main ()
> From                To                  Syms Read   Shared Object Library
> 0x00007ffff7ddbb20  0x00007ffff7df513a  Yes        
> /lib64/ld-linux-x86-64.so.2
>                                         No          linux-vdso.so.1
> 0x00007ffff7a4adc0  0x00007ffff7b80050  Yes         /lib64/libc.so.6
> Continuing.
> 
> Expected results:
> Starting program: .../a.out 
> Temporary breakpoint 1, 0x0000000000400478 in main ()
> From                To                  Syms Read   Shared Object Library
> 0x00007ffff7ddbb20  0x00007ffff7df4eda  Yes        
> /lib64/ld-linux-x86-64.so.2
> 0x00007ffff7a4ad30  0x00007ffff7b7ff60  Yes         /lib64/libc.so.6
> Continuing.
> 
> Additional info:
> glibc vdso had its name in the link map "" before.
> I do not see why the name should be different when there is no corresponding
> on-disk file for it.  Should GDB ignore for symbol resolution libraries with
> literal path-less name "linux-vdso.so.1"?

For your convenience, the commit Jan believes to have introduced the
problem can be seen at:
<http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=73d7af4f4c2b394063cb0b3a33ee2b00b5ad80b4>

There is also some information about what redhat has been doing about it
on the upstream bug.

With Drepper gone, upstream is now interested in a fix, but say they
aren't likely to get to it anytime soon themselves, and seem to want
something at least slightly more involved than what Redhat has.

(In particular, they seem to want such a patch to fix LD_DEBUG=scopes to
work nicely *without* re-activating the "lying" behaviour.)

-- System Information:
Debian Release: 7.0
  APT prefers proposed-updates
  APT policy: (500, 'proposed-updates'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-686-pae (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libc6 depends on:
ii  libgcc1  1:4.7.2-5

Versions of packages libc6 recommends:
ii  libc6-i686  2.17-4

Versions of packages libc6 suggests:
ii  debconf [debconf-2.0]  1.5.49
ii  glibc-doc              2.13-38
ii  locales-all [locales]  2.17-4

-- debconf information:
  glibc/upgrade: true
  glibc/disable-screensaver:
* glibc/restart-failed:
* glibc/restart-services: ssh samba openbsd-inetd exim4 cups cron atd autofs apache2
* libraries/restart-without-asking: false

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!


Reply to: