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: infinite loop in lockextra on linux/amd64 [1.15 backport] #42636

Closed
gopherbot opened this issue Nov 16, 2020 · 3 comments
Closed

runtime: infinite loop in lockextra on linux/amd64 [1.15 backport] #42636

gopherbot opened this issue Nov 16, 2020 · 3 comments

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Nov 16, 2020

@ianlancetaylor requested issue #42207 to be considered for backport to the next 1.15 minor release.

@gopherbot Please open backport issues.

This bug can cause a deadlock for programs that create threads in C code such that those threads call into Go code, if a signal is received at the wrong time. There is no workaround.

Note that CL 265759 had a bug in the test, and that CL 265778 (a test-only change) is also required.

@dmitshur
Copy link
Member

@dmitshur dmitshur commented Nov 19, 2020

Approving per discussion in a release meeting. This backport applies to both 1.15 (this issue) and 1.14 (#42635).

@gopherbot
Copy link
Author

@gopherbot gopherbot commented Nov 20, 2020

Change https://golang.org/cl/271847 mentions this issue: [release-branch.go1.15] runtime: block signals in needm before allocating M

@gopherbot
Copy link
Author

@gopherbot gopherbot commented Nov 20, 2020

Closed by merging efd204c to release-branch.go1.15.

@gopherbot gopherbot closed this Nov 20, 2020
gopherbot pushed a commit that referenced this issue Nov 20, 2020
…ting M

Otherwise, if a signal occurs just after we allocated the M,
we can deadlock if the signal handler needs to allocate an M
itself.

For #42207
Fixes #42636

Change-Id: I76f44547f419e8b1c14cbf49bf602c6e645d8c14
Reviewed-on: https://go-review.googlesource.com/c/go/+/265759
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
(cherry picked from commit 368c401)
Reviewed-on: https://go-review.googlesource.com/c/go/+/271847
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants