From: SourceForge.net <no...@so...> - 2007-04-26 10:14:26
|
Bugs item #1574285, was opened at 2006-10-10 09:41 Message generated for change (Comment added) made by kluoto You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1574285&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: agent Group: agentx Status: Open Resolution: None Priority: 8 Private: No Submitted By: Morten Laursen (mortenlaursen) Assigned to: Nobody/Anonymous (nobody) Summary: snmpd crash when agentx subagent crash Initial Comment: Hi, I am running snmpd with several snmpd subagents. If one of my subagents crashes I some times see that snmpd also crashes due to a segmentation fault. I have only been able to reproduce it in a setup of our complete system. I.e. I cannot reproduce by e.g. sending kill -SEGV to my app. So it is not particularly easy for me to test. I have an strace, core dump, and log output with -Dagentx. I will attach to this mail extracts of these. I will happily supply complete files to anyone who might be interested. VERSION I use snmpd 5.3.1 with debian patches revision 71 from debian subversion repository (because at that time there was no debian release of 5.3.1) with build script modified to compile on debian sarge. COMMAND LINE strace -o snmpd.strace snmpd -Dagentx -f -Lf snmpd.log &> snmpd.log (I realize now that it is quite silly to both redirect and use -Lf to the same file. Logs entries may be duplicated?) CORE DUMP BACKTRACE (gdb) bt #0 0x40149f76 in netsnmp_add_varbind_to_cache () from /usr/lib/libnetsnmpagent.so.10 #1 0x4014a81f in netsnmp_reassign_requests () from /usr/lib/libnetsnmpagent.so.10 #2 0x4014b5cc in handle_getnext_loop () from /usr/lib/libnetsnmpagent.so.10 #3 0x4014b0ba in check_delayed_request () from /usr/lib/libnetsnmpagent.so.10 #4 0x4014ac94 in netsnmp_check_outstanding_agent_requests () from /usr/lib/libnetsnmpagent.so.10 #5 0x40148d45 in netsnmp_remove_delegated_requests_for_session () from /usr/lib/libnetsnmpagent.so.10 #6 0x40172e78 in close_agentx_session () from /usr/lib/libnetsnmpagent.so.10 #7 0x4015818c in agentx_got_response () from /usr/lib/libnetsnmpagent.so.10 #8 0x401e40f2 in snmp_sess_timeout () from /usr/lib/libnetsnmp.so.10 #9 0x401e3ab8 in snmp_timeout () from /usr/lib/libnetsnmp.so.10 #10 0x0804b7f2 in ?? () #11 0x0804beea in _IO_stdin_used () #12 0x0804bf0b in _IO_stdin_used () #13 0x00000000 in ?? () #14 0x0804be18 in _IO_stdin_used () #15 0x0000045f in ?? () #16 0x00000000 in ?? () #17 0x00000000 in ?? () #18 0x401b3c22 in ?? () from /usr/lib/libnetsnmp.so.10 #19 0x401af344 in ?? () from /usr/lib/libnetsnmp.so.10 #20 0x401ab154 in ?? () from /usr/lib/libnetsnmp.so.10 ATTACHED last 2000 lines from strace and snmpd debug output. ---------------------------------------------------------------------- Comment By: kluoto (kluoto) Date: 2007-04-26 13:14 Message: Logged In: YES user_id=1779062 Originator: NO I am also having the same problem. I am using Net-Snmp-5.4. My snmpd crashes when the subagent connection timeouts. The server crashes because the AgentX connection is closed using function close_agentx_session at master.c:249. After this netsnmp_reassign_requests is called at snmp_agent.c:2923 in which the content of the pointer asp->requests[0].subtree is not valid anymore. ---------------------------------------------------------------------- Comment By: kluoto (kluoto) Date: 2007-04-26 13:14 Message: Logged In: YES user_id=1779062 Originator: NO I am also having the same problem. I am using Net-Snmp-5.4. My snmpd crashes when the subagent connection timeouts. The server crashes because the AgentX connection is closed using function close_agentx_session at master.c:249. After this netsnmp_reassign_requests is called at snmp_agent.c:2923 in which the content of the pointer asp->requests[0].subtree is not valid anymore. ---------------------------------------------------------------------- Comment By: Josef Moellers (josefmoellers) Date: 2006-10-23 18:06 Message: Logged In: YES user_id=1426393 We're seing the very same problem, although in our setup it's not because the subagent has crashed but because the subagent fails to respond in time. I've rebuilt snmpd from net-snmp-cvs-MAIN_20061023_0318.tar.gz and it crashes: #0 0xffffe410 in __kernel_vsyscall () #1 0xb76db7d0 in raise () from /lib/libc.so.6 #2 0xb76dcea3 in abort () from /lib/libc.so.6 #3 0xb7710f8b in __libc_message () from /lib/libc.so.6 #4 0xb7716911 in malloc_printerr () from /lib/libc.so.6 #5 0xb7717f84 in free () from /lib/libc.so.6 #6 0xb7f1fcd6 in netsnmp_access_interface_entry_free () from /usr/lib/libnetsnmpmibs.so.15 #7 0xb7f263d1 in ifTable_container_load () from /usr/lib/libnetsnmpmibs.so.15 #8 0xb7dc736b in netsnmp_container_get_binary_array () from /usr/lib/libnetsnmp.so.15 #9 0xb7f26012 in ifTable_container_load () from /usr/lib/libnetsnmpmibs.so.15 #10 0xb7f2593a in _ifTable_initialize_interface () from /usr/lib/libnetsnmpmibs.so.15 #11 0xb7e0b9f3 in netsnmp_cache_timer_start () from /usr/lib/libnetsnmphelpers.so.15 #12 0xb7da6783 in run_alarms () from /usr/lib/libnetsnmp.so.15 #13 0x0804bf0d in main () What we see (using tcpdump) is that several GET and GETNEXT requests for the subagent come in but are not replied to (e.g. noSuchName) before icmp reports "udp port snmp unreachable". A core dump is available. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1574285&group_id=12694 |