public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: David Smith <dsmith@redhat.com>
To: lberk@redhat.com
Cc: systemtap <systemtap@sourceware.org>,
	Anton Kiryushkin <swood@fotofor.biz>
Subject: Re: freezes stap
Date: Mon, 23 Jul 2018 20:01:00 -0000	[thread overview]
Message-ID: <CAKFOr-Yc++fbfN_FOtP8enV7sP10RrbG7jjbSGMHk+uxXBXsjw@mail.gmail.com> (raw)
In-Reply-To: <87y3e26ngs.fsf@redhat.com>

That's a reasonable thought, but assume the following script:

stap -ve 'probe kernel.function("vfs_read") { printf("VFS_READ\n") }
probe process("/usr/bin/foo").begin { printf("FOO\n") }  probe
module("bar").function("baz") { printf("BAZ\n") }''

In the case of kernel.function probes, a registration error is final.
We won't ever find that kernel function if we don't find it on a stap
module load. (Of course the weird thing here is that module wouldn't
have gotten compiled unless we found vfs_read() in the kernel
debuginfo, but yet for some reason we couldn't actually attach the
probe.)

In the case of a user process, if /usr/bin/foo isn't running right
now, that isn't an error. The stap module will hang around and wait
for /usr/bin/foo to be run and then attach to it.

In the case of a loadable kernel module, if module "bar" isn't loaded
right now, that isn't an error. The stap module will hang around and
wait for module "bar" to be loaded and then the probe will get
attached.

Basically, each probe type has its own rules. Plus the probe types
don't really know about each other. Doing what you suggest might be
doable, but tricky.

On Mon, Jul 23, 2018 at 9:22 AM Lukas Berk <lberk@redhat.com> wrote:
>
> Hi,
>
> A somewhat tangential thought,
>
> David Smith <dsmith@redhat.com> writes:
> >>> 2) WARNING: probe kernel.function("vfs_read@../fs/read_write.c:418")
> >>> (address 0xffffffff95232f70) registration error (rc -84)
> >>>
> >>> That one is fairly fatal. Your probe couldn't be registered, and
> >>> returned -84. Since your probe couldn't be registered, the module
> >>> won't really do anything.
>
> From a usability standpoint, could we possibly keep track of the number
> of targeted probe points vs successfully registered probe points?  In
> the event none exist, perhaps it'd be worthwhile to exit on our own
> volition.  It might spare users the extra time trying to debug the issue
> with a message elaborating on why (ie, no probe points actually
> registered, nothing for us to do).
>
> Cheers,
> Lukas



-- 
David Smith
Associate Manager
Red Hat

  reply	other threads:[~2018-07-23 20:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-19 15:38 Anton Kiryushkin
2018-07-19 20:39 ` David Smith
2018-07-19 20:47   ` Anton Kiryushkin
2018-07-19 20:54     ` David Smith
2018-07-23 14:22       ` Lukas Berk
2018-07-23 20:01         ` David Smith [this message]
2018-07-23 20:48           ` Lukas Berk
2018-07-26 15:24             ` Anton Kiryushkin
2018-07-26 19:07               ` David Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKFOr-Yc++fbfN_FOtP8enV7sP10RrbG7jjbSGMHk+uxXBXsjw@mail.gmail.com \
    --to=dsmith@redhat.com \
    --cc=lberk@redhat.com \
    --cc=swood@fotofor.biz \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).