mutrace --debug-info fails with undefined symbol bfd_init

Bug #1298165 reported by Ben Stanley
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
mutrace (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I attempted to use mutrace to gather information about lock contention. I wanted to see symbolic stack traces, so I used the --debug-info switch (as mentioned at http://git.0pointer.de/?p=mutrace.git;a=blob;f=README;h=5195524f894b102a9de63885a63d03a06ca2494a;hb=HEAD ).
------------------------------------------------------------------
ben@bearded-dragon:~$ mutrace --debug-info gedit
mutrace: 0.2 sucessfully initialized for process gedit (pid 10513).

mutrace: Showing statistics for process gedit (pid 10513).
mutrace: 49 mutexes used.
gedit: symbol lookup error: /usr/lib/mutrace/libmutrace-backtrace-symbols.so: undefined symbol: bfd_init
------------------------------------------------------------------

Note that mutrace seems to work OK without the --debug-info switch:

------------------------------------------------------------------
ben@bearded-dragon:~$ mutrace --hash-size=10000 gedit
mutrace: 0.2 sucessfully initialized for process gedit (pid 10772).

mutrace: Showing statistics for process gedit (pid 10772).
mutrace: 49 mutexes used.

Mutex #47 (0x0x24fee80) first referenced by:
 /usr/lib/mutrace/libmutrace.so(pthread_mutex_lock+0x49) [0x7f5be2be36b9]
 /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_mutex_lock+0x11) [0x7f5be020b3a1]

Mutex #0 (0x0x2562c00) first referenced by:
 /usr/lib/mutrace/libmutrace.so(pthread_mutex_init+0xf2) [0x7f5be2be34b2]
 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x88088) [0x7f5be020b088]

Mutex #23 (0x0x256d3b0) first referenced by:
 /usr/lib/mutrace/libmutrace.so(pthread_mutex_init+0xf2) [0x7f5be2be34b2]
 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x88088) [0x7f5be020b088]

Mutex #22 (0x0x256d270) first referenced by:
 /usr/lib/mutrace/libmutrace.so(pthread_mutex_init+0xf2) [0x7f5be2be34b2]
 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x88088) [0x7f5be020b088]

Mutex #17 (0x0x2557330) first referenced by:
 /usr/lib/mutrace/libmutrace.so(pthread_mutex_init+0xf2) [0x7f5be2be34b2]
 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x88013) [0x7f5be020b013]

Mutex #31 (0x0x256eab0) first referenced by:
 /usr/lib/mutrace/libmutrace.so(pthread_mutex_init+0xf2) [0x7f5be2be34b2]
 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x88088) [0x7f5be020b088]

Mutex #16 (0x0x24f4080) first referenced by:
 /usr/lib/mutrace/libmutrace.so(pthread_mutex_lock+0x49) [0x7f5be2be36b9]
 /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_mutex_lock+0x11) [0x7f5be020b3a1]

Mutex #43 (0x0x24fcd70) first referenced by:
 /usr/lib/mutrace/libmutrace.so(pthread_mutex_init+0xf2) [0x7f5be2be34b2]
 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x88088) [0x7f5be020b088]

Mutex #37 (0x0x24fbc80) first referenced by:
 /usr/lib/mutrace/libmutrace.so(pthread_mutex_init+0xf2) [0x7f5be2be34b2]
 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x88088) [0x7f5be020b088]

Mutex #38 (0x0x255dfc0) first referenced by:
 /usr/lib/mutrace/libmutrace.so(pthread_mutex_init+0xf2) [0x7f5be2be34b2]
 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x88088) [0x7f5be020b088]

mutrace: Showing 10 most contended mutexes:

 Mutex # Locked Changed Cont. tot.Time[ms] avg.Time[ms] max.Time[ms] Flags
      47 344 20 2 0.425 0.001 0.013 M-.--.
       0 65 21 1 0.349 0.005 0.342 M-.a-.
      23 4 2 1 0.411 0.103 0.391 M-.a-.
      22 435 15 0 0.130 0.000 0.014 M-.a-.
      17 186 12 0 0.048 0.000 0.005 M-.r-.
      31 24 11 0 0.565 0.024 0.538 M-.a-.
      16 1347 9 0 0.328 0.000 0.013 M-.--.
      43 617 9 0 0.183 0.000 0.014 M-.a-.
      37 129 9 0 0.054 0.000 0.020 M-.a-.
      38 29 9 0 0.881 0.030 0.371 M-.a-.
     ... ... ... ... ... ... ... ||||||
                                                                           /|||||
          Object: M = Mutex, W = RWLock /||||
           State: x = dead, ! = inconsistent /|||
             Use: R = used in realtime thread /||
      Mutex Type: r = RECURSIVE, e = ERRRORCHECK, a = ADAPTIVE /|
  Mutex Protocol: i = INHERIT, p = PROTECT /
     RWLock Kind: r = PREFER_READER, w = PREFER_WRITER, W = PREFER_WRITER_NONREC

mutrace: Note that the flags column R is only valid in --track-rt mode!

mutrace: Total runtime is 30.111 ms.

mutrace: Results for SMP with 8 processors.
------------------------------------------------------------------

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: mutrace 0.2.0-2
ProcVersionSignature: Ubuntu 3.11.0-18.32-generic 3.11.10.4
Uname: Linux 3.11.0-18-generic x86_64
ApportVersion: 2.12.5-0ubuntu2.2
Architecture: amd64
Date: Thu Mar 27 13:37:40 2014
Dependencies:
 gcc-4.8-base 4.8.1-10ubuntu9
 libc6 2.17-93ubuntu4
 libgcc1 1:4.8.1-10ubuntu9
 multiarch-support 2.17-93ubuntu4
InstallationDate: Installed on 2013-09-13 (194 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
MarkForUpload: True
SourcePackage: mutrace
UpgradeStatus: Upgraded to saucy on 2014-01-15 (70 days ago)

Revision history for this message
Ben Stanley (ben-stanley) wrote :
Revision history for this message
Mark Nunberg (mnunberg) wrote :

I also ran into this issue (Using Debian, but same issue). Apparently the solution is twofold:

(1) Install `binutils-dev`. This will give you a `libbfd.so`
(2) `LD_PRELOAD=/usr/lib/libbfd.so mutrace -d ...`

As a workaround

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in mutrace (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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