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: sometimes 100% CPU spin during init phase in Go 1.14 with preemptive scheduler [1.14 backport] #37833

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

Comments

@gopherbot
Copy link

@randall77 requested issue #37741 to be considered for backport to the next 1.14 minor release.

@gopherbot please open a backport issue to 1.14.1.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Mar 12, 2020
@gopherbot gopherbot added this to the Go1.14.1 milestone Mar 12, 2020
@randall77
Copy link
Contributor

This issue causes binaries on Darwin (and possibly other OSes) to randomly hang, particularly on startup.

@gopherbot
Copy link
Author

Change https://golang.org/cl/223939 mentions this issue: [release-branch.go1.14] runtime: don't send preemption signal if there is a signal pending

@cagedmantis cagedmantis added CherryPickApproved Used during the release process for point releases and removed CherryPickCandidate Used during the release process for point releases labels Mar 18, 2020
@cagedmantis
Copy link
Contributor

Approved. As this is a serious issue without any workaround.

@gopherbot
Copy link
Author

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

gopherbot pushed a commit that referenced this issue Mar 18, 2020
…e is a signal pending

If multiple threads call preemptone to preempt the same M, it may
send many signals to the same M such that it hardly make
progress, causing live-lock problem. Only send a signal if there
isn't already one pending.

Updates #37741.
Fixes #37833.

Change-Id: Id94adb0b95acbd18b23abe637a8dcd81ab41b452
Reviewed-on: https://go-review.googlesource.com/c/go/+/223737
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
(cherry picked from commit 0c0e8f2)
Reviewed-on: https://go-review.googlesource.com/c/go/+/223939
Reviewed-by: Austin Clements <austin@google.com>
@mholt
Copy link

mholt commented Mar 18, 2020

@randall77 And others, thank you very much!! I still encounter this issue dozens of times per day so needless to say I am thrilled it was made a priority and I can't wait for the Go 1.14.1 release!

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