[Pkg-net-snmp-devel] Bug#497656: libsnmp-python: Lots of segfaults when using Python snmp module

Vincent Bernat bernat at debian.org
Wed Sep 3 12:23:38 UTC 2008

Package: libsnmp-python
Version: 5.4.1~dfsg-9
Severity: important


I am trying to use libsnmp-python but get a lot of segfaults in many

Something as simple as :
 oid = netsnmp.Varbind("ifIndex.5")
 result = netsnmp.snmpget(oid, Version=2, DestHost=host, Community=community)
 print result
gives a segfault.

I also get bogus results :
 oid = netsnmp.Varbind(".")
 result = netsnmp.snmpwalk(oid, Version=2, DestHost=host, Community=community)
 print result
gives (). While snmpwalk gives:
 SNMPv2-SMI::enterprises.2272. = INTEGER: 2

If I use snmpget instead of snmpwalk, I get a segfault.

Here is a backtrace:

---Type <return> to continue, or q <return> to quit--- 
Program terminated with signal 11, Segmentation fault.
[New process 23955]
#0  0x00007f4dde7f0ea9 in strchrnul () from /lib/libc.so.6
(gdb) bt
#0  0x00007f4dde7f0ea9 in strchrnul () from /lib/libc.so.6
#1  0x00007f4dde7b72d3 in vfprintf () from /lib/libc.so.6
#2  0x00007f4dde7e024a in vsnprintf () from /lib/libc.so.6
#3  0x00007f4dde7c0db3 in snprintf () from /lib/libc.so.6
#4  0x00007f4dde3bb695 in ?? ()
   from /usr/lib/python2.5/site-packages/netsnmp/client_intf.so
#5  0x00007f4dde3be549 in ?? ()
   from /usr/lib/python2.5/site-packages/netsnmp/client_intf.so
#6  0x0000000000491982 in PyEval_EvalFrameEx ()
#7  0x0000000000492a12 in PyEval_EvalFrameEx ()
#8  0x00000000004930fd in PyEval_EvalCodeEx ()
#9  0x0000000000491623 in PyEval_EvalFrameEx ()
#10 0x00000000004930fd in PyEval_EvalCodeEx ()
#11 0x00000000004932f2 in PyEval_EvalCode ()
#12 0x00000000004b2d08 in PyRun_FileExFlags ()
#13 0x00000000004b2fab in PyRun_SimpleFileExFlags ()
#14 0x0000000000414542 in Py_Main ()
#15 0x00007f4dde7911a6 in __libc_start_main () from /lib/libc.so.6
#16 0x0000000000413989 in _start ()
-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/1 CPU core)
Locale: LANG=fr_FR at euro, LC_CTYPE=fr_FR at euro (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/dash

Versions of packages libsnmp-python depends on:
ii  libc6                       2.7-13       GNU C Library: Shared libraries
ii  libsnmp15                   5.4.1~dfsg-9 SNMP (Simple Network Management Pr
ii  python                      2.5.2-2      An interactive high-level object-o
ii  python-central              0.6.8        register and build utility for Pyt

libsnmp-python recommends no packages.

libsnmp-python suggests no packages.

-- no debconf information

More information about the Pkg-net-snmp-devel mailing list