Skip to content

x/exp/trace: TestFlightRecorderOneGeneration failures #65207

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

Closed
gopherbot opened this issue Jan 22, 2024 · 10 comments
Closed

x/exp/trace: TestFlightRecorderOneGeneration failures #65207

gopherbot opened this issue Jan 22, 2024 · 10 comments
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. 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

#!watchflakes
default <- pkg == "golang.org/x/exp/trace" && test == "TestFlightRecorderOneGeneration"

Issue created automatically to collect these failures.

Example (log):

==================
WARNING: DATA RACE
Write at 0x00c0000203d0 by goroutine 84:
  runtime.closechan()
      /workdir/go/src/runtime/chan.go:357 +0x0
  runtime.(*wakeableSleep).close()
      /workdir/go/src/runtime/trace2.go:976 +0x54
  golang.org/x/exp/trace.(*FlightRecorder).Stop()
      /workdir/gopath/src/golang.org/x/exp/trace/flightrecorder.go:225 +0x75
  golang.org/x/exp/trace_test.testFlightRecorder()
...
      /workdir/go/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /workdir/go/src/testing/testing.go:1742 +0x44

Goroutine 92 (running) created at:
  [failed to restore the stack]
==================
--- FAIL: TestFlightRecorderOneGeneration (6.02s)
    --- FAIL: TestFlightRecorderOneGeneration/SetPeriod (3.01s)
        testing.go:1398: 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 Jan 22, 2024
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/exp/trace" && test == "TestFlightRecorderOneGeneration"
2024-01-19 08:35 linux-amd64-longtest-race exp@1b970713 go@40fab294 x/exp/trace.TestFlightRecorderOneGeneration (log)
==================
WARNING: DATA RACE
Write at 0x00c0000203d0 by goroutine 84:
  runtime.closechan()
      /workdir/go/src/runtime/chan.go:357 +0x0
  runtime.(*wakeableSleep).close()
      /workdir/go/src/runtime/trace2.go:976 +0x54
  golang.org/x/exp/trace.(*FlightRecorder).Stop()
      /workdir/gopath/src/golang.org/x/exp/trace/flightrecorder.go:225 +0x75
  golang.org/x/exp/trace_test.testFlightRecorder()
...
      /workdir/go/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /workdir/go/src/testing/testing.go:1742 +0x44

Goroutine 92 (running) created at:
  [failed to restore the stack]
==================
--- FAIL: TestFlightRecorderOneGeneration (6.02s)
    --- FAIL: TestFlightRecorderOneGeneration/SetPeriod (3.01s)
        testing.go:1398: race detected during execution of test

watchflakes

@gopherbot gopherbot added this to the Unreleased milestone Jan 22, 2024
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/exp/trace" && test == "TestFlightRecorderOneGeneration"
2024-01-19 08:35 linux-amd64-longtest-race exp@1b970713 go@558919b4 x/exp/trace.TestFlightRecorderOneGeneration (log)
==================
WARNING: DATA RACE
Write at 0x00c000020430 by goroutine 93:
  runtime.closechan()
      /workdir/go/src/runtime/chan.go:357 +0x0
  runtime.(*wakeableSleep).close()
      /workdir/go/src/runtime/trace2.go:976 +0x54
  golang.org/x/exp/trace.(*FlightRecorder).Stop()
      /workdir/gopath/src/golang.org/x/exp/trace/flightrecorder.go:225 +0x75
  golang.org/x/exp/trace_test.testFlightRecorder()
...
      /workdir/go/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /workdir/go/src/testing/testing.go:1742 +0x44

Goroutine 90 (running) created at:
  [failed to restore the stack]
==================
--- FAIL: TestFlightRecorderOneGeneration (6.01s)
    --- FAIL: TestFlightRecorderOneGeneration/SetSize (3.01s)
        testing.go:1398: race detected during execution of test

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/exp/trace" && test == "TestFlightRecorderOneGeneration"
2024-01-19 08:35 linux-amd64-race exp@1b970713 go@e5eeadb2 x/exp/trace.TestFlightRecorderOneGeneration (log)
==================
WARNING: DATA RACE
Write at 0x00c000020190 by goroutine 92:
  runtime.closechan()
      /workdir/go/src/runtime/chan.go:357 +0x0
  runtime.(*wakeableSleep).close()
      /workdir/go/src/runtime/trace2.go:976 +0x54
  golang.org/x/exp/trace.(*FlightRecorder).Stop()
      /workdir/gopath/src/golang.org/x/exp/trace/flightrecorder.go:225 +0x75
  golang.org/x/exp/trace_test.testFlightRecorder()
...
      /workdir/go/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /workdir/go/src/testing/testing.go:1742 +0x44

Goroutine 90 (running) created at:
  [failed to restore the stack]
==================
--- FAIL: TestFlightRecorderOneGeneration (6.01s)
    --- FAIL: TestFlightRecorderOneGeneration/SetSize (3.01s)
        testing.go:1398: race detected during execution of test

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/exp/trace" && test == "TestFlightRecorderOneGeneration"
2024-01-19 08:35 linux-amd64-race exp@1b970713 go@d0dc93c8 x/exp/trace.TestFlightRecorderOneGeneration (log)
==================
WARNING: DATA RACE
Write at 0x00c0003c41f0 by goroutine 92:
  runtime.closechan()
      /workdir/go/src/runtime/chan.go:357 +0x0
  runtime.(*wakeableSleep).close()
      /workdir/go/src/runtime/trace2.go:976 +0x54
  golang.org/x/exp/trace.(*FlightRecorder).Stop()
      /workdir/gopath/src/golang.org/x/exp/trace/flightrecorder.go:225 +0x75
  golang.org/x/exp/trace_test.testFlightRecorder()
...
      /workdir/go/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /workdir/go/src/testing/testing.go:1742 +0x44

Goroutine 90 (running) created at:
  [failed to restore the stack]
==================
--- FAIL: TestFlightRecorderOneGeneration (6.01s)
    --- FAIL: TestFlightRecorderOneGeneration/SetSize (3.01s)
        testing.go:1398: race detected during execution of test

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/exp/trace" && test == "TestFlightRecorderOneGeneration"
2024-01-19 08:35 linux-amd64-race exp@1b970713 go@6037c8a8 x/exp/trace.TestFlightRecorderOneGeneration (log)
==================
WARNING: DATA RACE
Write at 0x00c000020190 by goroutine 84:
  runtime.closechan()
      /workdir/go/src/runtime/chan.go:357 +0x0
  runtime.(*wakeableSleep).close()
      /workdir/go/src/runtime/trace2.go:976 +0x54
  golang.org/x/exp/trace.(*FlightRecorder).Stop()
      /workdir/gopath/src/golang.org/x/exp/trace/flightrecorder.go:225 +0x75
  golang.org/x/exp/trace_test.testFlightRecorder()
...
      /workdir/go/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /workdir/go/src/testing/testing.go:1742 +0x44

Goroutine 92 (running) created at:
  [failed to restore the stack]
==================
--- FAIL: TestFlightRecorderOneGeneration (6.01s)
    --- FAIL: TestFlightRecorderOneGeneration/SetPeriod (3.01s)
        testing.go:1398: race detected during execution of test

watchflakes

@mknyszek mknyszek self-assigned this Jan 25, 2024
@mknyszek mknyszek added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jan 25, 2024
@mknyszek mknyszek moved this to In Progress in Go Compiler / Runtime Jan 25, 2024
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/exp/trace" && test == "TestFlightRecorderOneGeneration"
2024-01-19 08:35 linux-amd64-longtest-race exp@1b970713 go@93f0c0b2 x/exp/trace.TestFlightRecorderOneGeneration (log)
==================
WARNING: DATA RACE
Write at 0x00c000110430 by goroutine 93:
  runtime.closechan()
      /workdir/go/src/runtime/chan.go:357 +0x0
  runtime.(*wakeableSleep).close()
      /workdir/go/src/runtime/trace2.go:976 +0x54
  golang.org/x/exp/trace.(*FlightRecorder).Stop()
      /workdir/gopath/src/golang.org/x/exp/trace/flightrecorder.go:225 +0x75
  golang.org/x/exp/trace_test.testFlightRecorder()
...
      /workdir/go/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /workdir/go/src/testing/testing.go:1742 +0x44

Goroutine 89 (running) created at:
  [failed to restore the stack]
==================
--- FAIL: TestFlightRecorderOneGeneration (6.01s)
    --- FAIL: TestFlightRecorderOneGeneration/SetSize (3.01s)
        testing.go:1398: race detected during execution of test

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/exp/trace" && test == "TestFlightRecorderOneGeneration"
2024-01-19 08:35 linux-amd64-longtest-race exp@1b970713 go@8e02e7b2 x/exp/trace.TestFlightRecorderOneGeneration (log)
==================
WARNING: DATA RACE
Write at 0x00c000188190 by goroutine 84:
  runtime.closechan()
      /workdir/go/src/runtime/chan.go:357 +0x0
  runtime.(*wakeableSleep).close()
      /workdir/go/src/runtime/trace2.go:976 +0x54
  golang.org/x/exp/trace.(*FlightRecorder).Stop()
      /workdir/gopath/src/golang.org/x/exp/trace/flightrecorder.go:225 +0x75
  golang.org/x/exp/trace_test.testFlightRecorder()
...
      /workdir/go/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /workdir/go/src/testing/testing.go:1742 +0x44

Goroutine 92 (running) created at:
  [failed to restore the stack]
==================
--- FAIL: TestFlightRecorderOneGeneration (6.02s)
    --- FAIL: TestFlightRecorderOneGeneration/SetPeriod (3.01s)
        testing.go:1398: race detected during execution of test

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/exp/trace" && test == "TestFlightRecorderOneGeneration"
2024-01-19 08:35 linux-amd64-longtest-race exp@1b970713 go@b91bad78 x/exp/trace.TestFlightRecorderOneGeneration (log)
==================
WARNING: DATA RACE
Write at 0x00c000118370 by goroutine 92:
  runtime.closechan()
      /workdir/go/src/runtime/chan.go:357 +0x0
  runtime.(*wakeableSleep).close()
      /workdir/go/src/runtime/trace2.go:976 +0x54
  golang.org/x/exp/trace.(*FlightRecorder).Stop()
      /workdir/gopath/src/golang.org/x/exp/trace/flightrecorder.go:225 +0x75
  golang.org/x/exp/trace_test.testFlightRecorder()
...
      /workdir/go/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /workdir/go/src/testing/testing.go:1742 +0x44

Goroutine 91 (running) created at:
  [failed to restore the stack]
==================
--- FAIL: TestFlightRecorderOneGeneration (6.02s)
    --- FAIL: TestFlightRecorderOneGeneration/SetSize (3.01s)
        testing.go:1398: race detected during execution of test

watchflakes

@gopherbot
Copy link
Contributor Author

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

@github-project-automation github-project-automation bot moved this from In Progress to Done in Go Compiler / Runtime Feb 1, 2024
@gopherbot
Copy link
Contributor 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 <[email protected]>
Reviewed-by: Michael Pratt <[email protected]>
(cherry picked from commit 0b12e3d)
Reviewed-on: https://go-review.googlesource.com/c/go/+/559956
Auto-Submit: Michael Knyszek <[email protected]>
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 <[email protected]>
Reviewed-by: Michael Pratt <[email protected]>
@golang golang locked and limited conversation to collaborators Jan 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. 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

2 participants