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

runtime: corrupted GoroutineProfile stack traces [1.23 backport] #69258

Closed
gopherbot opened this issue Sep 4, 2024 · 4 comments
Closed

runtime: corrupted GoroutineProfile stack traces [1.23 backport] #69258

gopherbot opened this issue Sep 4, 2024 · 4 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

@prattmic requested issue #69243 to be considered for backport to the next 1.23 minor release.

@gopherbot Please backport to 1.23. This is a regression in goroutine profiles with no workaround.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Sep 4, 2024
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Sep 4, 2024
@gopherbot gopherbot modified the milestones: Go1.23.1, Go1.23.2 Sep 4, 2024
@gopherbot gopherbot modified the milestones: Go1.23.2, Go1.23.3 Oct 1, 2024
@mknyszek mknyszek added the CherryPickApproved Used during the release process for point releases label Oct 2, 2024
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Oct 2, 2024
@cherrymui
Copy link
Member

@felixge would you like to create cherry-pick CLs for this? Or let me know and I can create them. Thanks.

@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/621277 mentions this issue: [release-branch.go1.23] runtime: fix GoroutineProfile stacks not getting null terminated

@felixge
Copy link
Contributor

felixge commented Oct 21, 2024

@cherrymui I've tried to create the cherry-pick CLs for this issue as well as #69865 (still needs approval) based on the wiki instructions. But this is the first time I've created a cherry-pick CL for a minor Go release, so PTAL to make sure I got it right.

@gopherbot
Copy link
Contributor Author

Closed by merging CL 621277 (commit 35c010a) to release-branch.go1.23.

gopherbot pushed a commit that referenced this issue Oct 21, 2024
…ing null terminated

Fix a regression introduced in CL 572396 causing goroutine stacks not
getting null terminated.

This bug impacts callers that reuse the []StackRecord slice for multiple
calls to GoroutineProfile. See felixge/fgprof#33
for an example of the problem.

Add a test case to prevent similar regressions in the future. Use null
padding instead of null termination to be consistent with other profile
types and because it's less code to implement. Also fix the
ThreadCreateProfile code path.

Fixes #69258

Change-Id: I0b9414f6c694c304bc03a5682586f619e9bf0588
Reviewed-on: https://go-review.googlesource.com/c/go/+/609815
Reviewed-by: Tim King <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Michael Pratt <[email protected]>
(cherry picked from commit 49e542a)
Reviewed-on: https://go-review.googlesource.com/c/go/+/621277
Reviewed-by: Cherry Mui <[email protected]>
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

4 participants