public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "sapatel at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug bpf/25218] New: stapbpf losing perf_events
Date: Fri, 22 Nov 2019 23:13:00 -0000	[thread overview]
Message-ID: <bug-25218-6586@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 25218
           Summary: stapbpf losing perf_events
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: bpf
          Assignee: systemtap at sourceware dot org
          Reporter: sapatel at redhat dot com
  Target Milestone: ---

When there is frequent output from a script, it appears that stapbpf loses some
perf_events which leads to errors. Consider the script below.

global count

probe kernel.function("vfs_read") {

    count++

    printf("Beginning: %d\n", count)
    printf("Middle: %d\n", count)
    printf("End: %d\n", count)

}

Output:

...
...
Beginning: 13700
Middle: 13700
End: 13700
Beginning: 13701
Middle: 13701
End: 13701
WARNING: lost 359 perf_events on cpu 2
bpfinterp.cxx:421: printf already started
WARNING: /home/sapatel/stap_head/install/bin/stapbpf exited with signal: 6
(Aborted)

However, if the output is redirected to a file instead, the perf_events are not
lost, and the script proceeds as expected.

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

             reply	other threads:[~2019-11-22 23:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22 23:13 sapatel at redhat dot com [this message]
2019-11-22 23:16 ` [Bug bpf/25218] " sapatel at redhat dot com
2019-11-22 23:46 ` [Bug bpf/25218] stapbpf loses perf_events when writing to interactive terminal me at serhei dot io
2019-11-25 18:22 ` me at serhei dot io

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=bug-25218-6586@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --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).