Squashing the Heisenbug with Deterministic Simulation Testing by Dominik Tornow
ScyllaDB
0 views
46 slides
Oct 09, 2025
Slide 1 of 46
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
About This Presentation
Distributed systems are hard to test, with bugs that are difficult to reproduce and diagnose. This talk introduces Deterministic Simulation Testing, a technique that removes non-determinism to enable exhaustive, reproducible tests. We’ll walk through building a custom simulator, from controlling t...
Distributed systems are hard to test, with bugs that are difficult to reproduce and diagnose. This talk introduces Deterministic Simulation Testing, a technique that removes non-determinism to enable exhaustive, reproducible tests. We’ll walk through building a custom simulator, from controlling time to orchestrating concurrency and failures, and share practical strategies for applying this approach to your own systems.
Size: 8.35 MB
Language: en
Added: Oct 09, 2025
Slides: 46 pages
Slide Content
A ScyllaDB
Community
Squashing the Heisenbug
Dominik Tornow
CEO
Resonate HQ
Dominik Tornow
CEO at Resonate HQ
■Focus on concurrent, distributed systems
■Software Engineer by day
■Author by night
Complex Problems. Simple Code.
Rest in Peace
Distributed Async Await
A language integrated programming model for
concurrent, distributed applications
Concurrency
Non-deterministic partial order
Distribution
Non-deterministic partial failure
P = a • b • c
Q = x • y • z
Sequential Composition
P ; Q
a • b • c • x • y • z
Concurrent Composition
P | Q
a • b • c • x • y • z
a • b • x • c • y • z
a • b • x • y • c • z
a • b • x • y • z • c
a • x • b • c • y • z
a • x • b • y • c • z
a • x • b • y • z • c
a • x • y • b • c • z
a • x • y • b • z • c
a • x • y • z • b • c
x • a • b • c • y • z
x • a • b • y • c • z
x • a • b • y • z • c
x • a • y • b • c • z
x • a • y • b • z • c
x • a • y • z • b • c
x • y • a • b • c • z
x • y • a • b • z • c
x • y • a • z • b • c
x • y • z • a • b • c
Distributed Composition
P | Q | ⊥
a • ⊥
x • ⊥
a • b • ⊥
a • x • ⊥
x • a • ⊥
x • y • ⊥
a • b • c • ⊥
a • b • x • ⊥
a • x • b • ⊥
a • x • y • ⊥
x • a • b • ⊥
x • a • y • ⊥
x • y • a • ⊥
x • y • z • ⊥
a • b • c • x • ⊥
a • b • x • c • ⊥
a • b • x • y • ⊥
a • x • b • c • ⊥
a • x • b • y • ⊥
a • x • y • b • ⊥
a • x • y • z • ⊥
x • a • b • c • ⊥
x • a • b • y • ⊥
x • a • y • b • ⊥
x • a • y • z • ⊥
x • y • a • b • ⊥
x • y • a • z • ⊥
x • y • z • a • ⊥
a • b • c • x • y • ⊥
a • b • x • c • y • ⊥
a • b • x • y • c • ⊥
a • b • x • y • z • ⊥
a • x • b • c • y • ⊥
a • x • b • y • c • ⊥
a • x • b • y • z • ⊥
a • x • y • b • c • ⊥
a • x • y • b • z • ⊥
a • x • y • z • b • ⊥
x • a • b • c • y • ⊥
x • a • b • y • c • ⊥
x • a • b • y • z • ⊥
x • a • y • b • c • ⊥
x • a • y • b • z • ⊥
x • a • y • z • b • ⊥
x • y • a • b • c • ⊥
x • y • a • b • z • ⊥
x • y • a • z • b • ⊥
x • y • z • a • b • ⊥
a • b • c • x • y • z
a • b • x • c • y • z
a • b • x • y • c • z
a • b • x • y • z • c
a • x • b • c • y • z
a • x • b • y • c • z
a • x • b • y • z • c
a • x • y • b • c • z
a • x • y • b • z • c
a • x • y • z • b • c
x • a • b • c • y • z
x • a • b • y • c • z
x • a • b • y • z • c
x • a • y • b • c • z
x • a • y • b • z • c
x • a • y • z • b • c
x • y • a • b • c • z
x • y • a • b • z • c
x • y • a • z • b • c
x • y • z • a • b • c
a • ⊥
x • ⊥
a • b • ⊥
a • x • ⊥
x • a • ⊥
x • y • ⊥
a • b • c • ⊥
a • b • x • ⊥
a • x • b • ⊥
a • x • y • ⊥
x • a • b • ⊥
x • a • y • ⊥
x • y • a • ⊥
x • y • z • ⊥
a • b • c • x • ⊥
a • b • x • c • ⊥
a • b • x • y • ⊥
a • x • b • c • ⊥
a • x • b • y • ⊥
a • x • y • b • ⊥
a • x • y • z • ⊥
x • a • b • c • ⊥
x • a • b • y • ⊥
x • a • y • b • ⊥
x • a • y • z • ⊥
x • y • a • b • ⊥
x • y • a • z • ⊥
x • y • z • a • ⊥
a • b • c • x • y • ⊥
a • b • x • c • y • ⊥
a • b • x • y • c • ⊥
a • b • x • y • z • ⊥
a • x • b • c • y • ⊥
a • x • b • y • c • ⊥
a • x • b • y • z • ⊥
a • x • y • b • c • ⊥
a • x • y • b • z • ⊥
a • x • y • z • b • ⊥
x • a • b • c • y • ⊥
x • a • b • y • c • ⊥
x • a • b • y • z • ⊥
x • a • y • b • c • ⊥
x • a • y • b • z • ⊥
x • a • y • z • b • ⊥
x • y • a • b • c • ⊥
x • y • a • b • z • ⊥
x • y • a • z • b • ⊥
x • y • z • a • b • ⊥
a • b • c • x • y • z
a • b • x • c • y • z
a • b • x • y • c • z
a • b • x • y • z • c
a • x • b • c • y • z
a • x • b • y • c • z
a • x • b • y • z • c
a • x • y • b • c • z
a • x • y • b • z • c
a • x • y • z • b • c
x • a • b • c • y • z
x • a • b • y • c • z
x • a • b • y • z • c
x • a • y • b • c • z
x • a • y • b • z • c
x • a • y • z • b • c
x • y • a • b • c • z
x • y • a • b • z • c
x • y • a • z • b • c
x • y • z • a • b • c
!
!
!
Software Systems
Thinking about Correctness
Specification
Implementation
Software Verification
aims to proof
all traces are within the specification
Software Testing
aims to find
some traces are outside the specification
Software Verification
Will prove the absence of bugs
Software Testing
Can prove the presence of bugs
Software Testing
Thinking about Deterministic Simulation Testing
Increase number
of distinct traces
Increase length
of distinct traces
Ensure reproducibility
of distinct traces
System
SystemApplicationEnvironmentState State
ApplicationEnvironmentState StateAPISimulator
ApplicationSimulatorState StateAPI
The trace is determined by
the initial state of the simulator and the initial state of the system
Simulator
Seed
Simulator
Step
Simulator
Next State
Input
Application
Init State
Application
Step
Application
Next State
Input
Simulator
Step
Simulator
Next State
Application
Step
Application
Next State