On Wed, Apr 24, 2013 at 3:25 PM, Richard Hipp <d...@sqlite.org> wrote: > On Wed, Apr 24, 2013 at 12:21 PM, Sašo Kiselkov <skiselkov...@gmail.com>wrote: >> ... > > SQLite is using posix_fallocate() to allocate space for a region of shared > memory obtained using mmap(). If the space cannot be preallocated, then > when we use the mmapped region and an attempt is made to allocate the space > and the filesystem is full, we'll get a SIGBUS signal. > > So what you seem to be saying is that if you (1) use ZFS and (2) use mmap() > and (3) your filesystem fills up, then there is nothing your application > can do to avoid a SIGBUS. Am I missing something here?
That's right. You could use write(2)/pwrite(2) to avoid this and still use mmap() for reading. That's what the OpenLDAP MDB does. That still leaves EIO on read via mmap() -> SIGBUS. (I know, I asserted that this was undesirable behavior by the OS, but in practice I think all OSes do this, and if any apparently hang instead... it's usually because of long hardware I/O timeouts.) Nico -- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users