Mnesia deadlock?

Claes Wikstrom klacke@REDACTED
Fri Dec 30 19:56:57 CET 2005

Adam Aquilon wrote:
> Eventually we got fed up and went for a coffe. When we came back,
> the system had gone back into the "bad" state. Notice that it is only
> the mnesia subsystem on the main node that is hanging. 

Just a quick look - looks like there are an equal amount of
hanging transactions to hanging gen_server:rec_nodes/7

You're sure you are not doing any gen_server:calls inside
the transactions. It sure looks like that. And if then anyone
of those gen_servers are also executing transactions on the same
tables -- tada !! deadlock.

Note, mnesia has builtin deadlock detection bit cannot protect itself
from the user deadlocking himself.

So - tip no 1, check for gen_server:calls inside your transactions.
Look closely on your user process (i.e <0.932.1> )
and figure our what it's waiting for and why. What's the message
in the queue for that process !!! very suspicious.


Claes Wikstrom                        -- Caps lock is nowhere and                  -- everything is under control
cellphone: +46 70 2097763

More information about the erlang-questions mailing list