[Paper Review] Execution replay and debugging
This paper presents a comprehensive survey of execution replay techniques for debugging non-deterministic parallel and distributed programs, proposing a two-phase approach: recording program execution traces during a run and deterministically replaying them for debugging. The key contribution is enabling standard cyclic debugging tools to work on inherently non-deterministic systems by capturing and replaying execution events with minimal performance overhead using techniques like vector clocks and message tracing.
As most parallel and distributed programs are internally non-deterministic -- consecutive runs with the same input might result in a different program flow -- vanilla cyclic debugging techniques as such are useless. In order to use cyclic debugging tools, we need a tool that records information about an execution so that it can be replayed for debugging. Because recording information interferes with the execution, we must limit the amount of information and keep the processing of the information fast. This paper contains a survey of existing execution replay techniques and tools.
Motivation & Objective
- Address the lack of effective debugging tools for hand-written parallel and distributed programs, which are inherently non-deterministic.
- Overcome the limitations of traditional debuggers that fail on non-deterministic behavior (e.g., Heisenbugs) due to timing interference.
- Enable the use of standard cyclic debugging techniques—like breakpoints and data race detection—on parallel and distributed programs via deterministic replay.
- Identify and classify sources of non-determinism in sequential, parallel, and distributed programs to guide trace collection and replay design.
- Survey and evaluate existing execution replay methods, focusing on minimizing performance and storage overhead while ensuring replay determinism.
Proposed method
- Use a two-phase execution replay model: record a program execution trace during a normal run, then deterministically replay it using the same input and recorded events.
- Apply vector clocks to track causal relationships between events and detect data races during replay, especially in shared-memory systems.
- Employ snooped matrix clocks to reduce memory overhead during data race detection by discarding causally irrelevant memory operations.
- Instrument message-passing libraries (e.g., MPI, PVM) to log send and receive operations, including non-blocking test operations, to ensure replay determinism.
- For promiscuous receive operations, record the actual sender to replace them with point-to-point receives during replay, eliminating non-determinism.
- Use tagged messages and checkpoints to simulate or partially replay executions, particularly in distributed systems like PVM or hybrid systems such as Athapascan.
Experimental results
Research questions
- RQ1How can non-deterministic behavior in parallel and distributed programs be captured and replayed deterministically to enable standard debugging?
- RQ2What are the primary sources of non-determinism in parallel and distributed programs, and how do they differ from those in sequential programs?
- RQ3What techniques minimize performance and storage overhead while ensuring accurate and complete replay of program executions?
- RQ4How can message-passing systems with promiscuous receive operations be made deterministic during replay?
- RQ5Why is input replay still an unsolved problem in execution replay despite progress in trace and message logging?
Key findings
- Execution replay enables standard cyclic debugging tools to be used on non-deterministic parallel and distributed programs by making replay executions deterministic.
- Vector clocks are effective for detecting data races during replay by tracking causal dependencies between memory operations.
- Snooped matrix clocks significantly reduce memory overhead in data race detection by discarding causally irrelevant operations.
- Message logging in message-passing systems (e.g., MPI, PVM) allows deterministic replay, but non-blocking test operations must be explicitly recorded to ensure correctness.
- Promiscuous receive operations can be made deterministic by logging the actual sender, allowing replay to substitute them with point-to-point receives.
- Despite progress, no existing tool fully supports deterministic replay of program input (e.g., keyboard, file I/O), leaving a critical gap in the debugging pipeline.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.