Hi,

I'm seeing a reproducable crash in dbmail-lmtp, latest git, under very high
load (20+ messages per second). The strange thing is the point of the crash
is slightly different every time, but all due to "session" of one of it's
member variables being freed while still in use. Looks like some kind of
race condition or missing locking somewhere.. I have core dumps available
if needed. The backtraces look as follows:

Trace 1:
Program terminated with signal 11, Segmentation fault.
[Switching to thread 2 (LWP 28257)]
#0  0x00007fb93fa4d997 in client_session_set_timeout (session=0x2052970,
timeout=60) at clientsession.c:240
240            int current = session->ci->timeout->tv_sec;
(gdb) bt
#0  0x00007fb93fa4d997 in client_session_set_timeout (session=0x2052970,
timeout=60) at clientsession.c:240
#1  0x00007fb93fa4db5a in socket_write_cb (fd=13, what=4, arg=0x2052970) at
clientsession.c:270
#2  0x00007fb93dd7d94c in event_base_loop () from /usr/lib/libevent-2.0.so.5
#3  0x00007fb93fa4ba66 in server_run (conf=0x7fff02013420) at server.c:823
#4  0x00007fb93fa4c023 in server_mainloop (config=0x7fff02013420,
service=0x4048a5 "LMTP", servicename=0x4048ed "dbmail-lmtpd") at
server.c:957
#5  0x0000000000402bcb in main (argc=1, argv=0x7fff02016d88) at lmtpd.c:48

Trace 2:
Program terminated with signal 11, Segmentation fault.
[Switching to thread 2 (LWP 30010)]
#0  0x00007ffe64a6bac2 in socket_write_cb (fd=35, what=4, arg=0x19eaf50) at
clientsession.c:266
266        switch(session->state) {
(gdb) bt
#0  0x00007ffe64a6bac2 in socket_write_cb (fd=35, what=4, arg=0x19eaf50) at
clientsession.c:266
#1  0x00007ffe62d9b94c in event_base_loop () from /usr/lib/libevent-2.0.so.5
#2  0x00007ffe64a69a66 in server_run (conf=0x7fffeb0a60d0) at server.c:823
#3  0x00007ffe64a6a023 in server_mainloop (config=0x7fffeb0a60d0,
service=0x4048a5 "LMTP", servicename=0x4048ed "dbmail-lmtpd") at
server.c:957
#4  0x0000000000402bcb in main (argc=1, argv=0x7fffeb0a9a38) at lmtpd.c:48

(gdb) print session
$1 = (ClientSession_T *) 0x19eaf50
(gdb) print session->state
Cannot access memory at address 0x19eaf60
(gdb)

Any idea what the problem might be?

Thanks,
Ronald.
_______________________________________________
Dbmail-dev mailing list
[email protected]
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

Reply via email to