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

panic: runtime error: invalid memory address or nil pointer dereference #145

Closed
hn0pw opened this issue Jan 29, 2017 · 6 comments
Closed

Comments

@hn0pw
Copy link

hn0pw commented Jan 29, 2017

At the moment we have a lot f restarts of the centrifugo ssl service (~every 5mins)
Version: 1.6.3 on Ubuntu 16.04.1 LTS

In the syslog i got the following messages:

Jan 29 11:27:23 ws centrifugo[4223]: panic: runtime error: invalid memory address or nil pointer dereference
Jan 29 11:27:23 ws centrifugo[4223]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x5cb4a5]
Jan 29 11:27:23 ws centrifugo[4223]: goroutine 36161527 [running]:
Jan 29 11:27:23 ws centrifugo[4223]: panic(0x904a00, 0xc420010070)
Jan 29 11:27:23 ws centrifugo[4223]: #011/home/travis/.gimme/versions/go1.7.4.linux.amd64/src/runtime/panic.go:500 +0x1a1
Jan 29 11:27:23 ws centrifugo[4223]: net/http.(*http2responseWriter).CloseNotify.func1(0xc4546dd180, 0xc51dffb5e0)
Jan 29 11:27:23 ws centrifugo[4223]: #011/home/travis/.gimme/versions/go1.7.4.linux.amd64/src/net/http/h2_bundle.go:4700 +0x25
Jan 29 11:27:23 ws centrifugo[4223]: created by net/http.(*http2responseWriter).CloseNotify
Jan 29 11:27:23 ws centrifugo[4223]: #011/home/travis/.gimme/versions/go1.7.4.linux.amd64/src/net/http/h2_bundle.go:4702 +0xda

Because of the repeating restarts, the client connection count is going up:
image
The first spike to 0 connections was the start i think..

Do you have an idea if it's a problem of centrifugo or system configuration?

@FZambia
Copy link
Member

FZambia commented Jan 29, 2017

@ramon-ga this looks like Go issue as panic happens inside HTTP/2 implementation.

See golang/go#17868 - this commit most probably solves panic - but it have not been included into recent 1.7.5 for some reason...

@hn0pw
Copy link
Author

hn0pw commented Jan 29, 2017

Yes, because of that i disabled the http2 temporary with GODEBUG="http2server=0" now.
To add this the simple way, add it to /etc/default/centrifugo.
Hopefully with this it did not crash anymore.

Running now for 45min without crashing.

Active: active (running) since Sun 2017-01-29 13:24:38 CET; 45min ago

@FZambia
Copy link
Member

FZambia commented Jan 29, 2017

@ramon-ga commit 329fe35 should fix it

@FZambia
Copy link
Member

FZambia commented Jan 30, 2017

@ramon-ga could we wait for a couple of days until Go 1.8 out to make new release? It will contain fixes for this panic so no need to use x/net/http2 lib

@hn0pw
Copy link
Author

hn0pw commented Jan 30, 2017

Wow, you're fast!
From my side this is ok. With disabling the http2 server we're up since 21h, so we have a temporary workaround for the problem.

@FZambia
Copy link
Member

FZambia commented Feb 4, 2017

@ramon-ga released v1.6.4 using Go 1.7.5, new release must fix this issue - feel free to reopen in case it does not.

@FZambia FZambia closed this as completed Feb 4, 2017
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