SQLite

Ticket Change Details
Login
Overview

Artifact ID: 428b056fa10d1635a96ad5017c24ba424e25fd59
Ticket: 5eaa61ea1881040b17449ca043b6f8fd9ca55dc3
sigbus on disk ful in WAL mode
User & Date: drh 2012-11-13 09:28:13
Changes

  1. Appended to comment:
    
    
    <hr><i>drh added on 2012-11-13 09:28:13:</i><br>
    Yes, the sqlite3 shell was run as run.  I also repeated the experiment multiple times with valgrind, for what it is worth.  No issues observed.
    
    Furthermore, I tried creating write-ahead log files that needed to be recovered (since the original problem statement said that the segfault occurred during recovery) and recover them, as root, with zero space left on the device.  Still no problems.
    
    The segfault occurs on a line that is attempting to write into a newly allocated mmap-ed file (the db.sqlite-shm file, specifically).  It appears that Linux will allow disk space for mmap-ed files to be overcommitted.  That is to say, based on my experiments, you can mmap more space than you have on disk and the mmap() call still works.  Perhaps you system is configured in some way different from mine (perhaps it is also under memory pressure) so that the mmap-ed region is becoming unmapped somehow?