public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "me at serhei dot io" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug bpf/26109] New: bug when begin probe exits quickly
Date: Wed, 10 Jun 2020 23:32:05 +0000	[thread overview]
Message-ID: <bug-26109-6586@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 26109
           Summary: bug when begin probe exits quickly
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: bpf
          Assignee: systemtap at sourceware dot org
          Reporter: me at serhei dot io
  Target Milestone: ---

if a bpf begin probe sets exit status, the main thread will skip the pause()
call and immediately deallocate global data structures. Then the
perf_event_loop thread will run on the corrupted data and occasionally fail.
Example result is an assertion failure due count_active_cpus() running on
corrupted data.

Could change the main thread to join() instead of detach(), but then all
threads must be modified to listen for exit status including exit status from
begin thread.

I think if the begin probe was running, it wasn't correct to start the
perf_event_loop (or PERF_EVENT_IOC_ENABLE, or any of the procfs threads) in the
first place, as those things logically happen after the begin probe has already
exited. Simply clean up and exit.

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

             reply	other threads:[~2020-06-10 23:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10 23:32 me at serhei dot io [this message]
2020-06-11  0:41 ` [Bug bpf/26109] " me at serhei dot io
2020-06-11  0:41 ` 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-26109-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).