[ejabberd] race condition in session creation?

Badlop badlop at gmail.com
Mon Oct 10 14:40:52 MSD 2011

2011/9/21 Stephan Maihöfer <sma at turtle-entertainment.de>:
> it seems that the mnesia:write in handle_session_start/8 in ejabberd_http_bind.erl
> "sometimes" takes to long for the mnesia:dirty_read in http_put (that
> get's called a bit later during session creation) to then find the
> session in the database.
> i changed the transactional write to do a dirty_write which fixed
> our problems. doing the read in a transaction seemed to dangerous
> reading up on locks an the mnesia documentation.
> i guess this means that there is a chance that sessions get created
> doubly now? how real is that and is there a proper way to prevent
> that and not run into a race condition?

Too much questions, and few answers.

I've created a ticket to keep track of this:
So, any new clue or finding can be commented there.


More information about the ejabberd mailing list