In Ubuntu16.10 : not able to run perf command

Bug #1603872 reported by bugproxy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
perf-tools-unstable (Ubuntu)
New
Undecided
Taco Screen team

Bug Description

== Comment: #0 - Praveen K. Pandey <email address hidden> - 2016-07-14 10:43:07 ==
Hi

  Tried to run perf command in Ubuntu16.10 command failing with libbfd-2.26-system.so not found .

Reproducible:

1- Install system with Ubuntu16.10
2- Install linux-tools and other package which is required by perf .
3- run perf command

Expected result :

Perf command should able to run successfully

Actual Result:

perf command failed as complaining about libbfd-2.26-system.so

LOG:

root@ltciofvtr-firestone2:~# cat /etc/issue
Ubuntu Yakkety Yak (development branch) \n \l

root@ltciofvtr-firestone2:~# uname -a
Linux ltciofvtr-firestone2 4.4.0-30-generic #49-Ubuntu SMP Fri Jul 1 10:00:36 UTC 2016 ppc64le ppc64le ppc64le GNU/Linux
root@ltciofvtr-firestone2:~#

root@ltciofvtr-firestone2:~# perf
/usr/lib/linux-tools/4.4.0-30-generic/perf: error while loading shared libraries: libbfd-2.26-system.so: cannot open shared object file: No such file or directory
root@ltciofvtr-firestone2:~# perf record ls
/usr/lib/linux-tools/4.4.0-30-generic/perf: error while loading shared libraries: libbfd-2.26-system.so: cannot open shared object file: No such file or directory
root@ltciofvtr-firestone2:~#

Regards
Praveen

== Comment: #3 - Chandan Kumar <email address hidden> - 2016-07-15 04:40:04 ==

perf here is looking for .so file "libbfd-2.26-system.so" however the installed version is "libbfd-2.26.1-system.so", which is updated version of libbfd but perf is looking for older version.

Work around is creating a symlink, which seems to be working.

==============

root@ubuntu:~# perf
/usr/lib/linux-tools/4.4.0-30-generic/perf: error while loading shared libraries: libbfd-2.26-system.so: cannot open shared object file: No such file or directory
root@ubuntu:~#

root@ubuntu:~# find / -iname libbfd*
/usr/lib/powerpc64le-linux-gnu/libbfd-2.26.1-system.so
root@ubuntu:~#

root@ubuntu:~# ln -s /usr/lib/powerpc64le-linux-gnu/libbfd-2.26.1-system.so /usr/lib/powerpc64le-linux-gnu/libbfd-2.26-system.so
root@ubuntu:~# ll /usr/lib/powerpc64le-linux-gnu/libbfd-2.26*
-rw-r--r-- 1 root root 1390504 Jun 30 03:52 /usr/lib/powerpc64le-linux-gnu/libbfd-2.26.1-system.so
lrwxrwxrwx 1 root root 54 Jul 15 03:20 /usr/lib/powerpc64le-linux-gnu/libbfd-2.26-system.so -> /usr/lib/powerpc64le-linux-gnu/libbfd-2.26.1-system.so

root@ubuntu:~# perf

 usage: perf [--version] [--help] [OPTIONS] COMMAND [ARGS]

 The most commonly used perf commands are:
   annotate Read perf.data (created by perf record) and display annotated code
   archive Create archive with object files with build-ids found in perf.data file
   bench General framework for benchmark suites
   buildid-cache Manage build-id cache.
   buildid-list List the buildids in a perf.data file
   data Data file related processing
   diff Read perf.data files and display the differential profile
   evlist List the event names in a perf.data file
   inject Filter to augment the events stream with additional information
   kmem Tool to trace/measure kernel memory properties
   kvm Tool to trace/measure kvm guest os
   list List all symbolic event types
   lock Analyze lock events
   mem Profile memory accesses
   record Run a command and record its profile into perf.data
   report Read perf.data (created by perf record) and display the profile
   sched Tool to trace/measure scheduler properties (latencies)
   script Read perf.data (created by perf record) and display trace output
   stat Run a command and gather performance counter statistics
   test Runs sanity tests.
   timechart Tool to visualize total system behavior during a workload
   top System profiling tool.
   trace strace inspired tool
   probe Define new dynamic tracepoints

 See 'perf help COMMAND' for more information on a specific command.

root@ubuntu:~#
root@ubuntu:~# perf record -a
^C[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.071 MB perf.data (7 samples) ]

root@ubuntu:~# perf report
root@ubuntu:~#

== Comment: #4 - Praveen K. Pandey <email address hidden> - 2016-07-15 04:50:39 ==
thanks Chandan !!

  same issue seen in ubuntu16.04.1 as well i think fix will provided for ubuntu16.04.1 as well

root@ubuntu:~# perf
/usr/lib/linux-tools/4.4.0-30-generic/perf: error while loading shared libraries: libbfd-2.26-system.so: cannot open shared object file: No such file or directory
root@ubuntu:~#
root@ubuntu:~# cat /etc/issue
Ubuntu 16.04 LTS \n \l

root@ubuntu:~# uname -a
Linux ubuntu 4.4.0-30-generic #49-Ubuntu SMP Fri Jul 1 10:00:36 UTC 2016 ppc64le ppc64le ppc64le GNU/Linux
root@ubuntu:~#

Regards
Praveen

bugproxy (bugproxy)
tags: added: architecture-ppc64le bugnameltc-143765 severity-high targetmilestone-inin1610
Changed in ubuntu:
assignee: nobody → Taco Screen team (taco-screen-team)
affects: ubuntu → perf-tools-unstable (Ubuntu)
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2016-08-09 11:51 EDT-------
Canonical,

Can you please take a look and provide your thoughts.

Thanks,

Revision history for this message
Steve Langasek (vorlon) wrote :

this bug was marked as a duplicate of another bug report, which has already been resolved.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2016-08-14 10:20 EDT-------
Hi ,

tested today's build and it working fine , i am able to perf command in ubuntu16.10

Regards
Praveen

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.