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

[BUG]: goroutine leak when leaderelection.NewLeaderElector return error #2834

Open
alpha-baby opened this issue May 20, 2024 · 2 comments
Open
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@alpha-baby
Copy link

alpha-baby commented May 20, 2024

https://github.com/kubernetes-sigs/controller-runtime/blob/main/pkg/manager/internal.go#L602

leak here : https://github.com/kubernetes-sigs/controller-runtime/blob/main/pkg/manager/internal.go#L519

When I was using controller-runtime v0.14.6 and configured an incorrect RenewDeadline setting, it caused an error with leaderelection.NewLeaderElector. Consequently, the following goroutine was continuously blocked:

1 @ 0x100a4f5a8 0x100a1793c 0x100a17664 0x1024ffeec 0x1024ffb78 0x1024ff320 0x1024ff12c 0x1025b51c0 0x100a80874
#	0x1024ffeeb	sigs.k8s.io/controller-runtime/pkg/manager.(*controllerManager).engageStopProcedure.func2+0x5b 		/Users/fujianhao/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/internal.go:575
#	0x1024ffb77	sigs.k8s.io/controller-runtime/pkg/manager.(*controllerManager).engageStopProcedure+0x657 	/Users/fujianhao/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/internal.go:615
#	0x1024ff31f	sigs.k8s.io/controller-runtime/pkg/manager.(*controllerManager).Start.func2+0x3f 		/Users/fujianhao/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/internal.go:432
#	0x1024ff12b	sigs.k8s.io/controller-runtime/pkg/manager.(*controllerManager).Start+0x77b 			/Users/fujianhao/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/internal.go:515
#	0x1025b51bf	main.main.func4+0x9f

Is this a bug? If so, I am interested in fixing it.

@sbueringer
Copy link
Member

@alpha-baby I think this was fixed via #2876

Can you please check?

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

4 participants