Matthias Saou
2006-Mar-16 10:18 UTC
[Dovecot] Segfault when parsing configuration on x86_64
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
Timo Sirainen
2006-Mar-25 11:29 UTC
[Dovecot] Segfault when parsing configuration on x86_64
On Thu, 2006-03-16 at 11:18 +0100, Matthias Saou wrote:> 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. > > And the backtrace (I don't have symbols for all libs, sorry) :Hmm. Could you try also running it with Valgrind? That backtrace doesn't really tell why it would crash there.> 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)This error message doesn't come from Dovecot itself though. By googling the error message it looks like it's coming from MySQL. Why is your pop3 process calling MySQL?.. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 191 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20060325/f2673ae5/attachment.bin>