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

internal/trace: TestTraceCPUProfile/Stress failures [1.23 backport] #71147

Closed
gopherbot opened this issue Jan 7, 2025 · 2 comments
Closed

internal/trace: TestTraceCPUProfile/Stress failures [1.23 backport] #71147

gopherbot opened this issue Jan 7, 2025 · 2 comments
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime.
Milestone

Comments

@gopherbot
Copy link
Contributor

@mknyszek requested issue #70883 to be considered for backport to the next 1.23 minor release.

@gopherbot Please open backport issues for Go 1.22 and Go 1.23.

This bug means a rare chance that the tracer will emit broken traces with no workaround. The fix is also small and concerns only tracer-related code. (It touches the scheduler, but the scheduler logic is left as-is.)

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Jan 7, 2025
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jan 7, 2025
@gopherbot gopherbot added this to the Go1.23.5 milestone Jan 7, 2025
@dmitshur dmitshur added CherryPickApproved Used during the release process for point releases and removed CherryPickCandidate Used during the release process for point releases labels Jan 8, 2025
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/641378 mentions this issue: [release-branch.go1.23] runtime: hold traceAcquire across casgstatus in injectglist

gopherbot pushed a commit that referenced this issue Jan 8, 2025
…in injectglist

Currently injectglist emits all the trace events before actually calling
casgstatus on each goroutine. This is a problem, since tracing can
observe an inconsistent state (gstatus does not match tracer's 'emitted
an event' state).

This change fixes the problem by having injectglist do what every other
scheduler function does, and that's wrap each call to casgstatus in
traceAcquire/traceRelease.

For #70883.
Fixes #71147.

Change-Id: I857e96cec01688013597e8efc0c4c3d0b72d3a70
Reviewed-on: https://go-review.googlesource.com/c/go/+/638558
Reviewed-by: Michael Pratt <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
(cherry picked from commit f025d19)
Reviewed-on: https://go-review.googlesource.com/c/go/+/641378
Auto-Submit: Michael Pratt <[email protected]>
@gopherbot
Copy link
Contributor Author

Closed by merging CL 641378 (commit 1dde0b4) to release-branch.go1.23.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime.
Projects
None yet
Development

No branches or pull requests

2 participants