Hi Experts I’m using net-snmp version 5.8 agent code to send traps, I implemented my own trap sending code and compile it to a dynamic loaded object (myTrap.so), and loaded in by putting configuration into snmpd.conf like this:
dlmod myTrap /usr/lib/myTrap.so However, every time when I triggered the trap sending, snmpd got crashed, below is the decode: Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f659dc56a07 in get_target_sessions (taglist=0x7f659eb90980 "internal0", filterfunct=filterfunct@entry=0x0, filterArg=filterArg@entry=0x0) at target/target.c:44 44 target/target.c: No such file or directory. [Current thread is 1 (LWP 49)] (gdb) bt #0 0x00007f659dc56a07 in get_target_sessions (taglist=0x7f659eb90980 "internal0", filterfunct=filterfunct@entry=0x0, filterArg=filterArg@entry=0x0) at target/target.c:44 #1 0x00007f659dc7d91a in send_notifications (major=<optimized out>, minor=7, serverarg=0x7f659eba4880, clientarg=<optimized out>) at notification/snmpNotifyTable_data.c:222 #2 0x00007f659d8e51f6 in snmp_call_callbacks (major=major@entry=1, minor=minor@entry=7, caller_arg=caller_arg@entry=0x7f659eba4880) at callback.c:363 #3 0x00007f659e0bb953 in netsnmp_send_traps (trap=-1, specific=<optimized out>, enterprise=0x7f659e0e1100 <trap_version_id>, enterprise_length=10, vars=<optimized out>, context=context@entry=0x0, flags=0) at agent_trap.c:1033 #4 0x00007f659e0bbc9e in send_enterprise_trap_vars (trap=<optimized out>, specific=<optimized out>, enterprise=<optimized out>, enterprise_length=<optimized out>, vars=<optimized out>) at agent_trap.c:1047 #5 0x00007f659cc9d70e in send_MyTrap ( Any suggestions ? Thanks Spark _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders