[Dovecot] Segfault when parsing configuration on x86_64
Matthias Saou
thias at spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net
Thu Mar 16 12:18:28 EET 2006
Hi,
Using the exact same build of 1.0.beta3, one i386 and the other x86_64, I
get segfaults upon startup with the x86_64 version when using the exact
same dovecot.conf file.
Here is the error :
# dovecot -F
Unexpected eof found when reading file 'UNOPENED' (Errcode: 0)
Segmentation fault (core dumped)
And the backtrace (I don't have symbols for all libs, sorry) :
(gdb) bt
#0 i_stream_next_line (stream=0x52c3a8) at istream.c:182
#1 0x000000000040e345 in i_stream_read_next_line (stream=0x52c3a8)
at istream.c:201
#2 0x000000000040aaa9 in settings_read (path=0x41798e "/etc/dovecot.conf",
section=0x0, callback=0x409580 <parse_setting>,
sect_callback=0x409a50 <parse_section>, context=0x7fbffff880)
at settings.c:222
#3 0x000000000040a0e1 in master_settings_read (
path=0x41798e "/etc/dovecot.conf", nochecks=false)
at master-settings.c:1159
#4 0x000000000040875a in main (argc=2, argv=0x7fbffffa18) at main.c:762
#5 0x0000003d4341c4bb in __libc_start_main () from /lib64/tls/libc.so.6
#6 0x000000000040357a in _start ()
#7 0x0000007fbffffa08 in ?? ()
#8 0x000000000000001c in ?? ()
#9 0x0000000000000002 in ?? ()
#10 0x0000007fbffffbf2 in ?? ()
#11 0x0000007fbffffbfa in ?? ()
#12 0x0000000000000000 in ?? ()
The really weird part is that I've managed to get my dovecot.conf in a
state where the problem no longer happens, but simply adding a line with
'#', or removing trailing spaces (normally harmless) on some config lines
makes the error re-appear. My quick guess would be that something is wrong
with the config file parser on 64bit archs...
Actually, I've just made some more tests, and it is "partially"
reproducible on i386. In this part of my configuration :
auth default {
mechanisms = plain
passdb sql {
args = /etc/dovecot-mysql.conf
}
userdb sql {
args = /etc/dovecot-mysql.conf
}
}
There is a trailing space on both "args = ..." lines. Well, if I remove them, I get this message with the i386 build. When I put them back, all is fine again.
Mar 16 11:05:37 s1 dovecot: pop3(user at domain): Unexpected eof found when reading file 'UNOPENED' (Errcode: 0)
(from /var/log/maillog, dovecot starts fine)
Matthias
--
Clean custom Red Hat Linux rpm packages : http://freshrpms.net/
Fedora Core release 4 (Rawhide) - Linux kernel 2.6.15-1.2054_FC5
Load : 0.78 0.61 0.49
More information about the dovecot
mailing list