Hi, we use SQLite inside a fuse file system that runs in a number of computer centers. (Only) one of these centers recently reported several segfaults that happened on several nodes at different times but they all occur at the same spot in the code. The stack trace as far as SQLite is concerned is as follows:
Thread 16 (Thread 0x7fcf0006e700 (LWP 4927)): ... #3 <signal handler called> #4 0x00007fcf01fee745 in pager_write_pagelist () from /usr/lib64/libcvmfs_fuse.so #5 0x00007fcf01ff5cf7 in sqlite3PagerCommitPhaseOne () from /usr/lib64/libcvmfs_fuse.so #6 0x00007fcf01ff5ec8 in sqlite3BtreeCommitPhaseOne () from /usr/lib64/libcvmfs_fuse.so #7 0x00007fcf01ff694a in sqlite3VdbeHalt () from /usr/lib64/libcvmfs_fuse.so #8 0x00007fcf020311a5 in sqlite3VdbeExec () from /usr/lib64/libcvmfs_fuse.so #9 0x00007fcf0200f0e1 in sqlite3_step () from /usr/lib64/libcvmfs_fuse.so #10 0x00007fcf0200fbb2 in sqlite3_exec () from /usr/lib64/libcvmfs_fuse.so ... I guess that we make a subtle mistake in the way we use SQLite and perhaps someone on this list has an idea. The computer center at hand runs a Redhat Enterprise Linux 6 clone on its nodes. The SQLite database is stored on a local XFS file system that is on a software RAID-0 partition. The crash happens when the COMMIT command is executed, at the end of a bunch of UPDATE and INSERT queries that operate on a single table. This is the only read-write SQLite database of the application and it is accessed exclusively by one thread. At the same time, however, other threads use other SQLite databases in read-only mode. The SQLite version is 3.7.17. The sqlite3.c is compiled with the following options and statically linked with the application: -fPIC -DSQLITE_THREADSAFE=2 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_MEMSYS5 -g -O2 -fno-strict-aliasing -fasynchronous-unwind-tables -fno-omit-frame-pointer -fno-optimize-sibling-calls -fvisibility=hidden -D_REENTRANT -D__EXTENSIONS__ -D_LARGEFILE64_SOURCE -D__LARGE64_FILES All threads use sqlite3_soft_heap_limit() to restrict the memory to a few megabytes. At the beginning of the application, SQLite is initialized as follows: sqlite3_config(SQLITE_CONFIG_LOG, LogSqliteError, NULL); sqlite3_config(SQLITE_CONFIG_MULTITHREAD); g_sqlite_scratch = malloc(8192*16); g_sqlite_page_cache = malloc(1280*3275); sqlite3_config(SQLITE_CONFIG_SCRATCH, g_sqlite_scratch, 8192, 16); sqlite3_config(SQLITE_CONFIG_PAGECACHE, g_sqlite_page_cache, 1280, 3275); sqlite3_config(SQLITE_CONFIG_LOOKASIDE, 32, 128); There is no indication of I/O errors neither is any of SQLITE_INTERNAL, SQLITE_PERM, SQLITE_NOMEM, SQLITE_IOERR, SQLITE_CORRUPT, SQLITE_FULL, SQLITE_CANTOPEN, SQLITE_MISUSE, SQLITE_FORMAT, SQLITE_NOTADB passed to the application defined log function. I'm happy for any hints! Thanks, Jakob _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users