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

gopherbot opened this issue Aug 20, 2021 · 3 comments


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
Copy link

@gopherbot gopherbot commented Sep 15, 2021

Change mentions this issue: [release-branch.go1.17] runtime: in adjustTimers back up as far as necessary

Copy link

@cagedmantis cagedmantis commented Sep 15, 2021

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

Copy link

@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

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
Trust: Ian Lance Taylor <>
Run-TryBot: Ian Lance Taylor <>
TryBot-Result: Go Bot <>
Reviewed-by: Michael Knyszek <>
(cherry picked from commit 2da3375)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants