SQLite WAL-reset database corruption bug

29 points by cve 10 hours ago on lobsters | 4 comments

Based on available telemetry, the occurrence rate of this problem in the wild appears to be less than or equal to the expect occurrence rate of SSD malfunctions and/or cosmic-ray hits.

SQLite - statistically more reliable than the hardware you are running it on.

[OP] cve | 10 hours ago

Unfortunately, there does not seem to be much documentation on this.

The merge commit fixing this is 7168988acbec2d8d. According to the test contained there, it seems to happen under a race condition with tight timing guarantees.

jtdowney | 9 hours ago

I guess we have different experiences with projects documenting bugs. This appears to be a whole page about the bug. While I get that it doesn't go very deep into the technical details and production steps, I feel like it's much more detailed than many open-source project bug reports.

masklinn | an hour ago

The link outright states that and the page says it was last updated 5 days ago:

The bug is a data race with tight timing constraints. It is unlikely to occur in common use. The developers have never been able to reproduce the bug organically and had to add special testing logic to SQLite that deliberately triggers the circumstances of the the bug in order to verify that the issue has been fixed.

it also gives the entire sequence of events which can trigger the issue.