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

net/http: net/http.(*http2pipe).Write: invalid memory address or nil pointer dereference #13932

Closed
karmeye opened this issue Jan 13, 2016 · 5 comments

Comments

Projects
None yet
3 participants
@karmeye
Copy link

commented Jan 13, 2016

Using latest code in the master branch (771da53)

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x30 pc=0x48d65b]

goroutine 48 [running]:
net/http.(*http2pipe).Write(0xc82a437d60, 0xc8201540a0, 0x98, 0x98, 0x0, 0x0, 0x0)
    /usr/local/go/src/net/http/h2_bundle.go:2170 +0x1bb
net/http.(*http2clientConnReadLoop).processData(0xc8203e23c0, 0xc8207c9590, 0x0, 0x0)
    /usr/local/go/src/net/http/h2_bundle.go:5359 +0x1a1
net/http.(*http2clientConnReadLoop).run(0xc8203e23c0, 0x0, 0x0)
    /usr/local/go/src/net/http/h2_bundle.go:5129 +0x4a4
net/http.(*http2ClientConn).readLoop(0xc8203929a0)
    /usr/local/go/src/net/http/h2_bundle.go:5072 +0x162
created by net/http.(*http2Transport).NewClientConn
    /usr/local/go/src/net/http/h2_bundle.go:4601 +0xd7d

Possibly this occurred just after numerous errors returned by http.NewRequest or client.Do:

Post https://172.31.29.132:8001/hello: connection error: COMPRESSION_ERROR

@bradfitz bradfitz self-assigned this Jan 13, 2016

@bradfitz bradfitz added this to the Go1.6 milestone Jan 13, 2016

@bradfitz

This comment has been minimized.

Copy link
Member

commented Jan 13, 2016

I have a theory about this one, but still investigating.

Which HTTP/2 server are you running this against? Is it Go or nginx or Apache or .... ?

My theory involves a specific frame order arriving. I know there's a bug in the client to cause it to crash (your stacktrace above), but I'm not sure whether there's also a bug in the Go server.

@bradfitz

This comment has been minimized.

Copy link
Member

commented Jan 13, 2016

Also, how did the compression error occur?

@bradfitz

This comment has been minimized.

Copy link
Member

commented Jan 13, 2016

Can you update to tip and reproduce again with GODEBUG=http2debug=2 set in your environment and include the debug logs of the frames received?

@gopherbot

This comment has been minimized.

Copy link

commented Jan 13, 2016

CL https://golang.org/cl/18576 mentions this issue.

gopherbot pushed a commit to golang/net that referenced this issue Jan 13, 2016

http2: add Transport strictness, paranoia, logging for unwanted DATA …
…frames

I can't reproduce the user's bug yet, but this might fix or at least
help clarify what's happening.

Also deflakes a test.

Updates golang/go#13932

Change-Id: If56bdd833f183d4502701e65e56749434bd82150
Reviewed-on: https://go-review.googlesource.com/18576
Reviewed-by: Andrew Gerrand <adg@golang.org>
@bradfitz

This comment has been minimized.

Copy link
Member

commented Jan 14, 2016

The above commit should at least fix the crash. I'm going to mark this closed, at least until I hear more details on how to reproduce.

@bradfitz bradfitz closed this Jan 14, 2016

@golang golang locked and limited conversation to collaborators Jan 13, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.