Skip to content

net/http: apparent deadlock in TestHandlerFinishSkipBigContentLengthRead #62622

Closed
@bcmills

Description

@bcmills
#!watchflakes
post <- pkg == "net/http" && test == "TestHandlerFinishSkipBigContentLengthRead" && `panic: test timed out`

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

Built from source at https://go.dev/cl/527196.

Does this issue reproduce with the latest release?

Presumably.

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

go env Output
$ go env
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/usr/local/google/home/bcmills/.cache/go-build'
GOENV='/usr/local/google/home/bcmills/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/usr/local/google/home/bcmills/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/usr/local/google/home/bcmills'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/google/home/bcmills/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='local'
GOTOOLDIR='/usr/local/google/home/bcmills/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='devel go1.22-965e2d4a89 Wed Sep 13 15:12:58 2023 -0400'
GCCGO='/usr/bin/gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/usr/local/google/home/bcmills/go/src/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build613896623=/tmp/go-build -gno-record-gcc-switches'

What did you do?

~/go/src$ while go test -race net/http -count=1 ; do true; done

What did you expect to see?

Consistently passing tests.

What did you see instead?

Lots of passing tests, followed by an apparent deadlock.

panic: test timed out after 10m0s
running tests:
        TestHandlerFinishSkipBigContentLengthRead (9m41s)

goroutine 15012 [running]:
testing.(*M).startAlarm.func1()
        /usr/local/google/home/bcmills/go/src/testing/testing.go:2257 +0x214
created by time.goFunc
        /usr/local/google/home/bcmills/go/src/time/sleep.go:177 +0x45

goroutine 1 [chan receive, 9 minutes]:
testing.(*T).Run(0xc000104d00, {0xb8fdcc, 0x29}, 0xbbf158)
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1647 +0x856
testing.runTests.func1(0x0?)
        /usr/local/google/home/bcmills/go/src/testing/testing.go:2052 +0x86
testing.tRunner(0xc000104d00, 0xc000137aa0)
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1593 +0x21b
testing.runTests(0xc000122d20?, {0xf97ac0, 0x210, 0x210}, {0xc00014c390?, 0x10?, 0xf9c3c0?})
        /usr/local/google/home/bcmills/go/src/testing/testing.go:2050 +0x897
testing.(*M).Run(0xc000122d20)
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1923 +0xb58
net/http_test.TestMain(0x27f54a07e5eb5216?)
        /usr/local/google/home/bcmills/go/src/net/http/main_test.go:24 +0x65
main.main()
        _testmain.go:1169 +0x308

goroutine 48 [chan receive, 9 minutes]:
testing.(*T).Parallel(0xc0003044e0)
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1401 +0x570
net/http.TestCmdGoNoHTTPServer(0xc0003044e0)
        /usr/local/google/home/bcmills/go/src/net/http/http_test.go:55 +0x3f
testing.tRunner(0xc0003044e0, 0xbbeaa0)
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1593 +0x21b
created by testing.(*T).Run in goroutine 1
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1646 +0x82b

goroutine 49 [chan receive, 9 minutes]:
testing.(*T).Parallel(0xc000304680)
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1401 +0x570
net/http.TestOmitHTTP2(0xc000304680)
        /usr/local/google/home/bcmills/go/src/net/http/http_test.go:89 +0xfa
testing.tRunner(0xc000304680, 0xbbeb48)
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1593 +0x21b
created by testing.(*T).Run in goroutine 1
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1646 +0x82b

goroutine 50 [chan receive, 9 minutes]:
testing.(*T).Parallel(0xc000304820)
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1401 +0x570
net/http.TestOmitHTTP2Vet(0xc000304820)
        /usr/local/google/home/bcmills/go/src/net/http/http_test.go:101 +0x3c
testing.tRunner(0xc000304820, 0xbbeb50)
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1593 +0x21b
created by testing.(*T).Run in goroutine 1
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1646 +0x82b

goroutine 91 [chan receive, 9 minutes]:
testing.(*T).Parallel(0xc00029a680)
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1401 +0x570
net/http.TestRequestWriteTransport(0xc00029a680)
        /usr/local/google/home/bcmills/go/src/net/http/requestwrite_test.go:668 +0x3f
testing.tRunner(0xc00029a680, 0xbbebd8)
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1593 +0x21b
created by testing.(*T).Run in goroutine 1
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1646 +0x82b

goroutine 96 [chan receive, 9 minutes]:
testing.(*T).Parallel(0xc00029a4e0)
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1401 +0x570
net/http.TestReadResponseCloseInMiddle(0xc00029a4e0)
        /usr/local/google/home/bcmills/go/src/net/http/response_test.go:647 +0x3f
testing.tRunner(0xc00029a4e0, 0xbbeba8)
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1593 +0x21b
created by testing.(*T).Run in goroutine 1
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1646 +0x82b

goroutine 6455 [chan receive, 9 minutes]:
testing.(*T).Parallel(0xc0001ce340)
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1401 +0x570
net/http_test.TestConsumingBodyOnNextConn(0xc0001ce340)
        /usr/local/google/home/bcmills/go/src/net/http/serve_test.go:166 +0x3f
testing.tRunner(0xc0001ce340, 0xbbef40)
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1593 +0x21b
created by testing.(*T).Run in goroutine 1
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1646 +0x82b

goroutine 15029 [chan receive, 9 minutes]:
net/http_test.TestHandlerFinishSkipBigContentLengthRead(0xc0006d1860)
        /usr/local/google/home/bcmills/go/src/net/http/serve_test.go:4602 +0x355
testing.tRunner(0xc0006d1860, 0xbbf158)
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1593 +0x21b
created by testing.(*T).Run in goroutine 1
        /usr/local/google/home/bcmills/go/src/testing/testing.go:1646 +0x82b
FAIL    net/http        600.041s
FAIL

(CC @neild)

Metadata

Metadata

Assignees

Labels

FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.TestingAn issue that has been verified to require only test changes, not just a test failure.

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions