Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

x/net/internal/quic: deadlock in Endpoint.Close via connsMu #64982

Closed
gopherbot opened this issue Jan 6, 2024 · 3 comments
Closed

x/net/internal/quic: deadlock in Endpoint.Close via connsMu #64982

gopherbot opened this issue Jan 6, 2024 · 3 comments
Assignees
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@gopherbot
Copy link
Contributor

gopherbot commented Jan 6, 2024

#!watchflakes
post <- pkg == "golang.org/x/net/internal/quic" && log ~ `panic: test timed out` && log ~ `^\s+TestStreamsCreateConcurrency \(\d+m.*\)`

Issue created automatically to collect these failures.

Example (log):

panic: test timed out after 10m0s
running tests:
	TestStreamsCreateConcurrency (9m57s)

goroutine 382 [running]:
testing.(*M).startAlarm.func1()
	/tmp/workdir/go/src/testing/testing.go:2366 +0x386
created by time.goFunc
	/tmp/workdir/go/src/time/sleep.go:177 +0x29

watchflakes

@gopherbot gopherbot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 6, 2024
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/net/internal/quic" && test == ""
2024-01-04 19:50 netbsd-386-9_3 net@689bbc70 go@8088b6db x/net/internal/quic (log)
panic: test timed out after 10m0s
running tests:
	TestStreamsCreateConcurrency (9m57s)

goroutine 382 [running]:
testing.(*M).startAlarm.func1()
	/tmp/workdir/go/src/testing/testing.go:2366 +0x386
created by time.goFunc
	/tmp/workdir/go/src/time/sleep.go:177 +0x29

watchflakes

@gopherbot gopherbot added this to the Unreleased milestone Jan 6, 2024
@bcmills bcmills changed the title x/net/internal/quic: unrecognized failures x/net/internal/quic: timeout in TestStreamsCreateConcurrency Jan 8, 2024
@bcmills
Copy link
Contributor

bcmills commented Jan 8, 2024

Looks like a classic lock-ordering bug:

  • Endpoint.Close calls Conn.Abort with e.connsMu locked.
  • Conn.Abort calls Conn.sendMsg, which selects on c.msgc and c.donec.
  • c.donec is closed by Conn.Cleanup after a call to c.endpoint.connDrained.
  • Endpoint.connDrained acquires e.connsMu.

(attn @neild @jba)

@bcmills bcmills changed the title x/net/internal/quic: timeout in TestStreamsCreateConcurrency x/net/internal/quic: deadlock in Endpoint.Close via connsMu Jan 8, 2024
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/554695 mentions this issue: quic: avoid deadlock in Endpoint.Close

@golang golang locked and limited conversation to collaborators Jan 7, 2025
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Archived in project
Development

No branches or pull requests

3 participants