Reddit
Tailscale's Six-Month Corruption Hunt Ends in a 16-Year-Old SQLite WAL-Reset Bug Present Since Version 3.7.0
Tailscale traced last year's outages — database corruption, transaction logs that would not apply cleanly, inconsistent checkpoint statistics — to a WAL-Reset bug that SQLite maintainers date back to version 3.7.0 in July 2010. It fires only in WAL mode with multiple connections on the same file, when reading and writing hit the same memory location simultaneously; Tailscale's use of manual checkpoints was the rare pattern that triggered it. Tailscale funded a new VFS-activity logging tool to find it, and the fix adds a check detecting when the WAL was reset by another thread. Anyone running manual checkpoints on a multi-connection WAL database should upgrade.
Source
↳ Follow the thread