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: "traceback: unexpected SPWRITE function runtime.systemstack" [1.21 backport] #64935

Closed
gopherbot opened this issue Jan 2, 2024 · 3 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 #64934 to be considered for backport to the next 1.21 minor release.

@gopherbot please backport to 1.21. This fixes a regression in a previous backport (#62464).

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Jan 2, 2024
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jan 2, 2024
@gopherbot gopherbot added this to the Go1.21.6 milestone Jan 2, 2024
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/553476 mentions this issue: [release-branch.go1.21] runtime: don't print "unexpected SPWRITE" when printing traceback

@mdempsky
Copy link
Member

mdempsky commented Jan 3, 2024

Approved for backport.

@mdempsky mdempsky added CherryPickApproved Used during the release process for point releases and removed CherryPickCandidate Used during the release process for point releases labels Jan 3, 2024
@gopherbot gopherbot modified the milestones: Go1.21.6, Go1.21.7 Jan 9, 2024
gopherbot pushed a commit that referenced this issue Jan 10, 2024
…n printing traceback

The system stack often starts with a stack transition function
like "systemstack" or "mcall", which is marked as SPWRITE. When
unwinding a system stack for printing, we want the traceback stop
at the stack switching frame, but not print the "unexpected
SPWRITE" message.

Previously before CL 525835, we don't print the "unexpected
SPWRITE" message if unwindPrintErrors is set, i.e. printing a
stack trace. This CL restores this behavior.

Another possibility is not printing the message only on the system
stack. We don't expect a stack transition function to appear in a
user G.

Fixes #64935.

Change-Id: I173e89ead2cd4fbf1f0f8cca225f28718b5baebe
Reviewed-on: https://go-review.googlesource.com/c/go/+/531815
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
(cherry picked from commit 15a274b)
Reviewed-on: https://go-review.googlesource.com/c/go/+/553476
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org>
@gopherbot
Copy link
Contributor Author

Closed by merging caafb50 to release-branch.go1.21.

dekimsey added a commit to hashicorp/consul-k8s that referenced this issue Feb 7, 2024
This fixes the "traceback: unexpected SPWRITE function runtime.systemstack"
error in 386 builds.

Related to golang/go#64935
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