public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Re: systemtap doesn't run
@ 2019-09-12 12:30 Mark Wielaard
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2019-09-12 12:30 UTC (permalink / raw)
  To: systemtap

[-- Attachment #1: Type: text/plain, Size: 85 bytes --]

Forwarding this discussion, since I forgot to properly CC the
systemtap list earlier.

[-- Attachment #2: Type: message/rfc822, Size: 5939 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 2240 bytes --]

On Fri, Sep 6, 2019 at 10:37 PM Mark Wielaard <mjw@fedoraproject.org> wrote:

> Hi Jan,
>
> CC systemtap upstream list, because I think this is not a great error
> message.
>
> On Fri, 2019-09-06 at 09:53 +0200, Jan Synacek wrote:
> > I'm trying to run systemtap on F29 and I'm getting the following
> > error:
> >
> > $ sudo stap -v journal.stap
> > Pass 1: parsed user script and 491 library scripts using
> > 355824virt/129076res/9628shr/119256data kb, in 290usr/40sys/334real ms.
> > semantic error: while resolving probe point: identifier 'process' at
> > journal.stap:1:7
> >         source: probe
> >
> process("/usr/lib/systemd/systemd-journald").function("dispatch_message_real")
> > {
> >                       ^
> >
> > semantic error: no match (similar functions: read, free, getenv,
> page_size,
> > safe_atoi)
> >
> > So, 'process' is not a valid identifier? There seems to be something
> wrong
> > with the basic systemtap installation. I do have matching debuginfo for
> > both kernel and systemd installed. Running stap-prep only wants to
> install
> > kernel-debuginfo.
> >
> > How do I make this basic use-case work?
>
> It is a bit hard to say, because you didn't include journal.stap.
> But I can replicate what you get with:
>
> stap -v -e 'probe
> process("/usr/lib/systemd/systemd-journald").function("dispatch_message_real")
> { log ("hit"); }'
>
> You get that error message if stap cannot find that function symbol.
> So first that ^ carrot should really not be at "process", but at
> "function" (or really "dispatch_message_real").
>

> stap really should tell you how to get that symbol. By installing the
> matching debuginfo package.
>

Right, so this is really the problem. The error message is simply wrong
plus it doesn't say that the debug symbols actually don't match.

$ rpm -q systemd systemd-debuginfo
systemd-239-13.gitf4afb95.fc29.x86_64
systemd-debuginfo-239-3.fc29.x86_64

For some reason, I thought that the debuginfo matched the systemd version.
Sorry about the misinformation. The fact that dnf considers these two
versions a match and doesn't install the correct version is another issue.

Thank you for pointing me to the right direction.

Regards,
-- 
Jan Synacek
Software Engineer, Red Hat

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

* Re: systemtap doesn't run
       [not found] <CAPsXM8Vru1a1M7Q4tj8jkL99o+1_jz7JA86Nq-8a__rKPbkV_A@mail.gmail.com>
@ 2019-09-06 20:38 ` Mark Wielaard
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2019-09-06 20:38 UTC (permalink / raw)
  To: Development discussions related to Fedora; +Cc: Jan Synacek, systemtap

Hi Jan,

CC systemtap upstream list, because I think this is not a great error
message.

On Fri, 2019-09-06 at 09:53 +0200, Jan Synacek wrote:
> I'm trying to run systemtap on F29 and I'm getting the following
> error:
> 
> $ sudo stap -v journal.stap
> Pass 1: parsed user script and 491 library scripts using
> 355824virt/129076res/9628shr/119256data kb, in 290usr/40sys/334real
> ms.
> semantic error: while resolving probe point: identifier 'process' at
> journal.stap:1:7
>         source: probe
> process("/usr/lib/systemd/systemd-
> journald").function("dispatch_message_real")
> {
>                       ^
> 
> semantic error: no match (similar functions: read, free, getenv,
> page_size,
> safe_atoi)
> 
> So, 'process' is not a valid identifier? There seems to be something
> wrong
> with the basic systemtap installation. I do have matching debuginfo
> for
> both kernel and systemd installed. Running stap-prep only wants to
> install
> kernel-debuginfo.
> 
> How do I make this basic use-case work?

It is a bit hard to say, because you didn't include journal.stap.
But I can replicate what you get with:

stap -v -e 'probe process("/usr/lib/systemd/systemd-
journald").function("dispatch_message_real") { log ("hit"); }'

You get that error message if stap cannot find that function symbol.
So first that ^ carrot should really not be at "process", but at
"function" (or really "dispatch_message_real").

stap really should tell you how to get that symbol. By installing the
matching debuginfo package.

You also get that message if the debuginfo and main package don't match
up. I had:

$ rpm -q systemd-debuginfo systemd
systemd-debuginfo-241-12.git1e19bcd.fc30.x86_64
          systemd-241-10.git511646b.fc30.x86_64

The full version-release number should be identical.

After updating the systemd package, so it matched the systemd-
debuginfo 
package, things finally started to work.

[mark@f30 ~]$ stap -e 'probe process("/usr/lib/systemd/systemd-
journald").function("dispatch_message_real") { log ("hit"); }'
hit
hit
hit

Cheers,

Mark

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

end of thread, other threads:[~2019-09-12 12:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-12 12:30 systemtap doesn't run Mark Wielaard
     [not found] <CAPsXM8Vru1a1M7Q4tj8jkL99o+1_jz7JA86Nq-8a__rKPbkV_A@mail.gmail.com>
2019-09-06 20:38 ` Mark Wielaard

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).