Bug 19560 - flight recorder mode intermittently fails
Summary: flight recorder mode intermittently fails
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: runtime (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-03 15:11 UTC by David Smith
Modified: 2016-02-10 19:08 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Smith 2016-02-03 15:11:19 UTC
While doing some regression testing, I noticed that the systemtap.base/flightrec4.exp test case is failing intermittently.

The test is supposed to start up stap in the background, writing to a file called flightrec4.out.0. The test case then sends 3 USR2 signals to stapio, to make stapio switch output to flightrec4.out.1, flightrec4.out.2, flightrec4.out.3. When the test fails, the output gets sent instead to: flightrec4.out.0, flightrec4.out.1, flightrec4.out.NUM, flightrec4.out.NUM+1, where NUM is a large number like 54681. Sometimes stapio seems to exit before creating the last output file.

At first I thought the problem might be with the test case itself, but after updating it I've found that isn't the case.

The failures happen quite randomly, I get about 1 failure per 10 test case runs.
Comment 1 David Smith 2016-02-10 19:08:30 UTC
Fixed in commit dc6bf1e. Sometimes the thread handling the signals would also be the reader thread. So, the code ended up sending a signal to itself.