Tailscale Traces Database Corruption to 16y/o SQLite WAL-Reset Bug
- Databases
- Open Source
- Infrastructure
- Reliability
Tailscale wrote up a months-long investigation into intermittent corruption of shard-local SQLite databases that back parts of its control plane. The root cause was not application logic or flaky hardware. It was a long-hidden SQLite bug in WAL reset handling that could lose pages when a checkpoint raced with a writer across multiple connections. SQLite’s own note says the bug is extremely rare, and commenters largely accepted that framing, but they also pointed out why Tailscale was unusually exposed: it takes manual control of checkpointing and runs it aggressively to support its backup and disaster recovery model. That put it on a supported but lightly traveled path.
If you rely on SQLite outside its common operating path, treat that as a real engineering risk even when the configuration is documented and supported. Budget for upstream support, fault injection, and purpose-built debugging tools before you need them, because rare storage bugs are exactly where generic observability stops being enough.
-
tailscale.com
- Discuss on HN