Article Summary (Model: gpt-5.6-sol)
Subject: SQLite’s WAL-Reset Race
The Gist:
Tailscale traced 19 SQLite corruption incidents over six months to a 16-year-old race between a write transaction and a WAL checkpoint. Its unusual, aggressive manual checkpointing made the rare condition more likely. With SQLite’s developers and a newly built VFS tracing shim, Tailscale isolated the fault; SQLite added a reset check, and production instrumentation later confirmed that the fix prevented the exact race without corruption.
Key Claims/Facts:
- Failure mechanism: A concurrent write could reset the WAL while checkpointing, causing SQLite to believe pages had been copied when they had not, permanently losing data and corrupting references.
- Forensic breakthrough: Transaction replay exposed committed writes that later vanished, while the
tmstmpvfsshim captured enough filesystem-level detail to identify the race. - Resolution: The fix shipped in 3.51.3 after 3.52.0 was withdrawn over separate false corruption reports involving stale expression indexes; Tailscale then ran four more months incident-free.
Discussion Summary (Model: gpt-5.6-sol)
Consensus: Enthusiastic—the thread praised the unusually candid technical post, SQLite’s overall reliability, and Tailscale’s willingness to fund expert support and open-source debugging infrastructure.
Top Critiques & Pushback:
Better Alternatives / Prior Art:
Expert Context: