Hi,

I'm using Sqlite 3.6.22 Froyo Branch on Android 2.3.4 distribution on a handset 
with eMMC storage memory.
In case of power-cut (battery removal or kernel panic), we encounter some rare 
but critical errors during database rollback sequence: journal file is 
corrupted:
# sqlite3 contacts2.db
sqlite> PRAGMA integrity_check;
PRAGMA integrity_check;
Error: disk I/O error

After analyzing the journal header, it appears that:
- the header contains the right signature
- the page number is greater than what the file can contain. (ex: page nb=4 so 
journal size should be = 512+4x1024=4608 B but is currently 3608 B).

The file system is Ext3/write-back/barrier=1.

I've read carefully Sqlite documentation concerning Journal management 
(http://www.sqlite.org/atomiccommit.html), with all fsync considerations, it 
seems robust.

What could explain my issue?

NB1: eMMC sector size is 1024B, is-it necessary to patch Sqlite to use this 
size instead of 512?
NB2: I will switch Ext3 FS to "ordered" mode, without being sure it will solve 
the issue.

Thanks,

Emmanuel BERTHIER
Intel.

---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to