10 Nov 2011 19:00
Critical bug in Windows VFS retry logic
Hi,
we found a rather serious bug in the retry logic in Windows VFS in
SQLite 3.7.9. The function winAccess has roughly the following
structure:
while( !(rc = GetFileAttributesExW((WCHAR*)zConverted,
GetFileExInfoStandard,
&sAttrData)) && retryIoerr(&cnt) ){}
if( rc ){
...
}else{
logIoerr(cnt);
if( GetLastError()!=ERROR_FILE_NOT_FOUND ){
winLogError(SQLITE_IOERR_ACCESS, "winAccess", zFilename);
free(zConverted);
return SQLITE_IOERR_ACCESS;
}else{
attr = INVALID_FILE_ATTRIBUTES;
}
}
Note the logIoerr line. It internally calls sqlite3_log, which in turn
can change the "last error" that is checked on the next line.
This results in this totally useless log:
11/10/2011 17:23:46 10 delayed 25ms for lock/sharing conflict
11/10/2011 17:23:46 3338 os_win.c:34346: (0) winAccess(C:\Users\Filip
Navara\AppData\Roaming\eM Client\event_data.dat-journal) - The
(Continue reading)
RSS Feed