Memory leak in SNMP when using OIDs from BRIDGE-MIB and QBRIDGE-MIB
snmpd on a switch with implemented feature #218 leaks the memory when snmpwalk'ed.
The problem can be seen with
ps aux or
pmap -XX <PID> in the RSS column. The value in that column corresponding to the snmpd process (or heap of the process) grows few bytes every few queries. Please note that after every query a memory is allocated by snmpd and then free'd, but sometimes not all. It was observed that a production switch run out of memory after a month. The queries were performed once per hour.
If a snmpwalk was done every 130 seconds, after ~13 hours about 300KB were leaked (edit: the leak was no matter if snmpwalk was performed or not, the leak was 356 every 60 seconds)
It is believed that the problem is in snmpd daemon, not the BRIDGE-MIB/QBRIDGE-MIB implementation (edit: problem was in netsnmp's IP-MIB).