Concurrency Testing
summary
New Linux scheduler extensions let users inject schedulers via eBPF and sketex so tests control task ordering instead of trusting the kernel scheduler. A Rust scheduler SCX Chaos randomizes delays (example: 50% chance to delay 130–150 ms) and reliably reproduces a one‑in‑a‑million HSMP driver timeout caused by a 100–2000 µs sleep that became 150 ms under contention. Deployed across ~1M machines it surfaced ~10–20 crashes/day and lets teams find Heisenbugs in hours instead of months.
AI-written summary · about
chapters (15)
- 0:00Introduction to concurrency testing
- 1:24Basics of Linux scheduling
- 3:11Scheduler design goals
- 4:55Heisenbugs and unpredictability
- 5:17Building custom schedulers
- 8:24Simple scheduler implementation
- 9:27SCX Chaos overview
- 9:47Real-world Heisenbug case study
- 10:50Kernel driver bug analysis
- 13:39Fixing the timeout logic
- 14:42Kernel patching challenges
- 15:46Reproducing the bug
- 16:06Demo with SCX Chaos
- 16:49Benefits of SCX Chaos
- 17:31Conclusion and resources
