public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug tapsets/18598] New: staprun markers don't exist
@ 2015-06-25 15:23 dsmith at redhat dot com
  2015-06-25 17:15 ` [Bug tapsets/18598] " jistone at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dsmith at redhat dot com @ 2015-06-25 15:23 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=18598

            Bug ID: 18598
           Summary: staprun markers don't exist
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
          Assignee: systemtap at sourceware dot org
          Reporter: dsmith at redhat dot com
  Target Milestone: ---

While working on bug #18577 and going through the semantic errors that 'stap
-vv -l **' produces, I noticed that I was getting errors from the
stap_staticmarkers.stp tapset. This tapset provides probe aliases for markers
built into stap and staprun.

Markers exist in stap:

====
# stap -l 'process("stap").mark("*")'
process("/usr/local/bin/stap").mark("benchmark")
process("/usr/local/bin/stap").mark("benchmark__end")
process("/usr/local/bin/stap").mark("benchmark__start")
process("/usr/local/bin/stap").mark("benchmark__thread__end")
process("/usr/local/bin/stap").mark("benchmark__thread__start")
process("/usr/local/bin/stap").mark("cache__add__module")
process("/usr/local/bin/stap").mark("cache__add__source")
process("/usr/local/bin/stap").mark("cache__clean")
process("/usr/local/bin/stap").mark("cache__get")
process("/usr/local/bin/stap").mark("client__end")
process("/usr/local/bin/stap").mark("client__start")
process("/usr/local/bin/stap").mark("pass0__end")
process("/usr/local/bin/stap").mark("pass0__start")
process("/usr/local/bin/stap").mark("pass1__end")
process("/usr/local/bin/stap").mark("pass1a__start")
process("/usr/local/bin/stap").mark("pass1b__start")
process("/usr/local/bin/stap").mark("pass2__end")
process("/usr/local/bin/stap").mark("pass2__start")
process("/usr/local/bin/stap").mark("pass3__end")
process("/usr/local/bin/stap").mark("pass3__start")
process("/usr/local/bin/stap").mark("pass4__end")
process("/usr/local/bin/stap").mark("pass4__start")
process("/usr/local/bin/stap").mark("pass5__end")
process("/usr/local/bin/stap").mark("pass5__start")
process("/usr/local/bin/stap").mark("pass6__end")
process("/usr/local/bin/stap").mark("pass6__start")
process("/usr/local/bin/stap").mark("stap_system__complete")
process("/usr/local/bin/stap").mark("stap_system__spawn")
process("/usr/local/bin/stap").mark("stap_system__start")
====

But, no markers can be found in staprun:

====
# stap -l 'process("staprun").mark("*")'
====

This is odd because several markers appear in the staprun source. Perhaps we've
got a build problem.

Note that the stap_staticmarkers.stp needs a buildok test case so that this
sort of problem would have been found sooner.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tapsets/18598] staprun markers don't exist
  2015-06-25 15:23 [Bug tapsets/18598] New: staprun markers don't exist dsmith at redhat dot com
@ 2015-06-25 17:15 ` jistone at redhat dot com
  2015-06-25 17:42 ` [Bug tapsets/18598] stap_staticmarkers.stp tapset has no test case dsmith at redhat dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: jistone at redhat dot com @ 2015-06-25 17:15 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=18598

Josh Stone <jistone at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jistone at redhat dot com

--- Comment #1 from Josh Stone <jistone at redhat dot com> ---
The more direct way to check existence is "readelf -n", and this is revealing:

$ readelf -n /usr/local/bin/staprun
readelf: Error: Input file '/usr/local/bin/staprun' is not readable.

That's because staprun has mode 4110 (suid|xusr|xgrp).  Nobody has read
permission, which effectively means only root can read it.

Although you wrote a '#' before your commands, which usually indicates a root
prompt... Is that so, or were you running as a user?

$ sudo readelf -n /usr/local/bin/staprun
[...]
Displaying notes found at file offset 0x0002ba98 with length 0x000001f4:
  Owner                 Data size       Description
  stapsdt              0x00000036       NT_STAPSDT (SystemTap probe
descriptors)
    Provider: staprun
    Name: remove__module
    Location: 0x000000000040856e, Base: 0x0000000000427358, Semaphore:
0x0000000000000000
    Arguments: 8@%rbx
  stapsdt              0x00000036       NT_STAPSDT (SystemTap probe
descriptors)
    Provider: staprun
    Name: insert__module
    Location: 0x000000000040aa18, Base: 0x0000000000427358, Semaphore:
0x0000000000000000
    Arguments: 8@%r12
[etc]

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tapsets/18598] stap_staticmarkers.stp tapset has no test case
  2015-06-25 15:23 [Bug tapsets/18598] New: staprun markers don't exist dsmith at redhat dot com
  2015-06-25 17:15 ` [Bug tapsets/18598] " jistone at redhat dot com
@ 2015-06-25 17:42 ` dsmith at redhat dot com
  2015-06-25 17:42 ` [Bug tapsets/18598] staprun markers don't exist dsmith at redhat dot com
  2015-06-25 18:01 ` [Bug tapsets/18598] stap_staticmarkers.stp tapset has no test case dsmith at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: dsmith at redhat dot com @ 2015-06-25 17:42 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=18598

David Smith <dsmith at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|staprun markers don't exist |stap_staticmarkers.stp
                   |                            |tapset has no test case

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tapsets/18598] staprun markers don't exist
  2015-06-25 15:23 [Bug tapsets/18598] New: staprun markers don't exist dsmith at redhat dot com
  2015-06-25 17:15 ` [Bug tapsets/18598] " jistone at redhat dot com
  2015-06-25 17:42 ` [Bug tapsets/18598] stap_staticmarkers.stp tapset has no test case dsmith at redhat dot com
@ 2015-06-25 17:42 ` dsmith at redhat dot com
  2015-06-25 18:01 ` [Bug tapsets/18598] stap_staticmarkers.stp tapset has no test case dsmith at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: dsmith at redhat dot com @ 2015-06-25 17:42 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=18598

--- Comment #2 from David Smith <dsmith at redhat dot com> ---
(In reply to Josh Stone from comment #1)
> The more direct way to check existence is "readelf -n", and this is
> revealing:
> 
> $ readelf -n /usr/local/bin/staprun
> readelf: Error: Input file '/usr/local/bin/staprun' is not readable.
> 
> That's because staprun has mode 4110 (suid|xusr|xgrp).  Nobody has read
> permission, which effectively means only root can read it.
> 
> Although you wrote a '#' before your commands, which usually indicates a
> root prompt... Is that so, or were you running as a user?

Ah, that was definitely it. With sudo:

====
# sudo stap -l 'process("staprun").mark("*")' 
process("/usr/bin/staprun").mark("insert__module")
process("/usr/bin/staprun").mark("remove__module")
process("/usr/bin/staprun").mark("send__ctlmsg")
process("/usr/bin/staprun").mark("stap_system__complete")
process("/usr/bin/staprun").mark("stap_system__spawn")
process("/usr/bin/staprun").mark("stap_system__start")
====

I'll still write a buildok test case for this tapset.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tapsets/18598] stap_staticmarkers.stp tapset has no test case
  2015-06-25 15:23 [Bug tapsets/18598] New: staprun markers don't exist dsmith at redhat dot com
                   ` (2 preceding siblings ...)
  2015-06-25 17:42 ` [Bug tapsets/18598] staprun markers don't exist dsmith at redhat dot com
@ 2015-06-25 18:01 ` dsmith at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: dsmith at redhat dot com @ 2015-06-25 18:01 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=18598

David Smith <dsmith at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from David Smith <dsmith at redhat dot com> ---
Test case added in commit f4943fb.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-06-25 18:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-25 15:23 [Bug tapsets/18598] New: staprun markers don't exist dsmith at redhat dot com
2015-06-25 17:15 ` [Bug tapsets/18598] " jistone at redhat dot com
2015-06-25 17:42 ` [Bug tapsets/18598] stap_staticmarkers.stp tapset has no test case dsmith at redhat dot com
2015-06-25 17:42 ` [Bug tapsets/18598] staprun markers don't exist dsmith at redhat dot com
2015-06-25 18:01 ` [Bug tapsets/18598] stap_staticmarkers.stp tapset has no test case dsmith at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).