rr-debugger / rr-debugger/rr

Find a way to test breakpoints interrupting async signals

Open
#100 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.7k
Forks
662
Avg merge
2d 3h
Merged PRs (30d)
2

Description

To test interrupting a signal event, we have to construct a trace like

(some trace event)
ensure that a specific function is called, that we break on
signal-delivered event

It's really easy to do this for synchronous signals, since we can arrange for a synchronous interrupt right after calling our function. It's also pretty easy to test interrupting time-slice pseudo-signals, because a program can call the magic function and then just spin the CPU until the hpc fires.

It's much harder to test interruption from an async signal, reliably. The signal has to be delivered by a program external to the test, or else the raise() event will come between the breakpoint and the signal delivery. So we have to spin CPU to receive the signal, but then if we do, then we can't reliably call the breakpoint function before the signal arrives or we might see a time-slice pseudo-signal.

In the near future, the async signal code will look almost exactly like the time-slice interrupt code, so this won't be a huge problem.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named in the issue. Start by locating the existing synchronous-signal and time-slice pseudo-signal breakpoint tests, then determine how async signal delivery is represented in the test traces. Done means a reliable test can exercise a breakpoint interrupted by an async signal without depending on timing races.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.