-
Notifications
You must be signed in to change notification settings - Fork 402
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: Creating and then deleting workspaces causes leaked goroutines #3350
Comments
Hi @julian-hj, thanks for reporting this issue in such detail! We'll take a look at fixing this. |
@embik Could you please assign the issue to me? Thanks! |
/assign @ntnn Thanks! |
Repro was straightforward with the mentioned steps from @julian-hj . Below are some of my observations from the collected pprofs. There is a significant spike in Goroutine Count of ~4.6x
Major Contributors to Goroutine Growth deducted from the pprof:
|
Describe the bug
baseline pprof from kcp before workspace creation/deletion:
pre-ws.pprof.txt
pprof after creating and then deleting an org workspace 100 times:
post-ws.pprof.txt
go tool rendering of pprof:
Steps To Reproduce
addpprof.patch
kubectl port-forward -n kcp-alpha deployment/alpha 6060:6060 &
http://localhost:6060/debug/pprof/goroutine > pre-ws.pprof
for i in {1..100}; do k apply -f org-ws.yaml; sleep 3; k delete -f org-ws.yaml; sleep 3; done
Expected Behaviour
Fewer goroutines
Additional Context
This looks related to #3016 although that issue is long since fixed, and didn't require new workspaces.
As far as I can tell, creating a new workspace causes the creation of listeners that wont get cancelled until the sharedIndexInformer is terminated.
The text was updated successfully, but these errors were encountered: