On 01/09/2010 20:08, Timo Sirainen wrote:
On Mon, 2010-08-30 at 16:52 +0100, interfaSys sàrl wrote:
On FreeBSD, Dovecot 2.0.1 compiles fine with gcc45 and the other services have no problem, but even without any optimizations (CFLAGS) at all, pop3-login seg faults when a user tries to connect to Dovecot using POP3.
If you can figure out a way to get gdb backtrace, I could try to look at why it's crashing there. One sure way to do it would be to patch:
diff -r 267385a0ccd3 src/login-common/main.c --- a/src/login-common/main.c Wed Sep 01 18:44:32 2010 +0100 +++ b/src/login-common/main.c Wed Sep 01 20:07:26 2010 +0100 @@ -335,6 +335,7 @@ const char *login_socket = DEFAULT_LOGIN_SOCKET; int c;
+ sleep(30); master_service = master_service_init(login_binary.process_name, service_flags, &argc, &argv, "DS"); master_service_init_log(master_service, t_strconcat(
Then get the process started and attach gdb:
gdb /usr/local/libexec/dovecot/pop3-login <pid of pop3-login> cont <wait for crash> bt full
Adding sleep() didn't change anything, it crashes right from the start and there isn't much info in the trace. It seems it cannot create the first thread. This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)... Core was generated by `pop3-login'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/lib/dovecot/libdovecot-login.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/lib/dovecot/libdovecot-login.so.0 Reading symbols from /usr/lib/dovecot/libdovecot.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/lib/dovecot/libdovecot.so.0 Reading symbols from /usr/local/lib/libssl.so.7...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libssl.so.7 Reading symbols from /usr/local/lib/libcrypto.so.7...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libcrypto.so.7 Reading symbols from /usr/lib/librt.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/lib/librt.so.1 Reading symbols from /usr/local/lib/gcc45/libgomp.so.1...done. Loaded symbols for /usr/local/lib/gcc45/libgomp.so.1 Reading symbols from /lib/libthr.so.3...done. Loaded symbols for /lib/libthr.so.3 Reading symbols from /lib/libc.so.7...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x0000000800a29fa1 in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7 [New LWP 101099] (gdb) bt full #0 0x0000000800a29fa1 in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7 No symbol table info available. #1 0x0000000800a2acad in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7 No symbol table info available. #2 0x0000000800a2b9d5 in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7 No symbol table info available. #3 0x0000000800a2bbd2 in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7 No symbol table info available. #4 0x0000000800a313e9 in malloc () from /lib/libc.so.7 No symbol table info available. #5 0x00000008008aabb5 in pthread_kill () from /lib/libthr.so.3 No symbol table info available. #6 0x00000008008ab57c in pthread_join () from /lib/libthr.so.3 No symbol table info available. #7 0x00000008008ae2d7 in __error () from /lib/libthr.so.3 No symbol table info available. #8 0x00000008008a2cee in ?? () from /lib/libthr.so.3 No symbol table info available. #9 0x00000008005331b0 in ?? () from /libexec/ld-elf.so.1 No symbol table info available. #10 0x000000080040bc49 in dlsym () from /libexec/ld-elf.so.1 No symbol table info available. #11 0x000000080040d011 in dlopen () from /libexec/ld-elf.so.1 No symbol table info available. #12 0x0000000800407789 in ?? () from /libexec/ld-elf.so.1 No symbol table info available. #13 0x0000000000000000 in ?? () No symbol table info available. #14 0x0000000000000000 in ?? () No symbol table info available.