Bug#531056: leaks memory when vlan subinterfaces present

2009-05-31 Thread Thomas Anders
John Morrissey wrote:
 Just tried this; snmpd does *not* leak when kernel IPv6 support is absent.

Thanks for your great help so far. Do you also have a chance to test upstream's 
5.4.x SVN and/or SVN trunk (with IPv6 support enabled again)?


+Thomas



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#531056: leaks memory when vlan subinterfaces present

2009-05-31 Thread John Morrissey
On Sun, May 31, 2009 at 09:03:23AM +0200, Thomas Anders wrote:
 John Morrissey wrote:
  Just tried this; snmpd does *not* leak when kernel IPv6 support is
  absent.
 
 Thanks for your great help so far. Do you also have a chance to test
 upstream's 5.4.x SVN and/or SVN trunk (with IPv6 support enabled again)?

5.4.x svn didn't leak. Found the upstream commit that fixed this; a debdiff
is attached.

john
-- 
John Morrissey  _o/\   __o
j...@horde.net_- \_  /  \   \,
www.horde.net/__(_)/_(_)/\___(_) /_(_)__
diff -u net-snmp-5.4.1~dfsg/debian/changelog 
net-snmp-5.4.1~dfsg/debian/changelog
--- net-snmp-5.4.1~dfsg/debian/changelog
+++ net-snmp-5.4.1~dfsg/debian/changelog
@@ -1,3 +1,11 @@
+net-snmp (5.4.1~dfsg-13) unstable; urgency=low
+
+  * Fix memory leak when multiple interfaces have the same IPv6 address,
+such as link-local addresses when VLAN subinterfaces are in use.
+(Closes: #531056)
+
+ -- John Morrissey j...@horde.net  Sun, 31 May 2009 23:07:32 +
+
 net-snmp (5.4.1~dfsg-12) unstable; urgency=high
 
   * Urgency high because of RC bug fix.
only in patch2:
unchanged:
--- net-snmp-5.4.1~dfsg.orig/debian/patches/56_fix_ipv6_memleak.patch
+++ net-snmp-5.4.1~dfsg/debian/patches/56_fix_ipv6_memleak.patch
@@ -0,0 +1,17 @@
+Index: agent/mibgroup/ip-mib/data_access/ipaddress_linux.c
+===
+--- agent/mibgroup/ip-mib/data_access/ipaddress_linux.c(revision 17254)
 agent/mibgroup/ip-mib/data_access/ipaddress_linux.c(revision 17255)
+@@ -325,7 +325,11 @@
+ /*
+  * add entry to container
+  */
+-CONTAINER_INSERT(container, entry);
++if (CONTAINER_INSERT(container, entry)  0) {
++DEBUGMSGTL((access:ipaddress:container,error with 
ipaddress_entry: insert into container failed.\n));
++netsnmp_access_ipaddress_entry_free(entry);
++continue;
++}
+ }
+ 
+ fclose(in);
only in patch2:
unchanged:
--- net-snmp-5.4.1~dfsg.orig/debian/patches/56_fix_ipv6_memleak.README
+++ net-snmp-5.4.1~dfsg/debian/patches/56_fix_ipv6_memleak.README
@@ -0,0 +1,2 @@
+Upstream Changeset 17255: CHANGES: snmpd: fix memory leak when multiple
+interfaces have the same IPv6 address


Bug#531056: leaks memory when vlan subinterfaces present

2009-05-29 Thread John Morrissey
Package: snmpd
Version: 5.4.1~dfsg-12
Severity: normal

lenny's snmpd leaks memory when VLAN subinterfaces are present. For example,
machines here with 13 VLAN subints leak about 200mbytes of memory every
couple of weeks. Other amd64 machines without VLAN subints do not leak.

The observed behavior is similar to #510495 (default install of snmpd leaks
memory when VLAN interfaces present), but the fix for etch's snmpd isn't
applicable to lenny's snmpd, so I figure the leak is different.

This version of net-snmp is also in sid, so I'm currently trying the latest
upstream release (5.4.2.1) to see if it's any different.

-- System Information:
Debian Release: 5.0.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.28-11-server (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages snmpd depends on:
ii  adduser3.110 add and remove users and groups
ii  debconf1.5.24Debian configuration management sy
ii  libc6  2.7-18GNU C Library: Shared libraries
ii  libsnmp15  5.4.1~dfsg-12 SNMP (Simple Network Management Pr
ii  libwrap0   7.6.q-16  Wietse Venema's TCP wrappers libra

snmpd recommends no packages.

snmpd suggests no packages.

-- debconf information:
  snmpd/upgradefrom521:



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#531056: leaks memory when vlan subinterfaces present

2009-05-29 Thread John Morrissey
On Fri, May 29, 2009 at 02:42:25PM +, John Morrissey wrote:
 This version of net-snmp is also in sid, so I'm currently trying the
 latest upstream release (5.4.2.1) to see if it's any different.

5.4.2.1 leaks in the same way/amount as 5.4.1~dfsg-12. After ~3.5 hours of
uptime:

==25243== 1,456,858 (765,648 direct, 691,210 indirect) bytes in 10,634 blocks 
are definitely lost in loss record 107 of 107
==25243==at 0x4C203E4: calloc (vg_replace_malloc.c:397)
==25243==by 0x53684DC: netsnmp_access_ipaddress_entry_create (in 
/usr/lib/libnetsnmpmibs.so.15.1.0)
==25243==by 0x5369054: _load_v6 (in /usr/lib/libnetsnmpmibs.so.15.1.0)
==25243==by 0x53694F3: netsnmp_arch_ipaddress_container_load (in 
/usr/lib/libnetsnmpmibs.so.15.1.0)
==25243==by 0x5368936: netsnmp_access_ipaddress_container_load (in 
/usr/lib/libnetsnmpmibs.so.15.1.0)
==25243==by 0x534B495: ipAddressTable_container_load (in 
/usr/lib/libnetsnmpmibs.so.15.1.0)
==25243==by 0x5076F83: (within /usr/lib/libnetsnmphelpers.so.15.1.0)
==25243==by 0x564343B: run_alarms (in /usr/lib/libnetsnmp.so.15.1.0)
==25243==by 0x40456C: main (in /usr/sbin/snmpd)

john
-- 
John Morrissey  _o/\   __o
j...@horde.net_- \_  /  \   \,
www.horde.net/__(_)/_(_)/\___(_) /_(_)__



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#531056: [Pkg-net-snmp-devel] Bug#531056: leaks memory when vlan subinterfaces present

2009-05-29 Thread Jochen Friedrich
Hi John,

 5.4.2.1 leaks in the same way/amount as 5.4.1~dfsg-12. After ~3.5 hours of
 uptime:

Do you have a chance to test the same on a system without IPv6
support? I still suspect the leak when trying to add duplicate (link
local) IPv6 addresses to the interface table.

Thanks,
Jochen



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#531056: [Pkg-net-snmp-devel] Bug#531056: leaks memory when vlan subinterfaces present

2009-05-29 Thread John Morrissey
On Fri, May 29, 2009 at 08:53:08PM +0200, Jochen Friedrich wrote:
 Do you have a chance to test the same on a system without IPv6
 support? I still suspect the leak when trying to add duplicate (link
 local) IPv6 addresses to the interface table.

Just tried this; snmpd does *not* leak when kernel IPv6 support is absent.

john
-- 
John Morrissey  _o/\   __o
j...@horde.net_- \_  /  \   \,
www.horde.net/__(_)/_(_)/\___(_) /_(_)__



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org