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: data race in TestIdleConnChannelLeak #58746

Open
cuonglm opened this issue Feb 27, 2023 · 2 comments
Open

net/http: data race in TestIdleConnChannelLeak #58746

cuonglm opened this issue Feb 27, 2023 · 2 comments
Assignees
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@cuonglm
Copy link
Member

cuonglm commented Feb 27, 2023

https://storage.googleapis.com/go-build-log/7b8a05da/linux-amd64-race_7029367f.log

==================
WARNING: DATA RACE
Write at 0x000000f00218 by goroutine 1479:
  net/http.SetReadLoopBeforeNextReadHook()
      /workdir/go/src/net/http/export_test.go:76 +0x29e
  net/http_test.testIdleConnChannelLeak()
      /workdir/go/src/net/http/transport_test.go:3189 +0x1dd
  net/http_test.run[...].func1()
      /workdir/go/src/net/http/clientserver_test.go:90 +0x194
  testing.tRunner()
      /workdir/go/src/testing/testing.go:1579 +0x238
  testing.(*T).Run.func1()
      /workdir/go/src/testing/testing.go:1632 +0x44

Previous read at 0x000000f00218 by goroutine 1457:
  net/http.(*persistConn).readLoop()
      /workdir/go/src/net/http/transport.go:2108 +0x18f
  net/http.(*Transport).dialConn.func5()
      /workdir/go/src/net/http/transport.go:1772 +0x33

Goroutine 1479 (running) created at:
  testing.(*T).Run()
      /workdir/go/src/testing/testing.go:1632 +0x835
  net/http_test.run[...]()
      /workdir/go/src/net/http/clientserver_test.go:82 +0x390
  net/http_test.TestIdleConnChannelLeak()
      /workdir/go/src/net/http/transport_test.go:3174 +0xea
  testing.tRunner()
      /workdir/go/src/testing/testing.go:1579 +0x238
  testing.(*T).Run.func1()
      /workdir/go/src/testing/testing.go:1632 +0x44

Goroutine 1457 (finished) created at:
  net/http.(*Transport).dialConn()
      /workdir/go/src/net/http/transport.go:1772 +0x24d9
  net/http.(*Transport).dialConnFor()
      /workdir/go/src/net/http/transport.go:1463 +0x129
  net/http.(*Transport).queueForDial.func1()
      /workdir/go/src/net/http/transport.go:1432 +0x44
==================
--- FAIL: TestIdleConnChannelLeak (0.01s)
    --- FAIL: TestIdleConnChannelLeak/h1 (0.01s)
        testing.go:1449: race detected during execution of test
    testing.go:1449: race detected during execution of test
FAIL
FAIL	net/http	7.010s
FAIL
@cuonglm cuonglm added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 27, 2023
@cuonglm cuonglm added this to the Backlog milestone Feb 27, 2023
@cuonglm cuonglm self-assigned this Feb 27, 2023
@cuonglm cuonglm added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Feb 27, 2023
@gopherbot
Copy link

Change https://go.dev/cl/471555 mentions this issue: net/http: fix race condition with testHookReadLoopBeforeNextRead

@aclements
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants