On 04/24/2013 04:28 PM, Sašo Kiselkov wrote: > On 04/24/2013 03:57 PM, Richard Hipp wrote: >> On Wed, Apr 24, 2013 at 8:28 AM, Sašo Kiselkov <skiselkov...@gmail.com>wrote: >> >>> I'm running into I/O errors when trying to access a sqlite3 database >>> which is using WAL from my app. While using journal_mode=delete, >>> everything is fine, but as soon as I switch over to journal_mode=wal, I >>> just get a load of I/O errors on any query, regardless if it is a SELECT >>> or UPDATE/INSERT. >>> >> >> >> Can you please turn on error logging (as described at >> http://www.sqlite.org/draft/errlog.html) and let us know more details about >> the I/O error you are seeing? > > Here's my error log: > > #4874: os_unix.c:27116: (22) fallocate(/root/test/idx/block.db-shm) - > Invalid argument > #4874: os_unix.c:27116: (22) fallocate(/root/test/idx/block.db-shm) - > Invalid argument > #4874: statement aborts at 3: [DROP TABLE IF EXISTS `version`] disk I/O > error
Just a quick addendum, configure did in fact correctly detect that I have posix_fallocate on SunOS: configure:19903: checking for posix_fallocate configure:19903: gcc -o conftest -m64 conftest.c >&5 configure:19903: $? = 0 configure:19903: result: yes ... ac_cv_func_posix_fallocate=yes Truss'ing the process, I find this: /2: open("/root/test/idx/block.db-shm", O_RDWR|O_CREAT, 0644) = 12 /2: fstat(12, 0xFFFFFD7FFF0CE260) = 0 /2: fcntl(12, F_GETFD, 0x00000000) = 0 /2: fcntl(12, F_SETFD, 0x00000001) = 0 /2: getuid() = 0 [0] /2: fchown(12, 0, 0) = 0 /2: fcntl(12, F_SETLK, 0xFFFFFD7FFF0CE2B0) = 0 /2: fcntl(12, F_FREESP, 0xFFFFFD7FFF0CE290) = 0 /2: fcntl(12, F_SETLK, 0xFFFFFD7FFF0CE2B0) = 0 /2: fstat(12, 0xFFFFFD7FFF0CE400) = 0 /2: fcntl(12, F_SETLK, 0xFFFFFD7FFF0CE420) = 0 /2: fstat(12, 0xFFFFFD7FFF0CE400) = 0 /2: fcntl(12, F_ALLOCSP, 0xFFFFFD7FFF0CE380) Err#22 EINVAL /2: fstat(12, 0xFFFFFD7FFF0CE2F0) = 0 Cheers, -- Saso _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users