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: apparent deadlock in TestServerFlushAndHijack #50008

Closed
bcmills opened this issue Dec 6, 2021 · 2 comments
Closed

net/http: apparent deadlock in TestServerFlushAndHijack #50008

bcmills opened this issue Dec 6, 2021 · 2 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Dec 6, 2021

goroutine 1835 [sync.Cond.Wait, 2 minutes]:
runtime.gopark(0x7ff63d6bf390?, 0x4000308a00?, 0x0?, 0x0?, 0xe7791f701?)
	C:/workdir/go/src/runtime/proc.go:366 +0xe8 fp=0x4000369800 sp=0x40003697e0 pc=0x7ff63d6594b8
runtime.goparkunlock(...)
	C:/workdir/go/src/runtime/proc.go:372
sync.runtime_notifyListWait(0x4000246050, 0x0)
	C:/workdir/go/src/runtime/sema.go:513 +0x178 fp=0x4000369850 sp=0x4000369800 pc=0x7ff63d682918
sync.(*Cond).Wait(0x4000246040)
	C:/workdir/go/src/sync/cond.go:56 +0xd8 fp=0x4000369890 sp=0x4000369850 pc=0x7ff63d68f348
net/http.(*connReader).abortPendingRead(0x40002fa000)
	C:/workdir/go/src/net/http/server.go:720 +0xc8 fp=0x40003698e0 sp=0x4000369890 pc=0x7ff63d894348
net/http.(*conn).hijackLocked(0x4000111cc0)
	C:/workdir/go/src/net/http/server.go:315 +0x34 fp=0x4000369960 sp=0x40003698e0 pc=0x7ff63d892ce4
net/http.(*response).Hijack(0x400030b0a0)
	C:/workdir/go/src/net/http/server.go:2034 +0x104 fp=0x40003699e0 sp=0x4000369960 pc=0x7ff63d89ab74
net/http_test.TestServerFlushAndHijack.func1({0x7ff63db36590?, 0x400030b0a0}, 0x7ff63d6bf390?)
	C:/workdir/go/src/net/http/serve_test.go:4405 +0x90 fp=0x4000369a50 sp=0x40003699e0 pc=0x7ff63d953740
net/http.HandlerFunc.ServeHTTP(0x0?, {0x7ff63db36590?, 0x400030b0a0?}, 0x7ff63d661cfc?)
	C:/workdir/go/src/net/http/server.go:2084 +0x3c fp=0x4000369a80 sp=0x4000369a50 pc=0x7ff63d89afbc
net/http.serverHandler.ServeHTTP({0x40002fa000?}, {0x7ff63db36590, 0x400030b0a0}, 0x400022ab00)
	C:/workdir/go/src/net/http/server.go:2916 +0x408 fp=0x4000369b40 sp=0x4000369a80 pc=0x7ff63d89e628
net/http.(*conn).serve(0x4000111cc0, {0x7ff63db36ae8, 0x40004dabd0})
	C:/workdir/go/src/net/http/server.go:1966 +0x550 fp=0x4000369fa0 sp=0x4000369b40 pc=0x7ff63d899cf0
net/http.(*Server).Serve.func3()
	C:/workdir/go/src/net/http/server.go:3071 +0x34 fp=0x4000369fd0 sp=0x4000369fa0 pc=0x7ff63d89f0c4
runtime.goexit()
	C:/workdir/go/src/runtime/asm_arm64.s:1259 +0x4 fp=0x4000369fd0 sp=0x4000369fd0 pc=0x7ff63d686d84
created by net/http.(*Server).Serve
	C:/workdir/go/src/net/http/server.go:3071 +0x448

…

goroutine 1831 [IO wait, 2 minutes]:
runtime.gopark(0x4000107890?, 0x0?, 0x98?, 0x87?, 0x4000308848?)
	C:/workdir/go/src/runtime/proc.go:366 +0xe8 fp=0x40002dd860 sp=0x40002dd840 pc=0x7ff63d6594b8
runtime.netpollblock(0x40002683c0?, 0x4?, 0x0?)
	C:/workdir/go/src/runtime/netpoll.go:453 +0x16c fp=0x40002dd8a0 sp=0x40002dd860 pc=0x7ff63d65004c
internal/poll.runtime_pollWait(0x1c35e4c1b60, 0x72)
	C:/workdir/go/src/runtime/netpoll.go:233 +0x9c fp=0x40002dd8c0 sp=0x40002dd8a0 pc=0x7ff63d680fdc
internal/poll.(*pollDesc).wait(0x0?, 0x7ff63d7d9408?, 0x0)
	C:/workdir/go/src/internal/poll/fd_poll_runtime.go:83 +0x2c fp=0x40002dd8f0 sp=0x40002dd8c0 pc=0x7ff63d6beeac
internal/poll.execIO(0x4000308798, 0x7ff63daae1b8)
	C:/workdir/go/src/internal/poll/fd_windows.go:175 +0xcc fp=0x40002dd950 sp=0x40002dd8f0 pc=0x7ff63d6bf89c
internal/poll.(*FD).Read(0x4000308780, {0x4000303000, 0x1000, 0x1000})
	C:/workdir/go/src/internal/poll/fd_windows.go:441 +0x278 fp=0x40002dd9e0 sp=0x40002dd950 pc=0x7ff63d6c0768
net.(*netFD).Read(0x4000308780, {0x4000303000?, 0x40003ffb18?, 0x7ff63d62be48?})
	C:/workdir/go/src/net/fd_posix.go:55 +0x2c fp=0x40002dda30 sp=0x40002dd9e0 pc=0x7ff63d7ca26c
net.(*conn).Read(0x40004f6198, {0x4000303000?, 0x4000079b28?, 0x7ff63d704e74?})
	C:/workdir/go/src/net/net.go:183 +0x38 fp=0x40002dda80 sp=0x40002dda30 pc=0x7ff63d7d5518
net/http.(*persistConn).Read(0x40004a07e0, {0x4000303000?, 0x4000079b18?, 0x7ff63d633250?})
	C:/workdir/go/src/net/http/transport.go:1926 +0x54 fp=0x40002ddae0 sp=0x40002dda80 pc=0x7ff63d8b2ba4
bufio.(*Reader).fill(0x400009a660)
	C:/workdir/go/src/bufio/bufio.go:106 +0x100 fp=0x40002ddb20 sp=0x40002ddae0 pc=0x7ff63d71c0c0
bufio.(*Reader).ReadSlice(0x400009a660, 0x1?)
	C:/workdir/go/src/bufio/bufio.go:371 +0x34 fp=0x40002ddb70 sp=0x40002ddb20 pc=0x7ff63d71cd64
net/http/internal.readChunkLine(0x400030307d?)
	C:/workdir/go/src/net/http/internal/chunked.go:129 +0x24 fp=0x40002ddbc0 sp=0x40002ddb70 pc=0x7ff63d851d44
net/http/internal.(*chunkedReader).beginChunk(0x40004dac30)
	C:/workdir/go/src/net/http/internal/chunked.go:48 +0x2c fp=0x40002ddbf0 sp=0x40002ddbc0 pc=0x7ff63d85178c
net/http/internal.(*chunkedReader).Read(0x40004dac30, {0x40003c4007?, 0x4000079cd8?, 0x7ff63d62b70c?})
	C:/workdir/go/src/net/http/internal/chunked.go:98 +0x140 fp=0x40002ddc80 sp=0x40002ddbf0 pc=0x7ff63d851a70
net/http.(*body).readLocked(0x40003363c0, {0x40003c4007?, 0x1c35e5e03c0?, 0x7ff63d855f35?})
	C:/workdir/go/src/net/http/transfer.go:844 +0x40 fp=0x40002ddcd0 sp=0x40002ddc80 pc=0x7ff63d8a86c0
net/http.(*body).Read(0x0?, {0x40003c4007?, 0x200000101011d20?, 0x1c35e5e03c0?})
	C:/workdir/go/src/net/http/transfer.go:836 +0x13c fp=0x40002ddd40 sp=0x40002ddcd0 pc=0x7ff63d8a859c
net/http.(*bodyEOFSignal).Read(0x4000336400, {0x40003c4007, 0x1f9, 0x1f9})
	C:/workdir/go/src/net/http/transport.go:2768 +0x17c fp=0x40002dddd0 sp=0x40002ddd40 pc=0x7ff63d8b6e7c
io.ReadAll({0x7ff63db338c8, 0x4000336400})
	C:/workdir/go/src/io/io.go:645 +0xe4 fp=0x40002dde60 sp=0x40002dddd0 pc=0x7ff63d6b8d94
net/http_test.TestServerFlushAndHijack(0x4000280820)
	C:/workdir/go/src/net/http/serve_test.go:4420 +0x18c fp=0x40002ddf60 sp=0x40002dde60 pc=0x7ff63d95349c
testing.tRunner(0x4000280820, 0x7ff63daaf4b8)
	C:/workdir/go/src/testing/testing.go:1410 +0x110 fp=0x40002ddfb0 sp=0x40002ddf60 pc=0x7ff63d717190
testing.(*T).Run.func1()
	C:/workdir/go/src/testing/testing.go:1457 +0x30 fp=0x40002ddfd0 sp=0x40002ddfb0 pc=0x7ff63d717f00
runtime.goexit()
	C:/workdir/go/src/runtime/asm_arm64.s:1259 +0x4 fp=0x40002ddfd0 sp=0x40002ddfd0 pc=0x7ff63d686d84
created by testing.(*T).Run
	C:/workdir/go/src/testing/testing.go:1457 +0x328

greplogs --dashboard -md -l -e 'goroutine \d+ \[IO wait, \d+ minutes\]:\n(?:.+\n\t.+\n)*net/http_test\.TestServerFlushAndHijack' --since=2021-03-05

2021-12-02T22:03:11-d3bf627/windows-arm64-10

(CC @neild @ianlancetaylor @bradfitz)

@bcmills
Copy link
Contributor Author

bcmills commented Dec 6, 2021

These stack traces are very similar to (but do not exactly match) the ones in #44783.

@toothrot toothrot added this to the Backlog milestone Dec 6, 2021
@toothrot toothrot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Dec 6, 2021
@bcmills
Copy link
Contributor Author

bcmills commented Aug 30, 2023

There have been a lot of net/http fixes since this issue was filed, and watchflakes will file a new issue should it recur. Closing as obsolete.

@bcmills bcmills closed this as completed Aug 30, 2023
@bcmills bcmills closed this as not planned Won't fix, can't repro, duplicate, stale Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

2 participants