Hi,
I have a crash at sqlite when reading a row in database (detailed
stacktrace in the attachment). It happens rarely in our customer machine.
We cannot reproduce it.
Can you please give some suggestions when this can happen and maybe how to
fix it.
FAULTING_SOURCE_LINE:
c:\jenkins\workspace\cortexv2-dev-win64-service-release\src\thirdparty\couchbase-lite-core-ee\encryption\see-sqlite.c
FAULTING_SOURCE_FILE:
c:\jenkins\workspace\cortexv2-dev-win64-service-release\src\thirdparty\couchbase-lite-core-ee\encryption\see-sqlite.c
FAULTING_SOURCE_CODE:
27014: p = sqlite3Malloc(n);
27015: sqlite3MemdebugSetType(p, MEMTYPE_HEAP);
27016: return p;
27017: }
>27018: SQLITE_PRIVATE void *sqlite3DbMallocRawNN(sqlite3 *db, u64 n){
27019: #ifndef SQLITE_OMIT_LOOKASIDE
27020: LookasideSlot *pBuf;
27021: assert( db!=0 );
27022: assert( sqlite3_mutex_held(db->mutex) );
27023: assert( db->pnBytesFreed==0 );
Thanks in advance!
Tham
0:002> !analyze -v
*******************************************************************************
* *
* Exception Analysis *
* *
*******************************************************************************
DBGHELP: CortexSync is not source indexed
KEY_VALUES_STRING: 1
Key : AV.Fault
Value: Read
Key : Analysis.CPU.Sec
Value: 2
Key : Analysis.Elapsed.Sec
Value: 2
Key : Analysis.Memory.CommitPeak.Mb
Value: 241
Key : Timeline.Process.Start.DeltaSec
Value: 248587
PROCESSES_ANALYSIS: 1
SERVICE_ANALYSIS: 1
STACKHASH_ANALYSIS: 1
TIMELINE_ANALYSIS: 1
Timeline: !analyze.Start
Name: <blank>
Time: 2019-08-20T02:25:04.331Z
Diff: 49973331 mSec
Timeline: Dump.Current
Name: <blank>
Time: 2019-08-19T12:32:11.0Z
Diff: 0 mSec
Timeline: Process.Start
Name: <blank>
Time: 2019-08-16T15:29:04.0Z
Diff: 248587000 mSec
DUMP_CLASS: 2
DUMP_QUALIFIER: 400
MODLIST_WITH_TSCHKSUM_HASH: 541741c89a051e310b02fe9f0b09fd1f0ec66a1e
MODLIST_SHA1_HASH: d07b886ffebb02fe5da54f0cb2c800255a535147
DUMP_FLAGS: 0
DUMP_TYPE: 2
CONTEXT: (.ecxr)
rax=0000000000000004 rbx=0000025e7e981cc0 rcx=0040025e7e94c7a0
rdx=000000000000024a rsi=000000000000024a rdi=0000000000000000
rip=00007ff663b610d0 rsp=000000e1e63fabf8 rbp=000000e1e63fad30
r8=0000000000000000 r9=0000000000000001 r10=0000000000000001
r11=0000025e7e0176d0 r12=0000000000000272 r13=0000000000000001
r14=0000025e7ebf41e0 r15=0000025e7e981cc0
iopl=0 nv up ei pl nz na po nc
cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010206
CortexSync!sqlite3DbMallocRawNN:
00007ff6`63b610d0 83b97001000000 cmp dword ptr [rcx+170h],0
ds:0040025e`7e94c910=????????
Resetting default scope
FAULTING_IP:
CortexSync!sqlite3DbMallocRawNN+0
[c:\jenkins\workspace\cortexv2-dev-win64-service-release\src\thirdparty\couchbase-lite-core-ee\encryption\see-sqlite.c
@ 27018]
00007ff6`63b610d0 83b97001000000 cmp dword ptr [rcx+170h],0
EXCEPTION_RECORD: (.exr -1)
ExceptionAddress: 00007ff663b610d0 (CortexSync!sqlite3DbMallocRawNN)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 0000000000000000
Parameter[1]: ffffffffffffffff
Attempt to read from address ffffffffffffffff
DEFAULT_BUCKET_ID: INVALID_POINTER_READ
PROCESS_NAME: CortexSync.exe
FOLLOWUP_IP:
CortexSync!sqlite3DbMallocRawNN+0
[c:\jenkins\workspace\cortexv2-dev-win64-service-release\src\thirdparty\couchbase-lite-core-ee\encryption\see-sqlite.c
@ 27018]
00007ff6`63b610d0 83b97001000000 cmp dword ptr [rcx+170h],0
READ_ADDRESS: ffffffffffffffff
ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory
at 0x%p. The memory could not be %s.
EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced
memory at 0x%p. The memory could not be %s.
EXCEPTION_CODE_STR: c0000005
EXCEPTION_PARAMETER1: 0000000000000000
EXCEPTION_PARAMETER2: ffffffffffffffff
WATSON_BKT_PROCSTAMP: 5d42a593
WATSON_BKT_MODULE: CortexSync.exe
WATSON_BKT_MODSTAMP: 5d42a593
WATSON_BKT_MODOFFSET: 4610d0
BUILD_VERSION_STRING: 18362.1.amd64fre.19h1_release.190318-1202
ANALYSIS_SESSION_HOST: DESKTOP-ICB5G90
ANALYSIS_SESSION_TIME: 08-20-2019 09:25:04.0331
ANALYSIS_VERSION: 10.0.18914.1001 amd64fre
THREAD_ATTRIBUTES:
BUGCHECK_STR: APPLICATION_FAULT_INVALID_POINTER_READ
PRIMARY_PROBLEM_CLASS: APPLICATION_FAULT
PROBLEM_CLASSES:
ID: [0n313]
Type: [@ACCESS_VIOLATION]
Class: Addendum
Scope: BUCKET_ID
Name: Omit
Data: Omit
PID: [Unspecified]
TID: [0x3220]
Frame: [0] : CortexSync!sqlite3DbMallocRawNN
ID: [0n285]
Type: [INVALID_POINTER_READ]
Class: Primary
Scope: DEFAULT_BUCKET_ID (Failure Bucket ID prefix)
BUCKET_ID
Name: Add
Data: Omit
PID: [Unspecified]
TID: [0x3220]
Frame: [0] : CortexSync!sqlite3DbMallocRawNN
LAST_CONTROL_TRANSFER: from 00007ff663b90ffa to 00007ff663b610d0
STACK_TEXT:
000000e1`e63fabf8 00007ff6`63b90ffa : 0000025e`7ebf4288 0000025e`7e981c88
000000e1`e63fad30 00000000`00000017 : CortexSync!sqlite3DbMallocRawNN
000000e1`e63fac00 00007ff6`63b899e3 : 00000000`00000248 0000025e`7ead1d8c
0000025e`7e981a30 0000025e`00f1b5c0 : CortexSync!sqlite3VdbeMemGrow+0x5a
000000e1`e63fac30 00007ff6`63b83c42 : 0000025e`7eb0cb34 0000025e`7e94c7a0
0000025e`7e0176d0 00000000`00000000 : CortexSync!sqlite3VdbeExec+0x1703
000000e1`e63faf40 00007ff6`63ba28e1 : 00000000`00000000 0000025e`7e0176d0
0000025e`7e945060 00000000`00000000 : CortexSync!sqlite3Step+0xe2
000000e1`e63faf70 00007ff6`63c08408 : 00000000`00000000 0000025e`7e945060
00000000`00000000 0000025e`7e945060 : CortexSync!sqlite3_step+0x51
000000e1`e63fafa0 00007ff6`63c0cff7 : 0000025e`7e9f8a50 0000025e`7e9f8a50
00000000`00000000 00007ff6`647f3ed8 :
CortexSync!SQLite::Statement::executeStep+0x38
000000e1`e63fb020 00007ff6`63c03700 : 0000025e`7e9f8a50 0000025e`7e945060
000000e1`e63fb340 0000025e`7e9f8a50 :
CortexSync!litecore::SQLiteKeyStore::read+0x77
000000e1`e63fb080 00007ff6`63c02e07 : 0000025e`7e9f8b00 0000025e`7ef7a430
0000025e`7e9f8ab8 00007ff6`63bc32a5 :
CortexSync!litecore::VersionedDocument::read+0x20
000000e1`e63fb0b0 00007ff6`63bd4a6f : 0000025e`7e9f8a50 0000025e`7e9f8b50
0000025e`7e017340 0000025e`7e972f90 :
CortexSync!litecore::VersionedDocument::VersionedDocument+0x97
000000e1`e63fb100 00007ff6`63c4eeb6 : 0000025e`7e945ae0 000000e1`e63fb418
0000025e`7e9f89a0 00007ff6`647f3ed8 :
CortexSync!c4Internal::TreeDocumentFactory::newDocumentInstance+0x8f
000000e1`e63fb160 00007ff6`63c4f008 : 0000025e`7e945ae0 000000e1`e63fb418
00000000`00000000 00007ff8`7c4c5f0c :
CortexSync!fleece::function_ref<C4Document * __ptr64
__cdecl(void)>::callback_fn<<lambda_b99f742276d2e1edf1aedf8b88c20445> >+0x36
000000e1`e63fb1a0 00007ff6`63c50539 : 000000e1`e63fb330 00007ff6`647f3ed8
000000e1`e63fb418 00007ff8`7c4c90f4 :
CortexSync!c4Internal::tryCatch<C4Document * __ptr64>+0x18
000000e1`e63fb1e0 00007ff6`63c7d335 : 0000025e`7e017340 0000025e`7ea36a50
0000025e`7deb0001 000000e1`e63fb330 : CortexSync!c4doc_get+0x59
000000e1`e63fb240 00007ff6`638f2aa8 : 000000e1`e63fb4f0 00007ff6`6387eb5a
0000025e`7dff7bf0 000000e1`e63fb418 :
CortexSync!Emotiv::Common::CouchBaseNative::CouchDatabaseNative::getDocument+0xb5
000000e1`e63fb3b0 00007ff6`6389e5e6 : 0000025e`7dff7bf0 0000025e`7dff7bf0
000000e1`e63fb560 00007ff8`c2aef87b :
CortexSync!Cortex::Storage::CouchBase::CouchDriver::getDoc+0x28
000000e1`e63fb3f0 00007ff6`637e85a4 : 000000e1`e63fb578 000000e1`e63fb560
0000025e`7ea369b0 000000e1`e63ff128 :
CortexSync!Cortex::Storage::NoSQLDatabaseWrapper::getCurrentUser+0x76
000000e1`e63fb530 00007ff6`637e42ff : 00000000`00000000 00000000`00000000
0000025e`7ea2e690 00007ff8`7c6986c0 :
CortexSync!Cortex::CloudSync::ProfileSyncManager::fetchMetadata+0x94
000000e1`e63fb760 00007ff8`7c6af9f8 : 0000025e`7ea2e750 00000000`00000000
00000000`00000000 00000000`00000000 :
CortexSync!Cortex::CloudSync::SyncManagerBase::startSync+0xf
000000e1`e63fb790 00007ff8`7c688f47 : 0000025e`7dfdcee0 ffffffff`fffffffe
0000025e`7e944dd0 00007ff8`7c4d17f1 : Qt5Core!QObject::event+0x68
000000e1`e63fb930 00007ff8`7c689009 : 0000025e`0121f9c0 000000e1`e63fba28
0000025e`7dfdcf04 000000e1`e63ff128 : Qt5Core!QCoreApplication::notify+0x67
000000e1`e63fb980 00007ff8`7c6d47bb : 00000243`18b27656 0000025e`7e457170
0000025e`0121f9c0 00007ff8`c4723cae :
Qt5Core!QCoreApplication::notifyInternal2+0xb9
000000e1`e63fba00 00007ff8`7c6d37bf : 00000000`0000000f 00000000`00000000
00000000`00000001 00007ff8`7c6d3257 :
Qt5Core!QEventDispatcherWin32Private::sendTimerEvent+0xeb
000000e1`e63fba60 00007ff8`c472681d : 0000025e`00000000 00007ff8`c4732df3
00000000`00000000 00000000`00000000 : Qt5Core!qt_internal_proc+0x4ef
000000e1`e63fbbb0 00007ff8`c4726212 : 0000025e`7e457170 00007ff8`7c6d32d0
00000000`00010092 000000e1`e63fbdf8 : user32!UserCallWinProcCheckWow+0x2bd
000000e1`e63fbd40 00007ff8`7c6d2f91 : 00007ff8`7c6d32d0 00000000`00000001
0000025e`7df8c638 0000025e`7df8c600 : user32!DispatchMessageWorker+0x1e2
000000e1`e63fbdc0 00007ff8`7c684d4b : 0000025e`7dfdce00 00000000`00000000
0000025e`7dfdce00 0000025e`7dfdcf00 :
Qt5Core!QEventDispatcherWin32::processEvents+0x5b1
000000e1`e63fef30 00007ff8`7c687ea1 : 0000025e`7df782f0 00000000`00000000
000000e1`e63ff120 00007ff8`7c7a3fe8 : Qt5Core!QEventLoop::exec+0x1cb
000000e1`e63fefb0 00007ff6`637bfd03 : 000000e1`e63ff070 00000000`00000000
000000e1`e63ff070 0000025e`0000000a : Qt5Core!QCoreApplication::exec+0x141
000000e1`e63ff020 00007ff6`637bf28d : 0000025e`7e006660 0000025e`7dff9098
0000025e`7dff9098 00000000`00000001 : CortexSync!internalMain+0x353
000000e1`e63ffc20 00007ff8`c4fd2de2 : 00000000`00000000 0000025e`7dff9080
00000000`00000000 00000000`00000000 : CortexSync!CortexSyncMain+0xed
000000e1`e63ffc50 00007ff8`c5087bd4 : 00000000`00000000 00000000`00000000
00000000`00000000 00000000`00000000 : sechost!ScSvcctrlThreadA+0x22
000000e1`e63ffc80 00007ff8`c5b6ce71 : 00000000`00000000 00000000`00000000
00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0x14
000000e1`e63ffcb0 00000000`00000000 : 00000000`00000000 00000000`00000000
00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x21
THREAD_SHA1_HASH_MOD_FUNC: afa371a57ea30cbf623ee39ae01a254576d646b2
THREAD_SHA1_HASH_MOD_FUNC_OFFSET: 0ee304b0f662cf87ed3108f662bfaa30626d6186
THREAD_SHA1_HASH_MOD: 78a58e96051ad1a5ca8609523380d43950b26ced
FAULT_INSTR_CODE: 170b983
FAULTING_SOURCE_LINE:
c:\jenkins\workspace\cortexv2-dev-win64-service-release\src\thirdparty\couchbase-lite-core-ee\encryption\see-sqlite.c
FAULTING_SOURCE_FILE:
c:\jenkins\workspace\cortexv2-dev-win64-service-release\src\thirdparty\couchbase-lite-core-ee\encryption\see-sqlite.c
FAULTING_SOURCE_LINE_NUMBER: 27018
FAULTING_SOURCE_CODE:
27014: p = sqlite3Malloc(n);
27015: sqlite3MemdebugSetType(p, MEMTYPE_HEAP);
27016: return p;
27017: }
>27018: SQLITE_PRIVATE void *sqlite3DbMallocRawNN(sqlite3 *db, u64 n){
27019: #ifndef SQLITE_OMIT_LOOKASIDE
27020: LookasideSlot *pBuf;
27021: assert( db!=0 );
27022: assert( sqlite3_mutex_held(db->mutex) );
27023: assert( db->pnBytesFreed==0 );
SYMBOL_STACK_INDEX: 0
SYMBOL_NAME: CortexSync!sqlite3DbMallocRawNN+0
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: CortexSync
IMAGE_NAME: CortexSync.exe
DEBUG_FLR_IMAGE_TIMESTAMP: 5d42a593
STACK_COMMAND: ~2s ; .ecxr ; kb
FAILURE_BUCKET_ID:
INVALID_POINTER_READ_c0000005_CortexSync.exe!sqlite3DbMallocRawNN
BUCKET_ID:
APPLICATION_FAULT_INVALID_POINTER_READ_CortexSync!sqlite3DbMallocRawNN+0
FAILURE_EXCEPTION_CODE: c0000005
FAILURE_IMAGE_NAME: CortexSync.exe
BUCKET_ID_IMAGE_STR: CortexSync.exe
FAILURE_MODULE_NAME: CortexSync
BUCKET_ID_MODULE_STR: CortexSync
FAILURE_FUNCTION_NAME: sqlite3DbMallocRawNN
BUCKET_ID_FUNCTION_STR: sqlite3DbMallocRawNN
BUCKET_ID_OFFSET: 0
BUCKET_ID_MODTIMEDATESTAMP: 5d42a593
BUCKET_ID_MODCHECKSUM: 0
BUCKET_ID_MODVER_STR: 0.0.0.0
BUCKET_ID_PREFIX_STR: APPLICATION_FAULT_INVALID_POINTER_READ_
FAILURE_PROBLEM_CLASS: APPLICATION_FAULT
FAILURE_SYMBOL_NAME: CortexSync.exe!sqlite3DbMallocRawNN
TARGET_TIME: 2019-08-19T12:32:11.000Z
OSBUILD: 18362
OSSERVICEPACK: 86
SERVICEPACK_NUMBER: 0
OS_REVISION: 0
SUITE_MASK: 256
PRODUCT_TYPE: 1
OSPLATFORM_TYPE: x64
OSNAME: Windows 10
OSEDITION: Windows 10 WinNt SingleUserTS
OS_LOCALE:
USER_LCID: 0
OSBUILD_TIMESTAMP: unknown_date
BUILDDATESTAMP_STR: 190318-1202
BUILDLAB_STR: 19h1_release
BUILDOSVER_STR: 10.0.18362.1.amd64fre.19h1_release.190318-1202
ANALYSIS_SESSION_ELAPSED_TIME: 96b
ANALYSIS_SOURCE: UM
FAILURE_ID_HASH_STRING:
um:invalid_pointer_read_c0000005_cortexsync.exe!sqlite3dbmallocrawnn
FAILURE_ID_HASH: {0ca72706-af12-cb38-d8fa-49f9bb563845}
Followup: MachineOwner
---------
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users