Tailscale traces a year of database outages to a 16-year-old SQLite bug
Tailscale says a data race buried in SQLite's write-ahead-log checkpointing, present since SQLite 3.7.0 shipped in July 2010, caused the database corruption behind last year's service outages. The bug only surfaces when WAL mode is active with multiple connections hitting the same database file, a rare combination that Tailscale's own practice of manually driving the checkpoint process at an aggressive pace made far more likely to trigger.
Starting in late 2025, Tailscale began seeing repeated database corruption during backup runs with no obvious cause, taking services down each time. Engineer Alex Chan said the issue resisted "all our initial attempts to find it," and pinning it down took six months and a custom virtual file system logging tool, built jointly with SQLite's maintainers, to trace exactly when writes collided with checkpoint activity. SQLite has since shipped a fix, and its maintainers note the bug is extremely unlikely to trigger under a standard configuration, since most software never takes manual control of checkpointing the way Tailscale did.
The case is a reminder that SQLite's reliability reputation rests on staying inside its well-tested defaults. Teams running their own database on a single box without a dedicated ops function get real cost and simplicity wins from that setup, but hand-rolled tuning of a database's internals, checkpoint timing included, is exactly where those wins get paid back in obscure failure modes that take months to trace.