From: SourceForge.net <no...@so...> - 2010-09-06 11:36:41
|
Bugs item #3059732, was opened at 2010-09-05 10:57 Message generated for change (Comment added) made by pucikv You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=3059732&group_id=12694 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: snmptrapd Group: linux Status: Open Resolution: None Priority: 5 Private: No Submitted By: Viliam Púčik (pucikv) Assigned to: Nobody/Anonymous (nobody) Summary: 5.6.pre3 snmptrapd "hangs" after forwarding a SNMPv3 trap Initial Comment: NET-SNMP: 5.6.pre3 Linux: 2.6.35-ARCH x86_64 [compilation options] ./configure --disable-embedded-perl --enable-ipv6 --prefix=/tmp/net-snmp --with-defaults --with-transports=TCPIPv6 UDPIPv6 --without-perl-modules --with-mib-modules=smux examples/example && make install && cd /tmp/net-snmp ... [configuration file] cat ./etc/snmp/snmptrapd.conf authUser log,execute,net user createUser -e 0x0102030405 user MD5 secretpassword DES forward default 10.0.0.1 ... [snmptrapd daemon options] ./sbin/snmptrapd -D -c ./etc/snmp/snmptrapd.conf -f -Le 10162 2>debug.txt ... [testing SNMPv3 trap] snmptrap -v 3 -e 0x0102030405 -l authNoPriv -u user -a MD5 -A secretpassword localhost:10162 42 0 Snmptrapd starts eating many system resources (CPU, RAM) and ends in endless loop after forwarding a SNMPv3 trap. Only kill -9 ends its suffering. Testing this with an older version of snmptrapd (NET-SNMP 5.3 in Centos 5.5) leads to a segmentation fault. ---------------------------------------------------------------------- >Comment By: Viliam Púčik (pucikv) Date: 2010-09-06 13:36 Message: [root@deathstar net-snmp]# gdb ./sbin/snmptrapd GNU gdb (GDB) 7.1 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /tmp/net-snmp/sbin/snmptrapd...done. (gdb) run -c ./etc/snmp/snmptrapd.conf -f -Le 10162 2 Starting program: /tmp/net-snmp/sbin/snmptrapd -c ./etc/snmp/snmptrapd.conf -f -Le 10162 2 [Thread debugging using libthread_db enabled] NET-SNMP version 5.6.pre3 2010-09-06 13:32:50 localhost.localdomain [UDP: [127.0.0.1]:54672->[127.0.0.1]:10162]: DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (42) 0:00:00.42 SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-SMI::zeroDotZero ^C [I must manually interrupted the endless loop after forwarding an SNMPv3 trap] Program received signal SIGINT, Interrupt. 0x00007ffff65d71ea in ?? () from /lib/libc.so.6 (gdb) bt #0 0x00007ffff65d71ea in ?? () from /lib/libc.so.6 #1 0x00007ffff65d558a in memmove () from /lib/libc.so.6 #2 0x00007ffff6cbac67 in asn_realloc (pkt=0x7fffffffbc78, pkt_len=0x7fffffffbc70) at asn1.c:2656 #3 0x00007ffff6cbb464 in asn_realloc_rbuild_string (pkt=0x7fffffffbc78, pkt_len=0x7fffffffbc70, offset=0x7fffffffbc68, r=1, type=4 '\004', str=0x7ffff68aef58 "H\357\212\366\377\177", strlength=4136300376) at asn1.c:2883 #4 0x00007ffff6ceabe6 in usm_rgenerate_out_msg (msgProcModel=<value optimized out>, globalData=0x6de75d "\002\001\003\060\021\002\004\064i\302\177\002\003", globalDataLen=22, maxMsgSize=<value optimized out>, secModel=<value optimized out>, secEngineID=0xfffffffe <Address 0xfffffffe out of bounds>, secEngineIDLen=5, secName=0x6df040 "user", secNameLen=4, secLevel=2, scopedPdu=0x6e0a59 ' ' <repeats 200 times>..., scopedPduLen=71, secStateRef=0x6de5e0, wholeMsg=0x7fffffffbc78, wholeMsgLen=0x7fffffffbc70, offset=0x7fffffffbc68) at snmpusm.c:1636 #5 0x00007ffff6cec832 in usm_secmod_rgenerate_out_msg (parms=<value optimized out>) at snmpusm.c:1262 #6 0x00007ffff6ca8fce in snmpv3_packet_realloc_rbuild (pkt=0x7fffffffbc78, pkt_len=0x7fffffffbc70, offset=0x7fffffffbc68, session=0x6dfa60, pdu=0x6dfc10, pdu_data=<value optimized out>, pdu_data_len=0) at snmp_api.c:2844 #7 0x00007ffff6ca99e9 in snmpv3_build (pkt=0x7fffffffbc78, pkt_len=0x7fffffffbc70, offset=0x7fffffffbc68, pss=0x6dfa60, pdu=0x6dfc10) at snmp_api.c:2431 #8 _snmp_build (pkt=0x7fffffffbc78, pkt_len=0x7fffffffbc70, offset=0x7fffffffbc68, pss=0x6dfa60, pdu=0x6dfc10) at snmp_api.c:3002 #9 snmp_build (pkt=0x7fffffffbc78, pkt_len=0x7fffffffbc70, offset=0x7fffffffbc68, pss=0x6dfa60, pdu=0x6dfc10) at snmp_api.c:3339 #10 0x00007ffff6caf070 in _sess_async_send (sessp=0x6df010, pdu=0x6dfc10, callback=0, cb_data=0x0) at snmp_api.c:5150 #11 snmp_sess_async_send (sessp=0x6df010, pdu=0x6dfc10, callback=0, cb_data=0x0) at snmp_api.c:5293 #12 0x00007ffff7bd68e5 in forward_handler (pdu=<value optimized out>, transport=<value optimized out>, handler=0x6cc900) at snmptrapd_handlers.c:900 #13 0x00007ffff7bd9083 in snmp_input (op=<value optimized out>, session=0x6cdc40, reqid=<value optimized out>, pdu=0x6de330, magic=0x6cdb90) at snmptrapd_handlers.c:1055 #14 0x00007ffff6cb3424 in _sess_process_packet (sessp=0x6cd2c0, sp=0x6cdc40, isp=0x649870, transport=<value optimized out>, opaque=0x6de2c0, olength=<value optimized out>, packetptr=0x6ce2b0 "0\201\204\002\001\003\060\021\002\004\064i\302\177\002\003", length=135) at snmp_api.c:5677 #15 0x00007ffff6cb3d7b in _sess_read (sessp=0x6cd2c0, fdset=<value optimized out>) at snmp_api.c:6117 #16 0x00007ffff6cb4bb9 in snmp_sess_read2 (sessp=0x6cd2c0, fdset=<value optimized out>) at snmp_api.c:6149 #17 0x00007ffff6cb4c7b in snmp_read2 (fdset=0x7fffffffe240) at snmp_api.c:5740 #18 0x00007ffff6cb4cc4 in snmp_read (fdset=0x7fffffffe5e0) at snmp_api.c:5730 #19 0x0000000000404546 in main (argc=<value optimized out>, argv=<value optimized out>) at snmptrapd.c:1263 ---------------------------------------------------------------------- Comment By: Thomas Anders (tanders) Date: 2010-09-05 21:17 Message: Are you able to run it under a debugger to see what it does? See http://www.net-snmp.org/wiki/index.php/Debugger for some help. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=3059732&group_id=12694 |