Navigation Menu

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: macOS-only segfault on 1.14+ with "split stack overflow" [1.14 backport] #41991

Closed
gopherbot opened this issue Oct 15, 2020 · 5 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@KSerrania requested issue #39079 to be considered for backport to the next 1.14 minor release.

@gopherbot please consider this for backport in 1.14. The issue can cause runtime crashes on MacOS, and there doesn't seem to be any reasonable workaround.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Oct 15, 2020
@gopherbot gopherbot added this to the Go1.14.11 milestone Oct 15, 2020
@gopherbot
Copy link
Author

Change https://golang.org/cl/262557 mentions this issue: [release-branch.go1.14] runtime: set g to gsignal before adjustSignalStack

@toothrot toothrot added the CherryPickApproved Used during the release process for point releases label Oct 15, 2020
@toothrot
Copy link
Contributor

Approved. This is a serious issue with no workaround.

@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Oct 15, 2020
@gopherbot
Copy link
Author

Closed by merging fa44af7 to release-branch.go1.14.

gopherbot pushed a commit that referenced this issue Oct 15, 2020
…Stack

When a signal is received, the runtime probes whether an
alternate signal stack is set, if so, adjust gsignal's stack to
point to the alternate signal stack. This is done in
adjustSignalStack, which calls sigaltstack "syscall", which is a
libc call on darwin through asmcgocall. asmcgocall decides
whether to do stack switch based on whether we're running on g0
stack, gsignal stack, or regular g stack. If g is not set to
gsignal, asmcgocall may make wrong decision. Set g first.
adjustSignalStack is recursively nosplit, so it is okay that
temporarily gsignal.stack doesn't match the stack we're running
on.

Updates #39079.
Fixes #41991.

Change-Id: I59b2c5dc08c3c951f1098fff038bf2e06d7ca055
Reviewed-on: https://go-review.googlesource.com/c/go/+/238020
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit d286e61)
Reviewed-on: https://go-review.googlesource.com/c/go/+/262557
Trust: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
@albertvaka
Copy link

@toothrot any chance we get a new 1.14 minor release with this?

@ianlancetaylor
Copy link
Contributor

@albertvaka New minor releases happen around the start of each month.

@golang golang locked and limited conversation to collaborators Oct 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

4 participants