Date: Thu, 20 Oct 2011 18:27:04 GMT From: "Eugene M. Zheganin" <eugene@zhegan.in> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/161842: net-mgmt/net-snmp memory leak Message-ID: <201110201827.p9KIR4iR074611@red.freebsd.org> Resent-Message-ID: <201110201830.p9KIUCAi060790@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 161842 >Category: ports >Synopsis: net-mgmt/net-snmp memory leak >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Oct 20 18:30:12 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Eugene M. Zheganin >Release: FreeBSD 8.2-RELEASE >Organization: Norma LLC. >Environment: FreeBSD elf.hq.norma.perm.ru 8.2-RELEASE FreeBSD 8.2-RELEASE #1: Thu May 5 19:14:23 YEKST 2011 emz@ns.hq.norma.perm.ru:/usr/obj/usr/src/sys/ELF i386 >Description: SNMP Version: # snmpd -v NET-SNMP version: 5.7 Web: http://www.net-snmp.org/ Email: net-snmp-coders@lists.sourceforge.net FreeBSD: # uname -a FreeBSD ural85-gw0-alpha 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #0: Sun Feb 6 12:34:52 YEKT 2011 emz@ural85-gw0-alpha:/usr/obj/usr/src/sys/CRYSTAL amd64 After upgrading from 5.5 to 5.7 got a memory leak. It is stable and reproduceable. The output below shows it: # /usr/local/etc/rc.d/snmpd restart Stopping snmpd. Waiting for PIDS: 73341. Starting snmpd. # ps alx | grep -v egrep | egrep 'RSS|snmp' UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND 0 73748 1 0 44 0 22860 7144 select S ?? 0:00,21 /usr/local/sbin/snmpd -p /var/run/snmpd.pid -Ls d # snmpwalk localhost dskTable (6 times, output skipped) # ps alx | grep -v egrep | egrep 'RSS|snmp' UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND 0 73748 1 0 44 0 26956 10756 select S ?? 0:00,50 /usr/local/sbin/snmpd -p /var/run/snmpd.pid -Ls d # snmpwalk localhost dskTable (6 times, output skipped) # ps alx | grep -v egrep | egrep 'RSS|snmp' UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND 0 73748 1 0 44 0 29004 14232 select S ?? 0:00,62 /usr/local/sbin/snmpd -p /var/run/snmpd.pid -Ls d # snmpwalk localhost dskTable (6 times, output skipped) # ps alx | grep -v egrep | egrep 'RSS|snmp' UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND 0 73748 1 0 44 0 33100 17804 select S ?? 0:00,80 /usr/local/sbin/snmpd -p /var/run/snmpd.pid -Ls d # snmpwalk localhost dskTable (6 times, output skipped) # ps alx | grep -v egrep | egrep 'RSS|snmp' UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND 0 73748 1 0 44 0 37196 21352 select S ?? 0:00,95 /usr/local/sbin/snmpd -p /var/run/snmpd.pid -Ls d # snmpwalk localhost dskTable (6 times, output skipped) # ps alx | grep -v egrep | egrep 'RSS|snmp' UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND 0 73748 1 0 44 0 41292 24908 select S ?? 0:01,09 /usr/local/sbin/snmpd -p /var/run/snmpd.pid -Ls d # snmpwalk localhost dskTable (6 times, output skipped) # ps alx | grep -v egrep | egrep 'RSS|snmp' UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND 0 73748 1 0 44 0 43340 28440 select S ?? 0:01,25 /usr/local/sbin/snmpd -p /var/run/snmpd.pid -Ls d # snmpwalk localhost dskTable (6 times, output skipped) # ps alx | grep -v egrep | egrep 'RSS|snmp' UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND 0 73748 1 0 44 0 47436 31936 select S ?? 0:01,39 /usr/local/sbin/snmpd -p /var/run/snmpd.pid -Ls d (quite some time after doing snmpwalks) # ps alx | grep -v egrep | egrep 'RSS|snmp' UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND 0 73748 1 0 45 0 90444 75092 select S ?? 0:02,06 /usr/local/sbin/snmpd -p /var/run/snmpd.pid -Ls d This can last forever, until the server memory is exausted. >How-To-Repeat: Get FreeBSD, install net-snmp port. >Fix: Fallback to 5.5. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110201827.p9KIR4iR074611>