[erlang-questions] Can't shut down Mnesia from within application

Chris Hicks silent_vendetta@REDACTED
Fri Apr 29 08:59:37 CEST 2011

Always the little things. Didn't even think about the sequential nature of the application process. Thank you to to everyone who responded here and privately. My head and my desk no longer have to fear each other.
Chris Hicks.

Date: Fri, 29 Apr 2011 08:50:48 +0200
Subject: Re: [erlang-questions] Can't shut down Mnesia from within application
From: garazdawi@REDACTED
To: silent_vendetta@REDACTED
CC: erlang-questions@REDACTED

Mnesia:stop sends a call message to the application process to stop. That process is busy shutting down your application and thus a deadlock happens. 
On Apr 29, 2011 6:50 AM, "Chris Hicks" <silent_vendetta@REDACTED> wrote:
> I forgot to mention that if I comment out mnesia:stop() from the stop function of the app so that it looks like this:

> stop(_State) ->	%% mnesia:stop(),	ok.
> the app shuts down perfectly fine. I can then enter mnesia:stop() into the console and it will immediately shut down as if nothing is wrong. The freezing up only happens when I try to call mnesia:stop() (or application:stop(mnesia)) from within the applications stop function.

> From: silent_vendetta@REDACTED
> To: erlang-questions@REDACTED
> Date: Thu, 28 Apr 2011 20:35:36 -0700

> Subject: [erlang-questions] Can't shut down Mnesia from within application
> Hello all,
> I've got an application which, in it's start function, calls mnesia:start() before starting the top level supervisor. The only thing I'm doing with Mnesia at the moment is working with a single ram-copies table. In the stop function of the same application I call mnesia:stop(). At that point I shouldn't have any transactions or anything going on, but Mnesia simply hangs and I can't do anything but shut the Erlang VM down and restart it again. Any ideas what might be going on or where I should look?

> Chris Hicks. 		 	   		  
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED

> http://erlang.org/mailman/listinfo/erlang-questions 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110428/e08d8486/attachment.htm>

More information about the erlang-questions mailing list