This post has NOT been accepted by the mailing list yet.
We're now at a stage where we can reproduce SQLITE catalog corruption on OSX pretty much at will - even while our app is closed!
a) Run our app - this causes stuff to be written to the database
b) Close our app & wait for the .wal file to disappear AND the app to disappear from activity monitor
c) Hard reboot OSX
Observe: Catalog corruption - 25% of the time.
Without the Hard reboot our database always survives. You can gracefully shutdown, pkill it, force terminate, crash it - it all survives. However, once you hard reboot OSX - even AFTER the app is closed - it has a very decent probability of corrupting our database.
We've had a worse case scenario today where the hard reboot followed an app graceful shutdown by 12 hours, and it still corrupted the database!
This is so easy to reproduce I'm not sure why this isn't reported as a large-scale problem? But I'm not seeing that. It also only reproduces on OSX (both El Capitan and Mavericks) - Android, iOS, PC all work fine.
I verified that F_FULLFSYNC and HAVE_FULLFSYNC is set in our build. We use WAL/FULL.