Собственно, сабж: https://www.philipotoole.com/how-i-found-a-bug-in-sqlite/ .
During my load testing of Queued Writes, I would sometimes run the rqlite CLI, and keep an eye on test progress by issuing the following command periodically:
127.0.0.1:4001> SELECT COUNT(*) FROM logs
Imagine my surprise when I would occasionally get back:
ERR! database disk image is malformed