SQLITE crashes at least once a day on a heavily loaded database (database size 
is approximately: 17 GB). On the same server we are running several other 
instances of SQLite that have databases that are much bigger in size with 
approximately the same load, however these are not crashing. The biggest 
difference between the crashing instance and the other databases is that the 
crashing instance uses a table with 11,600,000 rows, where the tables in the 
not-crashing instances don't even come close to this number of rows.

Below you will find our investigations so far. Any ideas on how we could 
further investigate these crashes?

OS: Windows Server 2012 R2 Standard
SQLite version: 3.9.2
Bug report: SQLite crashes at least one time a day. It crashes in the function 
sqlite3DbMallocRaw. The callstack is listed below. The query being prepared is 
always different. A few screenshots of the investigation of the crash dump:
http://www.coachrdevelopment.com/share/SQLiteCrash1.png
http://www.coachrdevelopment.com/share/SQLiteCrash2.png

>             SQLService 1.0.exe!sqlite3DbMallocRaw(sqlite3 * 
> db=0x0000007d1d071c80, unsigned __int64 n=1) Line 21963    C
               SQLService 1.0.exe!sqlite3VMPrintf(sqlite3 * 
db=0x0000007d1d071c80, const char * zFormat, char * ap) Line 23021    C
               SQLService 1.0.exe!sqlite3MPrintf(sqlite3 * db, const char * 
zFormat=0x00007ff6a1ac0660, ...) Line 23039                C
               SQLService 1.0.exe!valueFromExpr(sqlite3 * 
db=0x0000007d1d071c80, Expr * pExpr=0x0000007d7df9b9b0, unsigned char 
enc='\x1', unsigned char affinity='B', Mem * * ppVal=0x0000007d2456e7a8, 
ValueNewStat4Ctx * pCtx=0x0000000000000000) Line 66286 C
               SQLService 1.0.exe!sqlite3ColumnDefault(Vdbe * 
v=0x0000007d70f14250, Table * pTab=0x0000007d3e67e0b0, int i, int iReg=16) Line 
115652         C
               SQLService 1.0.exe!sqlite3ExprCodeGetColumnOfTable(Vdbe * 
v=0x0000007d70f14250, Table * pTab=0x0000007d3e67e0b0, int iTabCur, int 
iCol=12, int regOut=16) Line 87462               C
               SQLService 1.0.exe!sqlite3Update(Parse * 
pParse=0x0000007d79e65df0, SrcList * pTabList=0x0000007d12116540, ExprList * 
pChanges=0x0000007d12116940, Expr * pWhere=0x0000007d121179c0, int onError=10) 
Line 116106              C
               SQLService 1.0.exe!yy_reduce(yyParser * 
yypParser=0x0000007d51fc24c0, int yyruleno=173) Line 128717                C
               SQLService 1.0.exe!sqlite3Parser(void * yyp=0x0000007d51fc24c0, 
int yymajor=1, Token yyminor, Parse * pParse) Line 129602       C
               SQLService 1.0.exe!sqlite3RunParser(Parse * 
pParse=0x0000007d79e65df0, const char * zSql=0x0000007d121159c0, char * * 
pzErrMsg=0x0000007d2456eba8) Line 130352          C
               SQLService 1.0.exe!sqlite3Prepare(sqlite3 * 
db=0x0000007d1d071c80, const char * zSql=0x0000007d599c7c60, int nBytes, int 
saveSqlFlag=1, Vdbe * pReprepare=0x0000000000000000, sqlite3_stmt * * 
ppStmt=0x0000007d2456f718, const char * * pzTail=0x0000000000000000) Line 
108364               C
               SQLService 1.0.exe!sqlite3LockAndPrepare(sqlite3 * 
db=0x0000007d1d071c80, const char * zSql=0x0000007d599c7c60, int nBytes=49, int 
saveSqlFlag=1, Vdbe * pOld=0x0000000000000000, sqlite3_stmt * * 
ppStmt=0x0000007d2456f718, const char * * pzTail=0x0000000000000000) Line 
108465               C
               SQLService 1.0.exe!sqlite3_prepare_v2(sqlite3 * db, const char * 
zSql, int nBytes, sqlite3_stmt * * ppStmt, const char * * 
pzTail=0x0000000000000000) Line 108544              C

Best regards,
Harmen

Reply via email to