Skip to content

[release-1.27] fix: stop ticker/timer in waitForMount to avoid leak#2471

Merged
k8s-ci-robot merged 1 commit into
kubernetes-sigs:release-1.27from
k8s-infra-cherrypick-robot:cherry-pick-2465-to-release-1.27
May 19, 2026
Merged

[release-1.27] fix: stop ticker/timer in waitForMount to avoid leak#2471
k8s-ci-robot merged 1 commit into
kubernetes-sigs:release-1.27from
k8s-infra-cherrypick-robot:cherry-pick-2465-to-release-1.27

Conversation

@k8s-infra-cherrypick-robot
Copy link
Copy Markdown

This is an automated cherry-pick of #2465

/assign andyzhangx

none

waitForMount used time.Tick and time.After. time.Tick's underlying
ticker is never garbage collected per the Go documentation, so every
blobfuse mount leaked a runtime ticker that kept firing after the
function returned. On the timeout path the ticker would continue to
tick forever.

Use time.NewTicker and time.NewTimer with deferred Stop so resources
are released when the function returns.
@k8s-ci-robot k8s-ci-robot requested review from andyzhangx and cvvz May 18, 2026 04:01
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 18, 2026
Copy link
Copy Markdown
Member

@andyzhangx andyzhangx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 19, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx, k8s-infra-cherrypick-robot

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 19, 2026
@k8s-ci-robot k8s-ci-robot merged commit a951444 into kubernetes-sigs:release-1.27 May 19, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants