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

http: panic serving 172.16.0.3:55686: runtime error: invalid memory address or nil pointer dereference #480

Closed
tomwilkie opened this issue Sep 14, 2015 · 1 comment
Assignees
Labels
bug Broken end user or developer functionality; not working as the developers intended it

Comments

@tomwilkie
Copy link
Contributor

I'm seeing this quite often in my logs:

2015/09/14 03:56:21 http: panic serving 172.16.0.3:55686: runtime error: invalid memory address or nil pointer dereference
goroutine 194 [running]:
net/http.func·011()
    /usr/local/go/src/net/http/server.go:1130 +0xbb
compress/gzip.(*Reader).Close(0x0, 0x0, 0x0)
    /usr/local/go/src/compress/gzip/gunzip.go:287 +0x6c
main.func·008()
    /home/vagrant/src/github.com/weaveworks/scope/app/router.go:85 +0x39
main.func·009(0x7fd3033c3f10, 0xc2081434a0, 0xc2082fe340)
    /home/vagrant/src/github.com/weaveworks/scope/app/router.go:93 +0x230
net/http.HandlerFunc.ServeHTTP(0xc208130990, 0x7fd3033c3f10, 0xc2081434a0, 0xc2082fe340)
    /usr/local/go/src/net/http/server.go:1265 +0x41
github.com/gorilla/mux.(*Router).ServeHTTP(0xc20800ce60, 0x7fd3033c3f10, 0xc2081434a0, 0xc2082fe340)
    /home/vagrant/src/github.com/gorilla/mux/mux.go:98 +0x297
net/http.(*ServeMux).ServeHTTP(0xc20803a870, 0x7fd3033c3f10, 0xc2081434a0, 0xc2082fe340)
    /usr/local/go/src/net/http/server.go:1541 +0x17d
net/http.serverHandler.ServeHTTP(0xc2080625a0, 0x7fd3033c3f10, 0xc2081434a0, 0xc2082fe340)
    /usr/local/go/src/net/http/server.go:1703 +0x19a
net/http.(*conn).serve(0xc208143040)
    /usr/local/go/src/net/http/server.go:1204 +0xb57
created by net/http.(*Server).Serve
    /usr/local/go/src/net/http/server.go:1751 +0x35e
@tomwilkie tomwilkie added the bug Broken end user or developer functionality; not working as the developers intended it label Sep 14, 2015
@tomwilkie
Copy link
Contributor Author

According to the docs (http://golang.org/pkg/net/http/#Request):

// The Server will close the request body. The ServeHTTP
// Handler does not need to.

Seems to be coming from us closing the body on the server when the gzip decoding fails. Don't know why its failing, but we don't need to close the body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Broken end user or developer functionality; not working as the developers intended it
Projects
None yet
Development

No branches or pull requests

1 participant