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

CRASH REPORT Process with 0 neighbours crashed with reason: no function clause matching gun_http2:parse(<<>>, close) #261

Closed
jainygaurav opened this issue Mar 5, 2021 · 18 comments

Comments

@jainygaurav
Copy link

jainygaurav commented Mar 5, 2021

Please help me fix this issue:

Main Issue: inaka/apns4erl#242.

You fixed similar issue earlier: #105

My environment:

AWS EC2 ubuntu 14.04
OTP: 19.3.6
git clone https://github.com/inaka/apns4erl.git
ejabberd - 16.03

%% == Dependencies for apns4erl https://github.com/inaka/apns4erl.git ==

{deps, [
  {gun, "1.3.3"},
  {jsx, "3.0.0"},
  {base64url, "1.0.1"}
]}.


@essen
Copy link
Member

essen commented Mar 6, 2021

Please post the entire crash report.

@paulo-ferraz-oliveira
Copy link

@essen, it's also worth noticing that apns4erl isn't using the latest gun. It's desirable to bump to 2.0.0, when it's out (just not comfortable doing it on top of rc1, since we understand behaviour might change). Internally, I've been using rc1 without issues, though 😄.

@jainygaurav
Copy link
Author

@essen Just going by the timestamp, this is what I see in my server logs:

2021-02-17 20:46:51.167 [error] <0.483.0> CRASH REPORT Process <0.483.0> with 0 neighbours crashed with reason: no function clause matching gun_http2:parse(<<>>, close) line 77

2021-02-17 20:46:51.168 [error] <0.476.0> Supervisor gun_sup had child undefined started with {gun,start_link,undefined} at <0.483.0> exit with reason function_clause in context child_terminated

@essen
Copy link
Member

essen commented Mar 6, 2021

Crash reports typically have more information...

@jainygaurav
Copy link
Author

jainygaurav commented Mar 6, 2021

@essen is there a gun config/setting which will enable more logging?

I run ejabberd server at error loglevel...do I need to run on info/warn/debug?

@paulo-ferraz is there a apns4erl config/setting that will enable more logs?

@essen
Copy link
Member

essen commented Mar 6, 2021

Don't worry about it. It's most likely fixed in 2.0. HTTP/2 support is much better there.

@paulo-ferraz-oliveira apns4erl might benefit from newly added gun_pool, would be worth an experiment. It won't be documented in 2.0.0 just yet.

I'll have to make time to release a 2.0.0-rc.2 if I didn't already. Or a proper 2.0 directly. We'll see.

Closing this in the meantime because I doubt this is still an issue in current Gun. Thanks!

@essen essen closed this as completed Mar 6, 2021
@paulo-ferraz-oliveira
Copy link

@paulo-ferraz-oliveira apns4erl might benefit from newly added gun_pool, would be worth an experiment. It won't be documented in 2.0.0 just yet.

I saw a pull request pass by here, recently, (by you, I believe) but was actually waiting for 2.0. Can wait a while longer, though.

@jainygaurav, you should try to lock gun to 2.0.0-rc1, on your end (rebar.config) and check if the issue goes away.

@paulo-ferraz-oliveira
Copy link

@essen, when I migrated for 1.0.0-rc1 to 2.0.0-rc1, I had to rename transport_opts as tls_opts, but don't see this mentioned in the migration doc.s (either it was before 1.0.0 or I just didn't find it). Just a side note.

@jainygaurav
Copy link
Author

@essen I get the following warnings

_build/default/lib/gun/src/gun_socks.erl:131: Warning: a term is constructed, but never used
_build/default/lib/gun/src/gun_socks.erl:136: Warning: a term is constructed, but never used

./rebar3 upgrade
===> Verifying dependencies...
===> Fetching base64url v1.0.1
===> Fetching gun v2.0.0-rc.1
===> Fetching jsx v3.0.0
===> Fetching cowlib v2.10.1
===> No upgrade needed for base64url
===> No upgrade needed for gun
===> No upgrade needed for jsx
===> No upgrade needed for cowlib

./rebar3 compile
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling cowlib
===> Compiling base64url
===> Compiling gun
_build/default/lib/gun/src/gun_socks.erl:131: Warning: a term is constructed, but never used
_build/default/lib/gun/src/gun_socks.erl:136: Warning: a term is constructed, but never used

===> Compiling jsx
===> Analyzing applications...
===> Compiling apns

@essen
Copy link
Member

essen commented Mar 7, 2021

It is mentioned in https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.3/

About the warning, what OTP version? Sounds like most recent OTP master.

@paulo-ferraz-oliveira
Copy link

It is mentioned in https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.3/

I see; I was specifically looking for transport_opts. Problem solved. Thanks.

@paulo-ferraz-oliveira
Copy link

paulo-ferraz-oliveira commented Mar 7, 2021

@essen: I can confirm the warning occurs with 19.3, for example, but you have a @todo around it, which is why when I imported it (internally) I really didn't care (also, not really using 19.3 anymore).


Edit: 20.3 also, 21.3 no longer and neither on 24-rc.1.

@jainygaurav
Copy link
Author

jainygaurav commented Mar 7, 2021

@essen I use OTP 19.3. Can I continue to use it or do I need to upgrade to OTP 21.3?

I have other dependencies which are tied to 19.3 and upgrading to 21.3 will not be easy for us.

@jainygaurav
Copy link
Author

jainygaurav commented Mar 7, 2021

@paulo-ferraz-oliveira I did not change transport_opts to tls_opts but it compiled with those warnings. Is that ok?

Do I need to change transport_opts to tls_opts?

I built apns with this code

find src/ -type f | xargs grep transport_opts
src/apns_connection.erl:  TransportOpts = transport_opts(Connection),
src/apns_connection.erl:                              , transport_opts => TransportOpts
src/apns_connection.erl:  TransportOpts = transport_opts(Connection),
src/apns_connection.erl:transport_opts(Connection) ->

@essen
Copy link
Member

essen commented Mar 7, 2021

Gun 2.0 I think is 22+, maybe it works with lesser versions but you might have to do minor modifications and such.

@jainygaurav
Copy link
Author

jainygaurav commented Mar 7, 2021

@essen Can you please point me to the modifications?

@essen
Copy link
Member

essen commented Mar 7, 2021

Can't, sorry.

@jainygaurav
Copy link
Author

ok

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

3 participants