[Dovecot] Bad file descriptor with maildir and bzip2 files
Timo Sirainen
tss at iki.fi
Sat Aug 30 10:56:09 EEST 2008
On Wed, 2008-08-27 at 19:45 +0100, Chris Burton wrote:
> 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
How about after this: http://hg.dovecot.org/dovecot-1.1/rev/c83a677ce80b
> 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 :).
Don't do that, it'll break it, at least in some situations.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080830/49f3d4e1/attachment.bin
More information about the dovecot
mailing list