[Dovecot] 1.2.6 Spurious pread()/stream errors/index corruption

Paul Freeman dovecot at lists-in.noc4.net
Thu Oct 15 22:22:31 EEST 2009


OK it seems that pread(), for whatever reason is still used even with with
HAVE_PREAD undefined, I also removed the pread ac from configure.in and
rebuilt configure just to make sure it was not defined anywhere else.

---- a quick snippet from strace...

<snip>
open("/NOC4/etc/dovecot/dovecot.conf", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=7333, ...}) = 0
pread(4, "## Dovecot configuration file\n\nba"..., 4096, 0) = 4096
pread(4, " = no\n  pop3_enable_last         "..., 4067, 4096) = 3237
write(2, "\7"..., 1)                    = 1
write(2, "Unexpected eof found when reading"..., 63Unexpected eof found
when reading file 'UNOPENED' (Errcode: -1)) = 63
write(2, "\n"..., 1
)                    = 1
write(2, "Panic: file istream-file.c: line "..., 89Panic: file
istream-file.c: line 80 (i_stream_file_read): assertion failed: (errno !=
0)
) = 89


---- actual output

Unexpected eof found when reading file 'UNOPENED' (Errcode: -1)
Panic: file istream-file.c: line 80 (i_stream_file_read): assertion
failed: (errno != 0)
Error: Raw backtrace: /NOC4/dovecot/sbin/dovecot [0x41d10e] ->
/NOC4/dovecot/sbin/dovecot(default_error_handler+0) [0x41d18a] ->
/NOC4/dovecot/sbin/dovecot(i_fatal+0) [0x41d402] ->
/NOC4/dovecot/sbin/dovecot [0x421901] ->
/NOC4/dovecot/sbin/dovecot(i_stream_read+0x8b) [0x42045b] ->
/NOC4/dovecot/sbin/dovecot(i_stream_read_next_line+0x29) [0x420edb] ->
/NOC4/dovecot/sbin/dovecot [0x41a715] ->
/NOC4/dovecot/sbin/dovecot(settings_read+0x40) [0x41a7ba] ->
/NOC4/dovecot/sbin/dovecot(master_settings_read+0xb1) [0x418413] ->
/NOC4/dovecot/sbin/dovecot(main+0x32c) [0x41540a] ->
/lib/libc.so.6(__libc_start_main+0xe6) [0x2aedb29455c6] ->
/NOC4/dovecot/sbin/dovecot [0x40b0a9]
Aborted



On Thu, 15 Oct 2009 13:38:22 -0400, Timo Sirainen <tss at iki.fi> wrote:
> On Thu, 2009-10-15 at 10:06 +0100, Paul Freeman wrote:
>> (some previous posts indicated this might be todo with 64bit file
offsets
>> so we've played around with disable-largefile and setting
>> _FILE_OFFSET_BITS
>> manually but without any success)
> 
> If your OS is 64bit, you can't disable 64bit file offsets. But yes, your
> problems clearly points to pread() being broken for some reason. The
> easiest way to see if that's the only thing broken is to comment out
> HAVE_PREAD from config.h after configure and recompile.


More information about the dovecot mailing list