Recording fails when you bombard the tracee with SIGCONT
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.7k
- Forks
- 662
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 2
Description
If you apply this patch:
diff --git a/src/test/thread_exit_signal.run b/src/test/thread_exit_signal.run
index f39c19ee6..d022b8b1f 100644
--- a/src/test/thread_exit_signal.run
+++ b/src/test/thread_exit_signal.run
@@ -6,11 +6,13 @@ until grep -q ready record.out; do
sleep 0
done
+PID=$(pidof $TESTNAME-$nonce)
for i in $(seq 1 100); do
sleep 0.001
- kill -CHLD $(pidof $TESTNAME-$nonce) >& /dev/null
+ kill -CHLD $PID >& /dev/null
+ kill -CONT $PID >& /dev/null
done
-kill -USR2 $(pidof $TESTNAME-$nonce) >& /dev/null
+kill -USR2 $PID >& /dev/null
# Wait for 'record' to actually terminate. Otherwise we might start
# replaying before the trace file has been completely written.
you get all sorts of failures. It appears that when a PTRACE_SINGLESTEP races with a SIGCONT the kernel reports PTRACE_EVENT_STOP with a SIGTRAP and those can be reported in all sorts of places.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failures with the proposed changes to src/test/thread_exit_signal.run, which repeatedly sends SIGCONT during recording. Trace how PTRACE_SINGLESTEP, SIGCONT, PTRACE_EVENT_STOP, and SIGTRAP are reported, then verify that the test completes reliably without recording failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux
- Domain
- devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100