-
Notifications
You must be signed in to change notification settings - Fork 1.2k
snmp plugin memory leak #610
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
Comments
I am seeing similar behavior in the SNMP plugin:
The above was with ~50 hosts over 30 minutes. |
I'm also able to confirm this issue. |
This should fix the leak reported in issue collectd#610.
@StianOvrevage, @slillibri, would it be possible for you to test #698 ? The patch is against collectd-4.10 because the issue dates all that way back in the past. But it's fairly simple and that part of the code didn't change since, so you can easily cherry-pick or copy-paste the patch on whatever version you're using. I'd be grateful to have others confirm this doesn't have any side effects because my use of this plugin is really really basic... Thanks ! |
@mfournier I am running the 5.4.1 release, so I will get that change in and get it running. I have one instance that is pulling snmp from all my switches so that will give me results in a few hours. I'll update when I get this running. |
@mfournier I've been running this over the weekend and haven't seen any appreciable growth in the collectd process. |
Closing as #698 was merged. Thanks for the bugreport & testing ! |
We might as well mess with avoid freeing the req pointer only when failures occur, otherwise perform as before
I have a problem where the collectd snmp plugin seems to leak about 50MB of memory per hour on our setup.
valgrind output: https://gist.github.com/StianOvrevage/9f0a48519a1f7f49c685
valgrind output (full, with show-reachable): https://gist.github.com/StianOvrevage/e84245d2aea1f723ce69
valgrind massif output: https://gist.github.com/StianOvrevage/62b28d7f007630367465
There is a bugreport in net-snmp which suggest that it is possible to use the snmp library wrong and get memory leaks that way: http://sourceforge.net/p/net-snmp/bugs/1095/ related to the snmp_pdu_create function.
collectd.conf:
snmp.conf:
We have 100+ hosts in snmp.conf with mostly identical config. Only included a few here. The rest are mostly identical.
types.custom.db:
The text was updated successfully, but these errors were encountered: