On 24-06-13 14:28, Ronald Moesbergen wrote:
> 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:
Ronald,
What is your scenario in terms of concurrency?
Lmtp is a single-threaded application so lack of locks is highly
unlikely. A race-condition is possible of course, but I suspect the
event-handlers are still active when they should have been disabled.
You /could/ try
diff --git a/src/clientsession.c b/src/clientsession.c
index b59c8ee..f8b670b 100644
--- a/src/clientsession.c
+++ b/src/clientsession.c
@@ -138,6 +138,8 @@ void client_session_bailout(ClientSession_T **session)
List_T messagelst = NULL;
if (! c) return;
+ ci_cork(c->ci);
+
TRACE(TRACE_DEBUG,"[%p]", c);
// brute force:
if (server_conf->no_daemonize == 1) _exit(0);
which does just that: disable the event handlers before trying to clean
up a broken session.
If that doesn't help, I would have to find a way to reproduce it.
--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin
* Premium Hosting Services and Web Application Consultancy *
www.nfg.nl/[email protected]/+31.85.877.99.97
________________________________________________________________
_______________________________________________
Dbmail-dev mailing list
[email protected]
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev