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/pprof: TestHandlers//debug/pprof/trace failures #65283

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

net/http/pprof: TestHandlers//debug/pprof/trace failures #65283

gopherbot opened this issue Jan 25, 2024 · 3 comments
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@gopherbot
Copy link

#!watchflakes
default <- pkg == "net/http/pprof" && test == "TestHandlers//debug/pprof/trace"

Issue created automatically to collect these failures.

Example (log):

=== RUN   TestHandlers//debug/pprof/trace
==================
WARNING: DATA RACE
Write at 0x00c0000264f0 by goroutine 35:
  runtime.closechan()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/chan.go:357 +0x0
  runtime.(*wakeableSleep).close()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/trace2.go:976 +0x54
  net/http/pprof.Trace()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/net/http/pprof/pprof.go:184 +0x469
...
  testing.tRunner()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1742 +0x44

Goroutine 39 (running) created at:
  [failed to restore the stack]
==================
    testing.go:1398: race detected during execution of test
--- FAIL: TestHandlers//debug/pprof/trace (1.01s)

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 25, 2024
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "net/http/pprof" && test == "TestHandlers//debug/pprof/trace"
2024-01-24 22:27 gotip-linux-amd64-race go@2c35def7 net/http/pprof.TestHandlers//debug/pprof/trace (log)
=== RUN   TestHandlers//debug/pprof/trace
==================
WARNING: DATA RACE
Write at 0x00c0000264f0 by goroutine 35:
  runtime.closechan()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/chan.go:357 +0x0
  runtime.(*wakeableSleep).close()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/trace2.go:976 +0x54
  net/http/pprof.Trace()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/net/http/pprof/pprof.go:184 +0x469
...
  testing.tRunner()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1742 +0x44

Goroutine 39 (running) created at:
  [failed to restore the stack]
==================
    testing.go:1398: race detected during execution of test
--- FAIL: TestHandlers//debug/pprof/trace (1.01s)

watchflakes

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jan 25, 2024
@mknyszek mknyszek self-assigned this Jan 31, 2024
@mknyszek mknyszek added this to the Backlog milestone Jan 31, 2024
@gopherbot
Copy link
Author

Change https://go.dev/cl/560215 mentions this issue: runtime: model wakeableSleep.lock in the race detector

@gopherbot
Copy link
Author

Change https://go.dev/cl/559956 mentions this issue: [release-branch.go1.22] runtime: model wakeableSleep.lock in the race detector

gopherbot pushed a commit that referenced this issue Feb 1, 2024
… detector

Currently the flight recorder tests are failing in race mode because the
race detector doesn't see s.lock, leading to false positives. This has
also appeared in the trace tests. Model the lock in the race detector.

Fixes #65207.
Fixes #65283.

Change-Id: I1e9a5c9606536f55fdfc46b5f8443e9c7213c23d
Reviewed-on: https://go-review.googlesource.com/c/go/+/560215
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
(cherry picked from commit 0b12e3d)
Reviewed-on: https://go-review.googlesource.com/c/go/+/559956
Auto-Submit: Michael Knyszek <mknyszek@google.com>
ezz-no pushed a commit to ezz-no/go-ezzno that referenced this issue Feb 18, 2024
Currently the flight recorder tests are failing in race mode because the
race detector doesn't see s.lock, leading to false positives. This has
also appeared in the trace tests. Model the lock in the race detector.

Fixes golang#65207.
Fixes golang#65283.

Change-Id: I1e9a5c9606536f55fdfc46b5f8443e9c7213c23d
Reviewed-on: https://go-review.googlesource.com/c/go/+/560215
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Status: Done
Development

No branches or pull requests

2 participants