Index: src/os_unix.c ================================================================== --- src/os_unix.c +++ src/os_unix.c @@ -4877,11 +4877,13 @@ static void unixShmBarrier( sqlite3_file *fd /* Database file holding the shared memory */ ){ UNUSED_PARAMETER(fd); sqlite3MemoryBarrier(); /* compiler-defined memory barrier */ - assert( unixFileMutexNotheld((unixFile*)fd) ); + assert( fd->pMethods->xLock==nolockLock + || unixFileMutexNotheld((unixFile*)fd) + ); unixEnterMutex(); /* Also mutex, for redundancy */ unixLeaveMutex(); } /*