From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 330EC385E830; Wed, 10 Jun 2020 23:32:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 330EC385E830 From: "me at serhei dot io" To: systemtap@sourceware.org Subject: [Bug bpf/26109] New: bug when begin probe exits quickly Date: Wed, 10 Jun 2020 23:32:05 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: bpf X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: me at serhei dot io X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: systemtap@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Systemtap mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2020 23:32:05 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26109 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 fr= om 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 alr= eady exited. Simply clean up and exit. --=20 You are receiving this mail because: You are the assignee for the bug.=