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

Memory Leak in SharedMqttClient #92

Closed
pLeminoq opened this issue Jan 20, 2023 · 0 comments · Fixed by #93
Closed

Memory Leak in SharedMqttClient #92

pLeminoq opened this issue Jan 20, 2023 · 0 comments · Fixed by #93
Assignees

Comments

@pLeminoq
Copy link
Contributor

I wanted to verify that the previous memory leak (openbase/bco#93) has been fixed and left bco-test --simulate running for about an hour. I found another memory leak, although it is much less grave.

The SharedMqttClient keeps track of how many times a topic has been subscribed to so that it only unsubscribes if none is left. This information is stored in a map but keys are never removed from the map even if the counter goes down to zero. This is a problem since each RPC generates a new topic with a new UID. Thus, this map keeps on growing. After about an hour of runtime it contains almost 160000 elements.

@pLeminoq pLeminoq self-assigned this Jan 21, 2023
@pLeminoq pLeminoq linked a pull request Jan 21, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant