Public bug reported:
I tried to run systemtap with the mutex-contention.stp script supplied
in the systemtap-doc package.
/usr/share/doc/systemtap-doc/examples/process/mutex-contention.stp
I ran systemtap like this:
-------------------------------------------------------------------------------
ben@bearded-dragon:~/learn-stap$ stap -v -c "gedit"
/usr/share/doc/systemtap-doc/examples/process/mutex-contention.stp
Pass 1: parsed user script and 91 library script(s) using
94020virt/23100res/2608shr/21084data kb, in 70usr/0sys/72real ms.
semantic error: while resolving probe point: identifier 'process' at
/usr/share/doc/systemtap-doc/examples/process/mutex-contention.stp:57:7
source: probe process("/lib*/libc.so*").function("pthread_mutex_init")
{ process_mutex_init($mutex, probefunc()) }
^
semantic error: glob /lib*/libc.so* error (3)
semantic error: while resolving probe point: identifier 'process' at :58:7
source: probe
process("/lib*/libpthread.so*").function("__pthread_mutex_init") {
process_mutex_init($mutex, probefunc()) }
^
semantic error: glob /lib*/libpthread.so* error (3)
semantic error: while resolving probe point: identifier 'process' at :59:7
source: probe
process("/lib*/libpthread.so*").function("__pthread_rwlock_init") {
process_mutex_init($rwlock, probefunc()) }
^
Pass 2: analyzed script: 3 probe(s), 146 function(s), 7 embed(s), 15 global(s)
using 296144virt/59564res/3852shr/56084data kb, in 600usr/70sys/666real ms.
Pass 2: analysis failed. [man error::pass2]
Tip: /usr/share/doc/systemtap/README.Debian should help you get started.
-------------------------------------------------------------------------------
Since this script comes in the examples, it carries some expectation
that it should work with the distribution that provided it.
The error message is quite confusing, until I realised that I have
multiple libc.so files on my system:
ben@bearded-dragon:~/learn-stap$ locate libc.so
/lib/i386-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libc.so.6
/usr/lib/x86_64-linux-gnu/libc.so
Therefore I created a test stp script where I specified the full path to
libc.so.6 (see test-mutex-init.stp, attached). This fixed the problem.
I expect that this problem will also affect other example scripts as
well. It seems that systemtap needs a set of unit tests to cover the
examples!
ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: systemtap 2.2.1-1ubuntu1
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:19:35 2014
InstallationDate: Installed on 2013-09-13 (194 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
MarkForUpload: True
SourcePackage: systemtap
UpgradeStatus: Upgraded to saucy on 2014-01-15 (70 days ago)
** Affects: systemtap (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug saucy
** Attachment added: "SystemTap script that demonstrates the problem and a
solution"
https://bugs.launchpad.net/bugs/1298162/+attachment/4045853/+files/test-mutex-init.stp
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1298162
Title:
systemtap script mutex-contention.stp fails due to ambiguous process
path
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemtap/+bug/1298162/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs