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

plugin: intermittent SIGSEGV with plugins that use multiple goroutines with cgo on ppc64le [1.10 backport] #25800

Closed
gopherbot opened this issue Jun 8, 2018 · 3 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@bcmills requested issue #25756 to be considered for backport to the next 1.10 minor release.

@gopherbot, please backport to 1.10.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Jun 8, 2018
@gopherbot gopherbot added this to the Go1.10.4 milestone Jun 8, 2018
@gopherbot
Copy link
Author

Change https://golang.org/cl/117915 mentions this issue: runtime: restore r2 when restoring state from gobuf in gogo on ppc64x [release-branch.go1.10]

@laboger
Copy link
Contributor

laboger commented Jun 12, 2018

The testcase in CL 117915 uncovered an upstream bug when linking with cgo on darwin as described in issue #25827 and was then fixed by CL 118076. That fix will also need to be backported to 1.10 to avoid the same testcase failures there.

@andybons andybons modified the milestones: Go1.10.4, Go1.10.5 Aug 24, 2018
@gopherbot
Copy link
Author

Closed by merging e97b7d6 to release-branch.go1.10.

gopherbot pushed a commit that referenced this issue Oct 30, 2018
… gobuf in gogo on ppc64x

When using plugins with goroutines calling cgo, we hit a case where
an intermittent SIGSEGV occurs when referencing an address that is based
on r2 (TOC address). When the failure can be generated in gdb, the
contents of r2 is wrong even though the value in the current stack's
slot for r2 is correct. So that means it somehow switched to start
running the code in this function without passing through the beginning
of the function which had the correct value of r2 and stored it there.

It was noted that in runtime.gogo when the state is restored from
gobuf, r2 is not restored from its slot on the stack. Adding the
instruction to restore r2 prevents the SIGSEGV.

Fixes #25800

Change-Id: I6028b6f1f8775d5c23f4ebb57ae273330a28eb8f
Reviewed-on: https://go-review.googlesource.com/117515
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit 30a63ec)
Reviewed-on: https://go-review.googlesource.com/c/117915
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@golang golang locked and limited conversation to collaborators Oct 30, 2019
@dmitshur dmitshur added CherryPickApproved Used during the release process for point releases and removed CherryPickCandidate Used during the release process for point releases labels Dec 5, 2019
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