DATABASES Signal 510 2 feeds carried it
SQLite WAL-Reset bug let checkpoints discard committed frames for sixteen years
Illustration only Photo by Jinsoo Choi on Unsplash
A stale read allowed SQLite checkpoints to discard committed WAL frames, a bug present for sixteen years, now reproduced with a 100-line C workload that produces lost writes and database corruption within seconds.
This is a data integrity bug in SQLite's WAL mechanism that has existed for sixteen years, meaning any SQLite database using WAL mode could have silently lost committed writes or become corrupted. The fact that it reproduces within seconds using only the public API makes it a practical concern for anyone relying on SQLite for durable storage.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
A stale read caused SQLite checkpoints to discard committed WAL frames, a bug present for sixteen years.
The race condition was reproduced with a 100-line C workload using only the public SQLite API.
Reproduction produced both lost writes and a corrupted database file within seconds.
THE CLUSTER