This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug runtime/10854] New: Race between script startup and abnormal shutdown


We have a race condition where the shutdown code may be called while the startup
is still in progress.  Since the shutdown thinks the probes aren't started, we
end up leaving some kernel callbacks registered after the module has unloaded,
which will crash the system.

See also https://bugzilla.redhat.com/show_bug.cgi?id=521610

Using para-callgraph2.stp from that bug, the problem can be reproduced with this
loop:

MOD=$(stap -v para-callgraph2.stp sys_read '*@fs/*.c' -p4) && \
while true; do
    staprun $MOD -v -o /dev/null &
    while ! pkill -INT stapio; do true; done
    wait
done

That will repeatedly run the script in the background and kill it as soon as
possible.  I find that it usually triggers the race in only a few iterations.

-- 
           Summary: Race between script startup and abnormal shutdown
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: jistone at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=10854

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]