[Dovecot] Bad file descriptor with maildir and bzip2 files
Chris Burton
Chris at 7of9b.org
Wed Aug 27 21:45:13 EEST 2008
Hi,
Thanks for the quick reply - it didn't work as is (caused the same error),
here's what the strace looks like with your patch.
19:34:20.233363 read(12, "", 4096) = 0
19:34:20.233455 dup(12) = 11
19:34:20.233540 munmap(0xb7bd8000, 3600384) = 0
19:34:20.233909 close(12) = 0
19:34:20.233986 munmap(0xb7f62000, 4096) = 0
19:34:20.234088 fcntl64(11, F_GETFL) = 0x8000 (flags
O_RDONLY|O_LARGEFILE)
19:34:20.234169 fstat64(11, {st_mode=S_IFREG|0644, st_size=170988, ...}) = 0
19:34:20.234563 mmap2(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f62000
19:34:20.234646 _llseek(11, 0, [170988], SEEK_CUR) = 0
19:34:20.234765 fstat64(12, 0xbfea37d0) = -1 EBADF (Bad file descriptor)
19:34:20.234986 write(2, "\1Efstat(maildir) failed: Bad fil"..., 45) = 45
I took a look at the code and the logic being different depending on
HAVE_GZSEEK didn't seem right so I tried adding a "else" before the "#else"
and recompiled and it's working now with the same bzip2 files that caused
the problem previously.
I'm not sure if that's a fluke or a fix though :).
ChrisB.
More information about the dovecot
mailing list