Project

General

Profile

Bug #31920

Fix memory leak in net-snmp

Added by Chris Simonich about 1 year ago. Updated 10 months ago.

Status:
Done
Priority:
No priority
Assignee:
Vladimir Vinogradenko
Category:
OS
Target version:
Seen in:
Severity:
Medium
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

Having upgraded my main Freenas server from 11.0-U4 to 11.1-U4 I'm seeing Inactive memory continue to grow (as reported in the GUI and "top"). Wired memory and ZFS ARC continues to shrink. I made no config changes after the upgrade with one exception. I had previous used SMB multipath on two interfaces, but have turned that off as of about a week ago while looking into some SMB related error messages. Growing inactive memory is still occurring. I also see this on my backup server running 11.1-U4.

I remember there was a memory leak in I believe 11.1, perhaps related to SMB?

You can see in the attached report graph .jpg where the upgrade occurs. Debug file also attached.

freenas-memory.jpg (92.5 KB) freenas-memory.jpg Reporting graph Chris Simonich, 04/12/2018 11:22 AM
16503

Associated revisions

Revision b77b164f (diff)
Added by Vladimir Vinogradenko 7 months ago

Apply patch from https://sourceforge.net/p/net-snmp/bugs/2788/ to fix net-snmp memory leak

Ticket: #31920

Revision 998af091 (diff)
Added by Vladimir Vinogradenko 7 months ago

Apply patch from https://sourceforge.net/p/net-snmp/bugs/2788/ to fix net-snmp memory leak

Ticket: #31920

Revision 57581761 (diff)
Added by Vladimir Vinogradenko 7 months ago

Apply patch from https://sourceforge.net/p/net-snmp/bugs/2788/ to fix net-snmp memory leak

Ticket: #31920

Revision 1ec1104e (diff)
Added by Vladimir Vinogradenko 7 months ago

Apply patch from https://sourceforge.net/p/net-snmp/bugs/2788/ to fix net-snmp memory leak

Ticket: #31920

Revision 20cc21c3 (diff)
Added by Vladimir Vinogradenko 3 days ago

Apply patch from https://sourceforge.net/p/net-snmp/bugs/2788/ to fix net-snmp memory leak

Ticket: #31920

Revision 760cbd01 (diff)
Added by Vladimir Vinogradenko 1 day ago

Apply patch from https://sourceforge.net/p/net-snmp/bugs/2788/ to fix net-snmp memory leak

Ticket: #31920

Revision 709f2cdf (diff)
Added by Vladimir Vinogradenko about 21 hours ago

Apply patch from https://sourceforge.net/p/net-snmp/bugs/2788/ to fix net-snmp memory leak

Ticket: #31920

Revision c8d0970a (diff)
Added by Vladimir Vinogradenko about 19 hours ago

Apply patch from https://sourceforge.net/p/net-snmp/bugs/2788/ to fix net-snmp memory leak

Ticket: #31920

History

#1 Updated by Dru Lavigne about 1 year ago

  • Assignee changed from Release Council to Alexander Motin
  • Target version set to 11.2-RC2

#2 Updated by Alexander Motin about 1 year ago

  • Assignee changed from Alexander Motin to Vladimir Vinogradenko

In the provided debug I see Samba consuming about 2.5GB of memory, that is not good, but at least one memory leak was already fixed recently, with fix planned for inclusion into FreeNAS 11.1-U5 and 11.2.

Another consumer using 2.6GB I see there is snmpd. Vladimir, I see you worked on SNMP recently, could you take a look on that side of this ticket?

#3 Updated by Vladimir Vinogradenko about 1 year ago

  • Status changed from Unscreened to In Progress

#4 Updated by Vladimir Vinogradenko about 1 year ago

  • Status changed from In Progress to Ready for Testing

The only recent change in SNMP is usage of AgentX functionality. The only memory leak reports in net-snmp I've found were regarding AgentX. I've applied these patches.

However, they are fixing leaking memory in exceptional cases. Chris, is SNMP working properly for you? (especially new FreeNAS MIB).

#5 Updated by Dru Lavigne about 1 year ago

  • Target version changed from 11.2-RC2 to 11.2-BETA1
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#6 Updated by Dru Lavigne about 1 year ago

  • File deleted (debug-fileserver-20180412131344.tgz)

#7 Updated by Dru Lavigne about 1 year ago

  • Subject changed from Inactive Memory keeps growing while wired and ZFS ARC continues to shrink to Fix memory link in net-snmp
  • Private changed from Yes to No

#8 Updated by Chris Simonich about 1 year ago

Yes, the SNMP functionality seems to be working as expected. It's showing an object ID of .1.3.6.1.4.1.8072.3.2.8. The limited data I pay attention to generally looks ok on the NMS machine.

#9 Updated by Chris Simonich about 1 year ago

I think the title change suggesting net-snmp may be premature. I'm seeing other reports of an SMB memory leak in 11.1-U4.

https://forums.freenas.org/index.php?threads/smbd-memory-leak-fn-11-1ux-and-system-crash-after-overflow.63172/

This person had an issue in -U3 and in -U4 after upgrading.

#10 Updated by Vladimir Vinogradenko about 1 year ago

  • Subject changed from Fix memory link in net-snmp to Fix memory leak in net-snmp

Chris, this ticket is about net-snmp (which was also leaking). As Alexander said, samba memory leaks are already fixed (at least some of them) and fixes will be included in 11.1-U5 and 11.2.

#11 Updated by Chris Simonich 11 months ago

  • Severity set to New

Just an update. I realize the fix target is now 11.2-Beta1. Confirming I still see high snmp memory usage in 11.1-U5. Slow growth of memory consumed by snmp to about 1.5GB over the course of a week. Memory is recovered after turning off the service. Turned off snmp service for now.

#12 Updated by Nick Wolff 10 months ago

  • Status changed from Ready for Testing to Passed Testing
  • Severity changed from New to Medium

#13 Updated by Dru Lavigne 10 months ago

  • Status changed from Passed Testing to Done

Also available in: Atom PDF