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

Erlang Crashing #168

Closed
monkeyfdude opened this issue May 5, 2017 · 4 comments
Closed

Erlang Crashing #168

monkeyfdude opened this issue May 5, 2017 · 4 comments

Comments

@monkeyfdude
Copy link

monkeyfdude commented May 5, 2017

I am trying to run apns4erl v2 inside ejabberd otp 18 but I get crash dump. I have attached the dump file.

Would you be able to tell me what is wrong? I have limited knowledge in Erlang.

Ubuntu 16.03

erl -v
Erlang/OTP 18 [erts-7.2.1] [source] [64-bit] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V7.2.1  (abort with ^G)

ejabberd code

init([Host, _Opts]) ->
        apns:start(),
        {ok, _} = apns:connect(cert, ?APNS_CONNECTION),
        {ok, #state{host = Host}}.

apns4erl v2 built with erlang 18 #164

{application,apns,
             [{description,"APNs provider for Apple Push Notification services (APNs) in Erlang"},
              {vsn,"2.0.0"},
              {id,"apns"},
              {registered,[]},
              {applications,[kernel,stdlib,jsx,gun,base64url]},
              {modules,[apns,apns_app,apns_connection,apns_feedback,apns_os,
                        apns_sup,apns_utils]},
              {mod,{apns_app,[]}},
              {maintainers,["Inaka"]},
              {licenses,["Apache 2.0"]},
              {env, [
                 {apple_host, "api.development.push.apple.com"},
                 {apple_port, 443},
                 {cert_file, "/etc/ejabberd/certs/apns-dev-cert.pem"},
                 {key_file, "priv/apns-dev-key-noenc.pem"},
                 {token_keyfile, undefined},
                 {timeout, 10000}
              ]},
              {links,[{"Github","https://github.com/inaka/apns4erl"}]},
              {build_tools,["rebar3"]}]}.

erl_crash_20170505-103244.txt

@elbrujohalcon
Copy link
Member

@monkeyfdude according to your crashdump slogan, this is the error:

Slogan: Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}}}

You can see that using, for instance, recon's erl_crashdump_analyzer.sh.

The key word there is nodistribution. This is certainly not an apns4erl error. A quick googling lead me to this thread where you can see people fighting against that same error in ejabberd-land.

If I were you, I would ask there.

@monkeyfdude
Copy link
Author

monkeyfdude commented May 5, 2017

@elbrujohalcon Thank you so much.

But the crash happens only when put apns v2 modules built with erlang 18 inside ejabberd.

@elbrujohalcon
Copy link
Member

I really doubt apns would cause this, specially considering that not even the application manager is started when the VM crashes.
Using the same tool I showed you above, you can see that only 5 processes were started in the node. The last one was most likely going to be the application_master, but it died and the whole VM crashed.
May your problem be related to processone/ejabberd#1158 ?
Are you trying to use ejabberdctl for this?
In any case, I still maintain that this is almost certainly an issue related to how your computer is configured or how you're trying to start ejabberd. It has most likely nothing to do with apns at all.

@monkeyfdude
Copy link
Author

@elbrujohalcon Let me investigate. I will close this.

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

2 participants