Go

lp:golang

Get this repository:
git clone https://git.launchpad.net/golang

Import details

Import Status: Failed

This repository is an import of the Git repository at https://go.googlesource.com/go.

The import has been suspended because it failed 5 or more times in succession.
Import started on juju-1e3bde-prod-lp-code-import-14 and finished taking 2 minutes — see the log
Import started on juju-1e3bde-prod-lp-code-import-13 and finished taking 1 hour 10 minutes
Import started on juju-1e3bde-prod-lp-code-import-12 and finished taking 1 hour 10 minutes
Import started on alnitak and finished taking 1 hour 10 minutes — see the log

Branches

Name Last Modified Last Commit
master 2021-07-29 15:30:38 UTC
runtime: avoid possible preemption when returning from Go to C

Author: Ian Lance Taylor
Author Date: 2021-07-29 04:09:31 UTC

runtime: avoid possible preemption when returning from Go to C

When returning from Go to C, it was possible for the goroutine to be
preempted after calling unlockOSThread. This could happen when there
a context function installed by SetCgoTraceback set a non-zero context,
leading to a defer call in cgocallbackg1. The defer function wrapper,
introduced in 1.17 as part of the regabi support, was not nosplit,
and hence was a potential preemption point. If it did get preempted,
the G would move to a new M. It would then attempt to return to C
code on a different stack, typically leading to a SIGSEGV.

Fix this in a simple way by postponing the unlockOSThread until after
the other defer. Also check for the failure condition and fail early,
rather than waiting for a SIGSEGV.

Without the fix to cgocall.go, the test case fails about 50% of the
time on my laptop.

Fixes #47441

Change-Id: Ib8ca13215bd36cddc2a49e86698824a29c6a68ba
Reviewed-on: https://go-review.googlesource.com/c/go/+/338197
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>

11 of 1 result
This repository contains Public information 
Everyone can see this information.