You are not logged in.
Pages: 1
Experienced an error:
ESQLite3Exception {"ErrorCode":11,"SQLite3ErrorCode":12,"Message":"Error SQLITE_CORRUPT (11) [Step] using 3.15.0 - database disk image is malformed, extended_errcode=11"}
Not sure why...
Full error msg below, I'm wondering if anybody have any ideas about...
20161018 21414020 EXC ESQLite3Exception {"ErrorCode":11,"SQLite3ErrorCode":12,"Message":"Error SQLITE_CORRUPT (11) [Step] using 3.15.0 - database disk image is malformed, extended_errcode=11"} at 006A540E SynSQLite3.sqlite3_check (5317) stack trace 00406C32 System.@FreeMem 0040DBE6 System.@DynArrayClear 0079C872 mORMot.TSQLModel.GetTableIndexesFromSQLSelect (32232) 007AFB63 mORMot.TSQLRestServerURIContext.ExecuteORMGet (38666) 007AE538 mORMot.TSQLRestServerURIContext.ExecuteCommand (38323) 0040B56F System.@LStrFromPCharLen 007ADA0A mORMot.TSQLRestServerURIContext.InternalSetTableFromTableName (38111) 0067477D SynCommons.SortDynArrayAnsiStringI (41926) 007B438E mORMot.TSQLRestServer.URI (39873) 0067DA82 SynCommons.TTextWriter.AddPointer (46786) 0090F457 mORMotHttpServer.TSQLHttpServer.Request (929) 008F79FF SynCrtSock.THttpServerGeneric.Request (3954) 008FC635 SynCrtSock.THttpApiServer.Execute (6408) 004A925D madExcept.HookedTThreadExecute (17342) 00538FF9 System.Classes.ThreadProc 0040B216 System.ThreadWrapper 004A9143 madExcept.CallThreadProcSafe (17277) 004A91AB madExcept.ThreadExceptFrame (17325)
20161018 21414022 ERROR DbSvr.TDbSvr(042175E0) {"ESQLite3Exception(026D01D0)":{"ErrorCode":11,"SQLite3ErrorCode":"secCORRUPT","Message":"Error SQLITE_CORRUPT (11) [Step] using 3.15.0 - database disk image is malformed, extended_errcode=11"}} for (SQL eliminated here...) stack trace API 0079F6C8 mORMot.TSQLRest.InternalLog (33183) 0090028E mORMotSQLite3.TSQLRestServerDB.GetAndPrepareStatementRelease (819) 00902326 mORMotSQLite3.TSQLRestServerDB.MainEngineList (1336) 007AFB63 mORMot.TSQLRestServerURIContext.ExecuteORMGet (38666) 007AE538 mORMot.TSQLRestServerURIContext.ExecuteCommand (38323) 007B438E mORMot.TSQLRestServer.URI (39873) 0090F457 mORMotHttpServer.TSQLHttpServer.Request (929) 008F79FF SynCrtSock.THttpServerGeneric.Request (3954) 004A925D madExcept.HookedTThreadExecute (17342) 00538FF9 System.Classes.ThreadProc 0040B216 System.ThreadWrapper 004A9143 madExcept.CallThreadProcSafe (17277) 004A91AB madExcept.ThreadExceptFrame (17325)
Thanks!
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
I got this error when I use (by mistake) non thread-safe SQLite connection in multi-threaded server.
After some time the database has been corrupted.
My mistake: http://synopse.info/forum/viewtopic.php?id=3352
Offline
I discover such errors (sometimes) in case SynchronousMode <> Full and I shut down server, quickly copy the database and run a server with a database copy. I think this is because windows not flush a disk buffers.
Last edited by mpv (2016-10-18 15:38:58)
Offline
@ab, No, I'm not using any database-level encryption.
@mpv, Just checked, In my program, TSQLRestServerDB.Synchronous is set to smFull;// to ensure max data stability!
@chaa, If I understand you correctly - I'm not using RemoteDataCreate() nor TSQLDBSQLite3ConnectionProperties (nor its decadent classes) directly.
PS, My win7 has the latest updated, and the db file is inside a TrueCrypt 7.1a virtual disk, but I don't think it's the problem, since I've been using TrueCrypt for over 10 years now, it's extremely stable.
And another extended question - Is it possible to cause database corruption if the program accessing it is killed by the Windows Task Manager?
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
I suspect that database corruption can occur if you kill a process.
Like for any database corruption.
Even if smFull should reduce the risk.
See https://www.sqlite.org/howtocorrupt.html
In all cases, ensure you delete the journal files before re-starting it.
Offline
I use the .obj files - it's statically linked.
@ab, yes, I've been using mORMot for a long time, and this is the first time i had such situation.
PS, the db file is not entirely corrupted - Some tables are completely ok, while one of the tables will emit the originally posted error message in the server log, but, some of the record data can still be read from that so-called malfunctioned table...
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Pages: 1