dbus programs will not use nosegneg libraries

Bug #432718 reported by Scott Moser on 2009-09-18
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dbus (Ubuntu)
Undecided
Unassigned
Declined for Karmic by Steve Langasek
eglibc (Ubuntu)
Low
Unassigned
Declined for Karmic by Steve Langasek

Bug Description

Binary package hint: dbus

After bug 427288 was fixed by providing libc6-xen in the ec2 images, there is still a warning written to the console, which mentions dbus-uuidgen. It turns out that in all the ~1000 installed programs in /usr/bin, /usr/sbin, /bin, /sbin, only 3 will not use the nosegneg libraries. All are from source package dbus:
   /bin/dbus-uuidgen
   /usr/bin/dbus-monitor
   /usr/bin/dbus-send

Below is some debug info showing the problem.
I believe this is due to the use of rpath in linking of these three programs.

$ dmesg | grep ' \*\*'
[ 1.436904] ***************************************************************
[ 1.436908] ***************************************************************
[ 1.436912] ** WARNING: Currently emulating unsupported memory accesses **
[ 1.436916] ** in /lib/tls glibc libraries. The emulation is **
[ 1.436920] ** slow. To ensure full performance you should **
[ 1.436924] ** install a 'xen-friendly' (nosegneg) version of **
[ 1.436927] ** the library, or disable tls support by executing **
[ 1.436931] ** the following as root: **
[ 1.436935] ** mv /lib/tls /lib/tls.disabled **
[ 1.436939] ** Offending process: dbus-uuidgen (pid=1114) **
[ 1.436943] ***************************************************************
[ 1.436947] ***************************************************************

$ for x in /bin/* /usr/bin/* /sbin/* /usr/sbin/*; do ldd $x 2>/dev/null |
  grep -q "tls/i686/cmov" && echo ${x} && ldd ${x}; done
/bin/dbus-uuidgen
 linux-gate.so.1 => (0xb7fd1000)
 libdbus-1.so.3 => //lib/libdbus-1.so.3 (0xb7f8c000)
 libc.so.6 => //lib/tls/i686/cmov/libc.so.6 (0xb7e34000)
 libpthread.so.0 => //lib/tls/i686/cmov/libpthread.so.0 (0xb7e1a000)
 librt.so.1 => //lib/tls/i686/cmov/librt.so.1 (0xb7e10000)
 /lib/ld-linux.so.2 (0xb7fd2000)
/usr/bin/dbus-monitor
..
/usr/bin/dbus-send
..

Related branches

Eric Hammond (esh) wrote :

Confirmed with ami-fa658593 canonical-alphas-us/karmic-i386-alpha6.manifest.xml

Changed in dbus (Ubuntu):
status: New → Confirmed
Steve Langasek (vorlon) wrote :

Well, that's intriguing. I'll look into this (because I'm intrigued), but I'm declining the karmic nomination because the largest practical impact of the bug is the dmesg output itself - these dbus utilities represent an infinitesimal use of the system, if they run a little slower because of negative segments it's not going to significantly impact the instance performance.

On Sat, 19 Sep 2009, Steve Langasek wrote:

> Well, that's intriguing. I'll look into this (because I'm intrigued),
> but I'm declining the karmic nomination because the largest practical
> impact of the bug is the dmesg output itself - these dbus utilities
> represent an infinitesimal use of the system, if they run a little
> slower because of negative segments it's not going to significantly
> impact the instance performance.

I agree. I don't think its a big issue, the warning is just annoying. I
think in general, though, linking with rpath is not preferred, as, shown
here, it overrides system runtime settings.

Steve Langasek (vorlon) wrote :

On Sat, Sep 19, 2009 at 04:33:09PM -0000, Scott Moser wrote:

> I agree. I don't think its a big issue, the warning is just annoying. I
> think in general, though, linking with rpath is not preferred, as, shown
> here, it overrides system runtime settings.

Have you tried removing the rpath from the binaries (using 'chrpath -d') to
confirm that this is the cause of the problem?

The rpath that I see listed in the binaries is the current package version
is //lib. I don't see how that could cause such inconsistent behavior.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

Scott Moser (smoser) wrote :

I was previously unfamiliar with chrpath. making that change does indeed fix the problem (at least as reported by ldd). I ran the following on ami-fa658593 (i386 alpha6 ec2)

$ dpkg-query --show dbus
dbus 1.2.16-0ubuntu4
$ list="/bin/dbus-uuidgen /usr/bin/dbus-monitor /usr/bin/dbus-send"
$ for x in ${list}; do echo $x; ldd $x | grep "cmov" || echo " None"; done
/bin/dbus-uuidgen
   libc.so.6 => //lib/tls/i686/cmov/libc.so.6 (0xb7d68000)
   libpthread.so.0 => //lib/tls/i686/cmov/libpthread.so.0 (0xb7d4e000)
   librt.so.1 => //lib/tls/i686/cmov/librt.so.1 (0xb7d44000)
<snip identical for /usr/bin/dbus-monitor, /usr/bin/dbus-send>

$ sudo chrpath ${list}
/bin/dbus-uuidgen: RPATH=//lib
/usr/bin/dbus-monitor: RPATH=//lib
/usr/bin/dbus-send: RPATH=//lib
$ sudo chrpath -d ${list}
$ for x in ${list}; do echo $x; ldd $x | grep "cmov" || echo " None"; done
/bin/dbus-uuidgen
  None
/usr/bin/dbus-monitor
  None
/usr/bin/dbus-send
  None

Scott Moser (smoser) wrote :

should have put this in the previous message. After removing rpath and rebooting the instance, dmesg no longer shows the error.

Steve Langasek (vorlon) wrote :

This is also a glibc bug; glibc should not fail to properly resolve hwcap directories in the presence of an rpath, regardless of how goofy said rpath is.

Changed in glibc (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dbus - 1.2.16-0ubuntu6

---------------
dbus (1.2.16-0ubuntu6) karmic; urgency=low

  * Use --exec-prefix='', not --exec-prefix=/, so that we get libdir=/lib
    instead of libdir=//lib - avoiding the incorrect setting of rpath in the
    dbus helper utils. LP: #432718.

 -- Steve Langasek <email address hidden> Tue, 22 Sep 2009 15:05:19 -0700

Changed in dbus (Ubuntu):
status: Confirmed → Fix Released
Scott Moser (smoser) wrote :

verified that Steve's fix in comment 8 fixes this problem.

on alpha6 i386 (ami-fa658593):
# fresh instance
$ dmesg | grep Offending
[ 2.538665] ** Offending process: dbus-uuidgen (pid=1159) **
$ sudo apt-get update && sudo apt-install dbus
$ dpkg-query --show dbus
dbus 1.2.16-0ubuntu6
$ sudo reboot
...
$ $ dmesg | grep "Offending" || echo fixed
fixed

Colin Watson (cjwatson) on 2009-09-25
affects: glibc (Ubuntu) → eglibc (Ubuntu)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers