On Jul 15, 2008, at 4:46 AM, Ken wrote: > Preprocessor Macro: > #if defined (_AIX) > > Looks like the MJ file is not getting created, sqlite 3.5.9 This is > also reproducible via the command line: Possibly an issue with the > journal mode code that was introduced.
> access("/home/ixion/ix_propagator/data/db/ajax102/batch/bat_28.db- > mj7DF9F4DF", 0) Err#2 ENOENT > open("/home/ixion/ix_propagator/data/db/ajax102/batch/bat_28.db- > mj7DF9F4DF", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE) = 9 That bit above is creating the master journal file. > open("/home/ixion/ix_propagator/data/db/ajax102/batch", O_RDONLY| > O_LARGEFILE) = 10 > kfcntl(10, F_GETFD, 0x00000000) = 0 > kfcntl(10, F_SETFD, 0x00000001) = 0 > kfcntl(9, F_GETFD, 0x00000000) = 0 > kfcntl(9, F_SETFD, 0x00000001) = 0 > fstatx(9, 0x2FF21170, 128, 010) = 0 > klseek(9, 0, 0, 0x00000000) = 0 > kwrite(9, " / h o m e / i x i o n /".., 66) = 66 > klseek(9, 0, 66, 0x00000000) = 0 > kwrite(9, " / h o m e / i x i o n /".., 74) = 74 > fsync(9) = 0 > fsync(10) Err#9 EBADF The block above is syncing the master journal file, and the directly it is stored in. An error occurs, so SQLite decides to attempt to roll the transaction back. This also involves syncing the directory containing the master journal, which fails a second time: > unlink("/home/ixion/ix_propagator/data/db/ajax102/batch/bat_28.db- > mj7DF9F4DF") = 0 > open("/home/ixion/ix_propagator/data/db/ajax102/batch", O_RDONLY| > O_LARGEFILE) = 9 > kfcntl(9, F_GETFD, 0x00000000) = 0 > kfcntl(9, F_SETFD, 0x00000001) = 0 > fsync(9) Err#9 EBADF > close(9) = 0 > close(6) = 0 > close(5) = 0 > unlink("/home/ixion/ix_propagator/data/db/ajax102/batch/bat_28.db- > journal") = 0 > kfcntl(3, 12, 0x2FF211F0) = 0 > kfcntl(3, 12, 0x2FF211F0) = 0 > kfcntl(3, 12, 0x2FF210F0) = 0 > close(8) = 0 > close(7) = 0 > unlink("/home/ixion/ix_propagator/data/db/ajax102/batch/../db/ > ixp_15a6.db-journal") = 0 > kfcntl(4, 12, 0x2FF211F0) = 0 > kfcntl(4, 12, 0x2FF211F0) = 0 > kfcntl(4, 12, 0x2FF210F0) = 0 > kwrite(1, 0xF0373B18, 26) = 26 > kfcntl(1, F_GETFL, 0x20002398) = 2 > kwrite(1, 0xF0373B18, 8) = 8 > kfcntl(1, F_GETFL, 0x20002398) = 2 > kread(0, 0xF036FAF0, 4096) = 1 So it looks like Richard is correct - the version of AIX you are using just doesn't support fsync() on directories. Probably the code that does this should just be disabled on AIX (I guess using the _AIX macro). Dan. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users