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

x/net/http2: seeing INTERNAL_ERROR #26338

Closed
sks opened this issue Jul 11, 2018 · 7 comments
Closed

x/net/http2: seeing INTERNAL_ERROR #26338

sks opened this issue Jul 11, 2018 · 7 comments

Comments

@sks
Copy link

sks commented Jul 11, 2018

Please answer these questions before submitting your issue. Thanks!

See #22235

What version of Go are you using (go version)?

go version
go version go1.10.3 darwin/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/~~~~/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/~~~~"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.10.3/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.10.3/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/s7/zl3h61ln5v997sb66f6z5lrm0000gn/T/go-build244221854=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

If possible, provide a recipe for reproducing the error.
Yes. gist with minimal reproduction steps

What did you expect to see?

File upload over slow connections should have been successful.

What did you see instead?

stream error: stream ID
@bradfitz
Copy link
Contributor

Why did you close it?

@sks
Copy link
Author

sks commented Jul 11, 2018

The issue was with the server ReadTimeout and WriteTimeout .
Sorry about the issue

@sks
Copy link
Author

sks commented Jul 11, 2018

Should have read the Documentation earlier.

I was not giving the ctx.Done() the proper respect it deserved

@sks
Copy link
Author

sks commented Jul 11, 2018

ReadTimeout was causing the context to get cancelled before the read operation.

I think the http server was throwing the stream error because of this.

It would have been nice if the ParseMultiPartForm knew about ReadTimeouts

@jba
Copy link
Contributor

jba commented Jul 19, 2018

I know this is closed, but I was hoping for a nice repro of INTERNAL_ERROR to understand googleapis/google-cloud-go#987 better.

When I follow the instructions in the gist using go1.10.3 on linux/amd64, I see

read tcp [::1]:8080->[::1]:50470: i/o timeout

@jba
Copy link
Contributor

jba commented Jul 19, 2018

Sorry, spoke too soon. That happens with HTTP. I do see INTERNAL_ERROR with HTTPS.

@10liuguang01
Copy link

That happens when the body of http request is large enough(eg: 200kb) and the server do not read the body.
So the server just read body, no matter it don't need the data in body.

primalmotion added a commit to PaloAltoNetworks/bahamut that referenced this issue Mar 9, 2020
It seems it is necessary to drain the request body in some situations when using http/2 otherwise it can cause stream errors.

See golang/go#26338
@golang golang locked and limited conversation to collaborators Jan 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants