-
Notifications
You must be signed in to change notification settings - Fork 710
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
availability-distribution: potential memory leak #5258
Comments
I looked into this. The subsystem itself is not doing any work in the main loop, as it spawns separate tasks for everything. The CPU usage for the tasks that the subsystem spawns (pov-receiver, chunk-receiver, pov-fetcher, chunk-fetcher) all look normal. I discovered the culprit: Jaeger spans.
which adds a new entry on every leaf activation, but only gets cleaned up when a block is finalized:
However, when a block gets finalized, we only get notified about the block with the largest height (the leaf), so we never clean up spans for relay parents that got finalized in a batch (since Grandpa finalizes chains, not blocks). Therefore, the size of the hashmap is almost always strictly increasing. Now, to fix this there are a couple of options:
|
Here's a PR that fixes the issue #5321 |
This is a nice pattern of increased CPU usage over time. I didn't look much at it, but it might be some iteration of a collection that doesn't get cleaned up.
https://grafana.teleport.parity.io/goto/9zQcAE9IR?orgId=1
CC @alindima
The text was updated successfully, but these errors were encountered: