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: flaky tests on macOS #33585

Open
FiloSottile opened this issue Aug 11, 2019 · 1 comment
Open

net/http: flaky tests on macOS #33585

FiloSottile opened this issue Aug 11, 2019 · 1 comment

Comments

@FiloSottile
Copy link
Member

@FiloSottile FiloSottile commented Aug 11, 2019

$ go version
go version devel +8b058cfbce Sun Aug 11 15:44:08 2019 +0000 darwin/amd64
go env Output
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/valsorda/Library/Caches/go-build"
GOENV="/Users/valsorda/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/valsorda"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org"
GOROOT="/Users/valsorda/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/valsorda/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/valsorda/go/src/go.mod"
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/df/mrk3bfz149n8zb5h5p1vp_1m00hbbm/T/go-build710921669=/tmp/go-build -gno-record-gcc-switches -fno-common"

Got a mix of these test failures running go test -count 100 net/http on macOS Mojave 10.14.5.

--- FAIL: TestTransportConcurrency (0.11s)
    transport_test.go:1802: error on req request-363: Get http://127.0.0.1:52910/?echo=request-363: read tcp 127.0.0.1:53104->127.0.0.1:52910: read: connection reset by peer
--- FAIL: TestTransportConcurrency (0.26s)
    transport_test.go:1802: error on req request-17: Get http://127.0.0.1:56414/?echo=request-17: read tcp 127.0.0.1:56415->127.0.0.1:56414: read: connection reset by peer
--- FAIL: TestTransportConcurrency (0.24s)
    transport_test.go:1802: error on req request-0: Get http://127.0.0.1:55567/?echo=request-0: write tcp 127.0.0.1:55570->127.0.0.1:55567: write: broken pipe
--- FAIL: TestServerEmptyBodyRace_h1 (0.01s)
    serve_test.go:4289: Get http://127.0.0.1:60346: read tcp 127.0.0.1:60347->127.0.0.1:60346: read: connection reset by peer
    serve_test.go:4302: handler ran 19 times; want 20
--- FAIL: TestTransportDiscardsUnneededConns (0.03s)
    clientserver_test.go:1003: Get: Get https://127.0.0.1:51848: write tcp 127.0.0.1:51854->127.0.0.1:51848: write: broken pipe
--- FAIL: TestTransportPersistConnLeak (0.01s)
    transport_test.go:1579: client fetch error: Get http://127.0.0.1:62971: read tcp 127.0.0.1:62976->127.0.0.1:62971: read: connection reset by peer
    transport_test.go:1579: client fetch error: Get http://127.0.0.1:62971: read tcp 127.0.0.1:62972->127.0.0.1:62971: read: connection reset by peer
    transport_test.go:1579: client fetch error: Get http://127.0.0.1:62971: read tcp 127.0.0.1:62979->127.0.0.1:62971: read: connection reset by peer
    transport_test.go:1579: client fetch error: Get http://127.0.0.1:62971: read tcp 127.0.0.1:62975->127.0.0.1:62971: read: connection reset by peer
    transport_test.go:1579: client fetch error: Get http://127.0.0.1:62971: read tcp 127.0.0.1:62974->127.0.0.1:62971: read: connection reset by peer
    transport_test.go:1579: client fetch error: Get http://127.0.0.1:62971: read tcp 127.0.0.1:62977->127.0.0.1:62971: read: connection reset by peer
    transport_test.go:1579: client fetch error: Get http://127.0.0.1:62971: write tcp 127.0.0.1:62988->127.0.0.1:62971: write: broken pipe
    transport_test.go:1579: client fetch error: Get http://127.0.0.1:62971: read tcp 127.0.0.1:62978->127.0.0.1:62971: read: connection reset by peer
panic: Fail in goroutine after TestTransportPersistConnLeak has completed

goroutine 6888 [running]:
testing.(*common).Fail(0xc0000ec400)
	/Users/valsorda/go/src/testing/testing.go:609 +0x151
testing.(*common).Errorf(0xc0000ec400, 0x1591950, 0x16, 0xc00028cf98, 0x1, 0x1)
	/Users/valsorda/go/src/testing/testing.go:704 +0x90
net/http_test.TestTransportPersistConnLeak.func2(0xc0006148a0, 0xc000232ae0, 0xc000640200, 0xc0000ec400, 0xc000640280)
	/Users/valsorda/go/src/net/http/transport_test.go:1579 +0xec
created by net/http_test.TestTransportPersistConnLeak
	/Users/valsorda/go/src/net/http/transport_test.go:1575 +0x256
panic: Fail in goroutine after TestTransportPersistConnLeak has completed

goroutine 6867 [running]:
testing.(*common).Fail(0xc0000ec400)
	/Users/valsorda/go/src/testing/testing.go:609 +0x151
testing.(*common).Errorf(0xc0000ec400, 0x1591950, 0x16, 0xc0002e7f98, 0x1, 0x1)
	/Users/valsorda/go/src/testing/testing.go:704 +0x90
net/http_test.TestTransportPersistConnLeak.func2(0xc0006148a0, 0xc000232ae0, 0xc000640200, 0xc0000ec400, 0xc000640280)
	/Users/valsorda/go/src/net/http/transport_test.go:1579 +0xec
created by net/http_test.TestTransportPersistConnLeak
	/Users/valsorda/go/src/net/http/transport_test.go:1575 +0x256
panic: Fail in goroutine after TestTransportPersistConnLeak has completed

goroutine 6880 [running]:
testing.(*common).Fail(0xc0000ec400)
	/Users/valsorda/go/src/testing/testing.go:609 +0x151
testing.(*common).Errorf(0xc0000ec400, 0x1591950, 0x16, 0xc00034af98, 0x1, 0x1)
	/Users/valsorda/go/src/testing/testing.go:704 +0x90
net/http_test.TestTransportPersistConnLeak.func2(0xc0006148a0, 0xc000232ae0, 0xc000640200, 0xc0000ec400, 0xc000640280)
	/Users/valsorda/go/src/net/http/transport_test.go:1579 +0xec
created by net/http_test.TestTransportPersistConnLeak
	/Users/valsorda/go/src/net/http/transport_test.go:1575 +0x256
exit status 2

Seems similar to #18541, which did not have a clear resolution.

/cc @bradfitz

@bcmills

This comment has been minimized.

Copy link
Member

@bcmills bcmills commented Aug 12, 2019

See also:

  • #22540 (TestServerEmptyBodyRace_h2 on macOS)
  • #14887, #14375, #4822 (previous flakiness in TestTransportPersistConnLeak)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.