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

resource controller: timer.Reset is unsafe before go 1.23 #8876

Closed
lhy1024 opened this issue Dec 6, 2024 · 0 comments · Fixed by #8877
Closed

resource controller: timer.Reset is unsafe before go 1.23 #8876

lhy1024 opened this issue Dec 6, 2024 · 0 comments · Fixed by #8877
Labels
affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. may-affects-5.4 may-affects-6.1 may-affects-6.5 may-affects-8.5 severity/major type/bug The issue is confirmed as a bug.

Comments

@lhy1024
Copy link
Contributor

lhy1024 commented Dec 6, 2024

Bug Report

Before Go 1.23, the only safe way to use Reset was to call Timer.Stop and explicitly drain the timer first. See the NewTimer documentation for more details.

https://pkg.go.dev/time@master#Timer.Reset

we do something about it in #6719, but #7042 introduce new problems.

Maybe we need to provide a pr to fix it and pick it to 7.1, 7.5 and 8.1.

We don't worry about 8.5, because it is compiled with go 1.23

@lhy1024 lhy1024 added the type/bug The issue is confirmed as a bug. label Dec 6, 2024
@lhy1024 lhy1024 added affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. labels Dec 6, 2024
ti-chi-bot bot pushed a commit that referenced this issue Dec 11, 2024
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this issue Dec 11, 2024
ti-chi-bot bot pushed a commit that referenced this issue Dec 12, 2024
ti-chi-bot bot added a commit that referenced this issue Dec 19, 2024
close #8876

Signed-off-by: lhy1024 <[email protected]>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
ti-chi-bot bot pushed a commit that referenced this issue Dec 20, 2024
ti-chi-bot bot pushed a commit that referenced this issue Dec 20, 2024
@lhy1024 lhy1024 closed this as completed Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. may-affects-5.4 may-affects-6.1 may-affects-6.5 may-affects-8.5 severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants