Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade BEAM code cause Mnesia and Ranch crash #39

Open
chuanjian666 opened this issue Feb 12, 2015 · 0 comments
Open

Upgrade BEAM code cause Mnesia and Ranch crash #39

chuanjian666 opened this issue Feb 12, 2015 · 0 comments

Comments

@chuanjian666
Copy link

We use Mnesia as application's database, when use the cb_admin's upgrade beam code, the mnesia and ranch will be crashed.

11:09:29.166 [error] Supervisor mnesia_kernel_sup had child mnesia_tm started with mnesia_tm:start() at <0.105.0> exit with reason killed in context child_terminated
11:09:29.166 [error] Supervisor mnesia_kernel_sup had child mnesia_tm started with mnesia_tm:start() at <0.105.0> exit with reason reached_max_restart_intensity in context shutdown
11:09:29.167 [error] Supervisor mnesia_sup had child mnesia_kernel_sup started with mnesia_kernel_sup:start() at <0.100.0> exit with reason shutdown in context child_terminated
11:09:29.167 [error] Supervisor mnesia_sup had child mnesia_kernel_sup started with mnesia_kernel_sup:start() at <0.100.0> exit with reason reached_max_restart_intensity in context shutdown
11:09:29.182 [info] Application mnesia exited with reason: shutdown
11:09:29.772 [error] Supervisor {<0.163.0>,ranch_acceptors_sup} had child {acceptor,<0.163.0>,28} started with ranch_acceptor:start_link(#Port<0.22521>, ranch_tcp, <0.162.0>) at <0.191.0> exit with reason killed in context child_terminated
11:09:29.773 [error] Supervisor {<0.163.0>,ranch_acceptors_sup} had child {acceptor,<0.163.0>,29} started with ranch_acceptor:start_link(#Port<0.22521>, ranch_tcp, <0.162.0>) at <0.192.0> exit with reason killed in context child_terminated
11:09:29.773 [error] Supervisor {<0.163.0>,ranch_acceptors_sup} had child {acceptor,<0.163.0>,5} started with ranch_acceptor:start_link(#Port<0.22521>, ranch_tcp, <0.162.0>) at <0.168.0> exit with reason killed in context child_terminated
11:09:29.773 [error] Supervisor {<0.163.0>,ranch_acceptors_sup} had child {acceptor,<0.163.0>,1} started with ranch_acceptor:start_link(#Port<0.22521>, ranch_tcp, <0.162.0>) at <0.164.0> exit with reason killed in context child_terminated
11:09:29.773 [error] Supervisor {<0.163.0>,ranch_acceptors_sup} had child {acceptor,<0.163.0>,2} started with ranch_acceptor:start_link(#Port<0.22521>, ranch_tcp, <0.162.0>) at <0.165.0> exit with reason killed in context child_terminated
11:09:29.773 [error] Supervisor {<0.163.0>,ranch_acceptors_sup} had child {acceptor,<0.163.0>,6} started with ranch_acceptor:start_link(#Port<0.22521>, ranch_tcp, <0.162.0>) at <0.169.0> exit with reason killed in context child_terminated

By reading the mnesia source code, I found this comment in mnesia_sp.erl module

%% To able to generate nice crash reports we need a catch on the highest level.
%% This code can't be purged so a code change is not possible.
%% And hence this a simple module.

So I solved this problem temporarily by filtering mnesia and ranch related modules from code:all_loaded()

Some people also commit this issue in mail list
https://groups.google.com/forum/#!topic/chicagoboss/sKN7Bvpeskc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant