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
time, runtime: zero duration timer takes 2 minutes to fire [1.16 backport] #44869
Comments
Change https://golang.org/cl/300611 mentions this issue: |
Marking as a release-blocker for Go 1.16.3: we should consider this backport request and make a decision on it before issuing the next minor release. |
Approving as a serious issue without a workaround. Only Go 1.16 needs this backport. |
The timerpMask optimization updates a mask of Ps (potentially) containing timers in pidleget / pidleput. For correctness, it depends on the assumption that new timers can only be added to a P's own heap. addtimer violates this assumption if it is preempted after computing pp. That G may then run on a different P, but adding a timer to the original P's heap. Avoid this by disabling preemption while pp is in use. Other uses of doaddtimer should be OK: * moveTimers: always moves to the current P's heap * modtimer, cleantimers, addAdjustedTimers, runtimer: does not add net new timers to the heap while locked For #44868 Fixes #44869 Change-Id: I4a5d080865e854931d0a3a09a51ca36879101d72 Reviewed-on: https://go-review.googlesource.com/c/go/+/300610 Trust: Michael Pratt <mpratt@google.com> Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> (cherry picked from commit aa26687) Reviewed-on: https://go-review.googlesource.com/c/go/+/300611
Closed by merging 0da04a6 to release-branch.go1.16. |
@ianlancetaylor requested issue #44868 to be considered for backport to the next 1.16 minor release.
The text was updated successfully, but these errors were encountered: