Skip to content

net/http: HTTP/1 transport connection broken: readLoopPeekFailLocked: <nil> #15253

Closed
@owenthereal

Description

@owenthereal

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
$ go version
go version go1.6 linux/amd64
  1. What operating system and processor architecture are you using (go env)?
$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
  1. What did you do?
    If possible, provide a recipe for reproducing the error.
    A complete runnable program is good.
    A link on play.golang.org is best.

Proxying requests using httputil.ReverseProxy with a default http.Transport. A simplified version of the code is here.

  1. What did you expect to see?

We expect everything to run fine.

  1. What did you see instead?

There were errors net/http: HTTP/1 transport connection broken: readLoopPeekFailLocked: <nil>. The error happened occasionally and seemed to only happen to backend services that responds in gzip. This is the code that emitted the error.

After some investigation, we thought it might be related to keep alive that when all the buffers line up alright but EOF was seen (like from the gzip reader) and the connection was thought to be free again and was put back in the pool. Then when the next request uses that connection it saw the end of the chunked encoding. We disabled keel alive by setting DisableKeepAlives on the transport and the errors hasn't happened for the past 24 hours. We also dug around and thought it might be related to 18072ad (but don't quote us on that).

Let us know if you need more info.

/cc @dpiddy @spofdamon

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions