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: race detected in TestTransportReadToEndReusesConn #58264

Closed
gopherbot opened this issue Feb 2, 2023 · 8 comments
Closed

net/http: race detected in TestTransportReadToEndReusesConn #58264

gopherbot opened this issue Feb 2, 2023 · 8 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Comments

@gopherbot
Copy link

gopherbot commented Feb 2, 2023

#!watchflakes
post <- pkg == "net/http" && `WARNING: DATA RACE`

Issue created automatically to collect these failures.

Example (log):

--- FAIL: TestTransportReadToEndReusesConn (0.03s)
    --- FAIL: TestTransportReadToEndReusesConn/h1 (0.07s)
        testing.go:1446: race detected during execution of test
    --- FAIL: TestTransportReadToEndReusesConn/h2 (0.06s)
        testing.go:1446: race detected during execution of test

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 Feb 2, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "net/http" && test == "TestTransportReadToEndReusesConn"
2023-02-01 21:30 darwin-amd64-race go@4b7f7eef net/http.TestTransportReadToEndReusesConn (log)
--- FAIL: TestTransportReadToEndReusesConn (0.03s)
    --- FAIL: TestTransportReadToEndReusesConn/h1 (0.07s)
        testing.go:1446: race detected during execution of test
    --- FAIL: TestTransportReadToEndReusesConn/h2 (0.06s)
        testing.go:1446: race detected during execution of test

watchflakes

@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "net/http" && test == "TestTransportReadToEndReusesConn"
2023-02-01 19:47 linux-amd64-race go@ab0f0459 net/http.TestTransportReadToEndReusesConn (log)
--- FAIL: TestTransportReadToEndReusesConn (0.00s)

watchflakes

@bcmills
Copy link
Contributor

bcmills commented Feb 2, 2023

Duplicate of #58168

@bcmills bcmills marked this as a duplicate of #58168 Feb 2, 2023
@bcmills bcmills closed this as not planned Won't fix, can't repro, duplicate, stale Feb 2, 2023
@gopherbot gopherbot reopened this Apr 28, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "net/http" && `WARNING: DATA RACE`
2023-04-28 01:33 linux-amd64-race go@71ad46cd net/http.TestNoSniffExpectRequestBody (log)
==================
WARNING: DATA RACE
Read at 0x00c0003bb083 by goroutine 12560:
  testing.(*common).logDepth()
      /workdir/go/src/testing/testing.go:1017 +0x4af
  testing.(*common).log()
      /workdir/go/src/testing/testing.go:1004 +0x99
  testing.(*common).Logf()
      /workdir/go/src/testing/testing.go:1055 +0x62
  net/http_test.testServerExpect.func2.1()
...
  net/http_test.TestMain()
      /workdir/go/src/net/http/main_test.go:24 +0x64
  main.main()
      _testmain.go:1127 +0x307
==================
--- FAIL: TestNoSniffExpectRequestBody (0.00s)
    --- FAIL: TestNoSniffExpectRequestBody/h2 (0.06s)
        testing.go:1465: race detected during execution of test
    --- FAIL: TestNoSniffExpectRequestBody/h1 (0.05s)
        testing.go:1465: race detected during execution of test

watchflakes

@gopherbot
Copy link
Author

Change https://go.dev/cl/490255 mentions this issue: net/http: avoid leaking the writing goroutine

@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "net/http" && `WARNING: DATA RACE`
2023-05-01 17:49 linux-amd64-longtest-race go@73a4684c net/http.TestWriteDeadlineEnforcedPerStream (log)
==================
WARNING: DATA RACE
Read at 0x00c000512218 by goroutine 6799:
  net/http_test.testWriteDeadlineEnforcedPerStream.func1()
      /workdir/go/src/net/http/serve_test.go:871 +0x37
  net/http.HandlerFunc.ServeHTTP()
      /workdir/go/src/net/http/server.go:2131 +0x47
  net/http.serverHandler.ServeHTTP()
      /workdir/go/src/net/http/server.go:2933 +0x29e
  net/http.(*conn).serve()
...
Goroutine 6792 (finished) created at:
  net/http.(*Server).Serve()
      /workdir/go/src/net/http/server.go:3081 +0x80c
  net/http/httptest.(*Server).goServe.func1()
      /workdir/go/src/net/http/httptest/server.go:310 +0xaa
==================
--- FAIL: TestWriteDeadlineEnforcedPerStream (0.66s)
    --- FAIL: TestWriteDeadlineEnforcedPerStream/h1 (0.51s)
        testing.go:1465: race detected during execution of test
    testing.go:1465: race detected during execution of test

watchflakes

gopherbot pushed a commit that referenced this issue May 2, 2023
The test will wait for all goroutines.
A race can occur if the writing goroutine uses the Log after the test exits.

For #58264
For #59883
For #59884

Change-Id: I9b8ec7c9d024ff74b922b69efa438be5a4fa3483
Reviewed-on: https://go-review.googlesource.com/c/go/+/490255
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "net/http" && `WARNING: DATA RACE`
2023-07-06 19:41 linux-amd64-race go@312920c0 net/http.TestOnlyWriteTimeout (log)
==================
WARNING: DATA RACE
Read at 0x00c0004d81e3 by goroutine 12452:
  testing.(*common).logDepth()
      /workdir/go/src/testing/testing.go:998 +0x4c4
  testing.(*common).log()
      /workdir/go/src/testing/testing.go:985 +0xa4
  testing.(*common).Logf()
      /workdir/go/src/testing/testing.go:1036 +0x6a
  net/http_test.testServerExpect.func2.1()
...
  testing.(*M).Run()
      /workdir/go/src/testing/testing.go:1906 +0xb44
  net/http_test.TestMain()
      /workdir/go/src/net/http/main_test.go:23 +0x2e
  main.main()
      _testmain.go:1119 +0x324
==================
--- FAIL: TestOnlyWriteTimeout (0.00s)
    --- FAIL: TestOnlyWriteTimeout/h1 (0.02s)
        testing.go:1446: race detected during execution of test

watchflakes

@bcmills bcmills changed the title net/http: TestTransportReadToEndReusesConn failures net/http: race detected in TestTransportReadToEndReusesConn Jul 11, 2023
@bcmills
Copy link
Contributor

bcmills commented Jul 11, 2023

Removing from the “Test Flakes” project to get watchflakes to open new issues for what appear to be independent failures.

@bcmills bcmills closed this as not planned Won't fix, can't repro, duplicate, stale Jul 11, 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