Thanks everyone, helpful as always. I have tabled this issue for awhile and put in some tracking code where running integrity_check often and logging the results while we continue testing other features. If a problem is detected, the database is then uploaded to a server for investigation.
Some background: This is an embedded Linux device running an ARM9 and flash memory. No changes have been made to the kernel or the JFFS filesystem. SQLite has been running on this same device for years without any problems (version 3.3.13). In fact, we have been extremely happy with the reliability of the product. So I am ruling out filesystem drivers or the OS. Since this has only happened one time (that I know of) and only on one device, I suppose some sort of power anomaly may have caused some miswriting on flash. Not quite sure. I didn't check the logs (and they are now long gone) to see if JFFS encountered any failures. If I figure out what is happening and it's related to SQLite, then I will let everyone know. Thanks for the assistance, Korey On Feb 2, 2012, at 11:38 AM, Roger Binns wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 02/02/12 10:59, Korey Calmettes wrote: >> If I do happen to recreate the problem, is there a way to track the >> location in the file that the corruption begins and how long the >> corruption is? > > Recreating the problem is the hard part since something isn't working the > way it should. You can make very frequent copies of the database plus > frequent runs of pragma integrity check. If it is a bug in SQLite > (extremely unlikely) then the corruption should be deterministic so the > information needed is how to reproduce. > > If it is an issue with other code corrupting memory then using valgrind is > a good idea. > > If it is an OS/hard drive kind of issue then the corruption will be more > random each time due to other system activity. In this case there is > nothing SQLite can do. > > You may want to read this page covering the SQLite file format which will > give you a better idea of how things are laid out: > > http://www.sqlite.org/fileformat2.html > > Roger > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.11 (GNU/Linux) > > iEYEARECAAYFAk8q5jMACgkQmOOfHg372QS1OACglvP9r9q/b9dSt0L0GSz5UbzB > vvkAn0gwNsqjATtALH0zaOFKnxjH0SqB > =5IfV > -----END PGP SIGNATURE----- > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

