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

time: timer reset sometimes ignored, causing delayed ticks [1.17 backport] #47859

Closed
gopherbot opened this issue Aug 20, 2021 · 3 comments
Closed

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Aug 20, 2021

@ianlancetaylor requested issue #47762 to be considered for backport to the next 1.17 minor release.

@gopherbot Please open a backport to 1.16 and 1.17.

This bug can cause timers to fail to fire. It appears to be new in recent 1.16 releases.

@gopherbot gopherbot added this to the Go1.17.1 milestone Aug 20, 2021
@thanm thanm removed this from the Go1.17.1 milestone Sep 9, 2021
@thanm thanm added this to the Go1.17.2 milestone Sep 9, 2021
@gopherbot
Copy link
Author

@gopherbot gopherbot commented Sep 15, 2021

Change https://golang.org/cl/350001 mentions this issue: [release-branch.go1.17] runtime: in adjustTimers back up as far as necessary

@cagedmantis
Copy link
Contributor

@cagedmantis cagedmantis commented Sep 15, 2021

This issue has been approved as it is a major issue without any viable workarounds.

@gopherbot
Copy link
Author

@gopherbot gopherbot commented Sep 15, 2021

Closed by merging abc4f092acf9bb65e56fcbd6ee7b2c76cee57ad7 to release-branch.go1.17.

@gopherbot gopherbot closed this Sep 15, 2021
gopherbot pushed a commit that referenced this issue Sep 15, 2021
…cessary

When the adjustTimers function removed a timer it assumed it was
sufficient to continue the heap traversal at that position.
However, in some cases a timer will be moved to an earlier
position in the heap. If that timer is timerModifiedEarlier,
that can leave timerModifiedEarliest not correctly representing
the earlier such timer.

Fix the problem by restarting the heap traversal at the earliest
changed position.

For #47762
Fixes #47859

Change-Id: I152bbe62793ee40a680baf49967bcb89b1f94764
Reviewed-on: https://go-review.googlesource.com/c/go/+/343882
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
(cherry picked from commit 2da3375)
Reviewed-on: https://go-review.googlesource.com/c/go/+/350001
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
3 participants