Hi, I am running net-snmp 5.5 as a daemon with a subagent I've written using mib2c (using the MFD framework for the tables). An snmpwalk works fine until it gets to a table which has two numerical (Integer32) indices. At which point it executes the code to fetch the data, and then abruptly exits. It looks like the agent closes the connection with the subagent. I've pasted sections of the debug trace for the subagent and for the daemon below.
I would appreciate any help in diagnosing my problem. Cheers, Alec ============ SUBAGENT (the very end of the trace log, before the subagent dies): ============ dump_send_callback_transport: var 2:OSCAR-MIB::ctecSlotName.1.1 = STRING: Serial trace: netsnmp_callback_send(): snmpCallbackDomain.c, 326: transport_callback: hook_send exit trace: netsnmp_remove_and_free_agent_snmp_session(): snmp_agent.c, 1786: snmp_agent: REMOVE session == 0x8811750 trace: free_agent_snmp_session(): snmp_agent.c, 1378: snmp_agent: agent_session 0x8811750 released trace: free_agent_snmp_session(): snmp_agent.c, 1383: verbose:asp: asp 0x8811750 reqinfo 0x8811638 freed trace: handle_snmp_packet(): snmp_agent.c, 1935: snmp_agent: end of handle_snmp_packet, asp = 0x8811750 trace: run_alarms(): snmp_alarm.c, 262: snmp_alarm: run alarm 1 trace: agentx_check_session(): mibgroup/agentx/subagent.c, 972: agentx/subagent: checking status of session 0x88177a0 trace: agentx_realloc_build_header(): mibgroup/agentx/protocol.c, 613: dumph_send: AgentX Header dumpx_send: 01 0D 00 00 dumpv_send: Version: 1 trace: agentx_realloc_build_header(): mibgroup/agentx/protocol.c, 616: dumpv_send: Command: 13 (Ping) trace: agentx_realloc_build_header(): mibgroup/agentx/protocol.c, 619: dumpv_send: Flags: 00 trace: agentx_realloc_build_header(): mibgroup/agentx/protocol.c, 622: dumph_send: Session ID dumpx_send: 17 00 00 00 dumpv_send: Integer: 23 (0x17) trace: agentx_realloc_build_header(): mibgroup/agentx/protocol.c, 631: dumph_send: Transaction ID dumpx_send: 00 00 00 00 dumpv_send: Integer: 0 (0x00) trace: agentx_realloc_build_header(): mibgroup/agentx/protocol.c, 640: dumph_send: Request ID dumpx_send: 0F 06 32 1A dumpv_send: Integer: 439485967 (0x1A32060F) trace: agentx_realloc_build_header(): mibgroup/agentx/protocol.c, 649: dumph_send: Dummy Length :-( dumpx_send: 00 00 00 00 dumpv_send: Integer: 0 (0x00) trace: _agentx_realloc_build(): mibgroup/agentx/protocol.c, 727: dumph_send: AgentX Payload dumpx_send:00 00 00 00 dumpv_send: Integer: 0 (0x00) trace: _agentx_realloc_build(): mibgroup/agentx/protocol.c, 1017: agentx_build: packet built okay trace: _sess_async_send(): snmp_api.c, 5122: sess_process_packet: sending message id#1088602840 reqid#439485967 trace: netsnmp_unix_send(): snmpUnixDomain.c, 162: netsnmp_unix: send 20 bytes to 0x8849600 on fd 8 ============ AGENT (what looks like the relevant bit): ============ dumph_send: AgentX Payload trace: _agentx_realloc_build(): mibgroup/agentx/protocol.c, 886: dumph_send: Get* Variable List trace: agentx_realloc_build_oid(): mibgroup/agentx/protocol.c, 224: dumpv_send: OID: OSCAR-MIB::ctecSlotName.1.1 trace: agentx_realloc_build_oid(): mibgroup/agentx/protocol.c, 265: dumph_send: OID Header dumpx_send: 09 04 00 00 dumpv_send: # subids: 9 (0x09) trace: agentx_realloc_build_oid(): mibgroup/agentx/protocol.c, 269: dumpv_send: prefix: 4 (0x04) trace: agentx_realloc_build_oid(): mibgroup/agentx/protocol.c, 271: dumpv_send: inclusive: 0 (0x00) trace: agentx_realloc_build_oid(): mibgroup/agentx/protocol.c, 275: dumph_send: OID Segments dumpx_send: 01 00 00 00 dumpv_send: Integer: 1 (0x01) dumpx_send: 02 1E 00 00 dumpv_send: Integer: 7682 (0x1E02) dumpx_send: 02 00 00 00 dumpv_send: Integer: 2 (0x02) dumpx_send: 03 00 00 00 dumpv_send: Integer: 3 (0x03) dumpx_send: 02 00 00 00 dumpv_send: Integer: 2 (0x02) dumpx_send: 01 00 00 00 dumpv_send: Integer: 1 (0x01) dumpx_send: 03 00 00 00 dumpv_send: Integer: 3 (0x03) dumpx_send: 01 00 00 00 dumpv_send: Integer: 1 (0x01) dumpx_send: 01 00 00 00 dumpv_send: Integer: 1 (0x01) trace: agentx_realloc_build_oid(): mibgroup/agentx/protocol.c, 224: dumpv_send: OID: ccitt trace: agentx_realloc_build_oid(): mibgroup/agentx/protocol.c, 265: dumph_send: OID Header dumpx_send: 00 00 00 00 dumpv_send: # subids: 0 (0x00) trace: agentx_realloc_build_oid(): mibgroup/agentx/protocol.c, 269: dumpv_send: prefix: 0 (0x00) trace: agentx_realloc_build_oid(): mibgroup/agentx/protocol.c, 271: dumpv_send: inclusive: 0 (0x00) trace: agentx_realloc_build_oid(): mibgroup/agentx/protocol.c, 275: dumph_send: OID Segments dumpx_send:2C 00 00 00 dumpv_send: Integer: 44 (0x2C) trace: _agentx_realloc_build(): mibgroup/agentx/protocol.c, 1017: agentx_build: packet built okay trace: snmp_resend_request(): snmp_api.c, 6436: sess_process_packet: resending message id#2124780060 reqid#10 rp_reqid#10 rp_msgid#2124780060 trace: netsnmp_unix_send(): snmpUnixDomain.c, 162: netsnmp_unix: send 64 bytes to 0x816b7e0 on fd 9 trace: snmp_sess_select_info2(): snmp_api.c, 6188: sess_select: for all sessions: 9 (to in 1012632650.701909 sec) (to in 1012632650.700288 sec) 8 7 4 sess_select: next alarm 2.287531 sec verbose:sess_select: timer due in 0.994472 sec verbose:sess_select: setting timer to 0.994472 sec, clear block (was 0) trace: receive(): snmpd.c, 1185: snmpd/select: select( numfds=10, ..., tvp=0xbfa90148) trace: receive(): snmpd.c, 1187: timer: tvp 0.994472 trace: receive(): snmpd.c, 1189: snmpd/select: returned, count = 0 trace: agentx_got_response(): mibgroup/agentx/master.c, 228: agentx/master: timeout on session 0x815b460 trace: close_agentx_session(): mibgroup/agentx/master_admin.c, 134: agentx/master: close 0x815b460, -1 trace: netsnmp_remove_delegated_requests_for_session(): snmp_agent.c, 1524: snmp_agent: removed 6 delegated request(s) for session 0x815a1f0 trace: check_delayed_request(): snmp_agent.c, 2808: snmp_agent: processing delegated request, asp = 0x817e9e0 trace: _snmp_build(): snmp_api.c, 3074: snmp_send: Building SNMPv1 message... trace: _snmp_build(): snmp_api.c, 3077: dumph_send: RESPONSE trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3445: snmp_pdu_realloc_rbuild: starting trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3460: dumph_send: VarBind trace: snmp_realloc_rbuild_var_op(): snmp.c, 341: dumph_send: Value dumpx_send: 05 00 dumpv_send: NULL trace: snmp_realloc_rbuild_var_op(): snmp.c, 442: dumph_send: Name dumpx_send: 06 0E 2B 06 01 04 01 BC 02 02 03 02 01 03 01 01 dumpv_send: ObjID: OSCAR-MIB::ctecSlotName.1.1 trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3528: dumph_send: error index dumpx_send: 02 01 01 dumpv_send: Integer: 1 (0x01) trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3541: dumph_send: error status dumpx_send: 02 01 02 dumpv_send: Integer: 2 (0x02) trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3554: dumph_send: request_id dumpx_send: 02 04 49 D1 13 26 dumpv_send: Integer: 1238438694 (0x49D11326) trace: _snmp_build(): snmp_api.c, 3083: dumph_send: Community String dumpx_send: 04 06 70 75 62 6C 69 63 dumpv_send: String: public trace: _snmp_build(): snmp_api.c, 3099: dumph_send: SNMP Version Number dumpx_send: 02 01 00 dumpv_send: Integer: 0 (0x00) trace: _snmp_build(): snmp_api.c, 3118: dumph_send: SNMPv1 Message trace: _sess_async_send(): snmp_api.c, 5122: sess_process_packet: sending message id#0 reqid#1238438694 trace: netsnmp_udp_send(): snmpUDPDomain.c, 276: netsnmp_udp: send 49 bytes from 0x816bfaf to UDP: [127.0.0.1]:52764->[127.0.0.1] on fd 7 trace: netsnmp_remove_and_free_agent_snmp_session(): snmp_agent.c, 1786: snmp_agent: REMOVE session == 0x817e9e0 trace: free_agent_snmp_session(): snmp_agent.c, 1378: snmp_agent: agent_session 0x817e9e0 released trace: free_agent_snmp_session(): snmp_agent.c, 1383: verbose:asp: asp 0x817e9e0 reqinfo 0x814f988 freed trace: check_delayed_request(): snmp_agent.c, 2808: snmp_agent: processing delegated request, asp = 0x817df90 trace: _snmp_build(): snmp_api.c, 3074: snmp_send: Building SNMPv1 message... trace: _snmp_build(): snmp_api.c, 3077: dumph_send: RESPONSE trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3445: snmp_pdu_realloc_rbuild: starting trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3460: dumph_send: VarBind trace: snmp_realloc_rbuild_var_op(): snmp.c, 341: dumph_send: Value dumpx_send: 05 00 dumpv_send: NULL trace: snmp_realloc_rbuild_var_op(): snmp.c, 442: dumph_send: Name dumpx_send: 06 0E 2B 06 01 04 01 BC 02 02 03 02 01 03 01 01 dumpv_send: ObjID: OSCAR-MIB::ctecSlotName.1.1 trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3528: dumph_send: error index dumpx_send: 02 01 01 dumpv_send: Integer: 1 (0x01) trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3541: dumph_send: error status dumpx_send: 02 01 02 dumpv_send: Integer: 2 (0x02) trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3554: dumph_send: request_id dumpx_send: 02 04 49 D1 13 26 dumpv_send: Integer: 1238438694 (0x49D11326) trace: _snmp_build(): snmp_api.c, 3083: dumph_send: Community String dumpx_send: 04 06 70 75 62 6C 69 63 dumpv_send: String: public trace: _snmp_build(): snmp_api.c, 3099: dumph_send: SNMP Version Number dumpx_send: 02 01 00 dumpv_send: Integer: 0 (0x00) trace: _snmp_build(): snmp_api.c, 3118: dumph_send: SNMPv1 Message trace: _sess_async_send(): snmp_api.c, 5122: sess_process_packet: sending message id#0 reqid#1238438694 trace: netsnmp_udp_send(): snmpUDPDomain.c, 276: netsnmp_udp: send 49 bytes from 0x816bfaf to UDP: [127.0.0.1]:52764->[127.0.0.1] on fd 7 trace: netsnmp_remove_and_free_agent_snmp_session(): snmp_agent.c, 1786: snmp_agent: REMOVE session == 0x817df90 trace: free_agent_snmp_session(): snmp_agent.c, 1378: snmp_agent: agent_session 0x817df90 released trace: free_agent_snmp_session(): snmp_agent.c, 1383: verbose:asp: asp 0x817df90 reqinfo 0x814ee78 freed trace: check_delayed_request(): snmp_agent.c, 2808: snmp_agent: processing delegated request, asp = 0x817d540 trace: _snmp_build(): snmp_api.c, 3074: snmp_send: Building SNMPv1 message... trace: _snmp_build(): snmp_api.c, 3077: dumph_send: RESPONSE trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3445: snmp_pdu_realloc_rbuild: starting trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3460: dumph_send: VarBind trace: snmp_realloc_rbuild_var_op(): snmp.c, 341: dumph_send: Value dumpx_send: 05 00 dumpv_send: NULL trace: snmp_realloc_rbuild_var_op(): snmp.c, 442: dumph_send: Name dumpx_send: 06 0E 2B 06 01 04 01 BC 02 02 03 02 01 03 01 01 dumpv_send: ObjID: OSCAR-MIB::ctecSlotName.1.1 trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3528: dumph_send: error index dumpx_send: 02 01 01 dumpv_send: Integer: 1 (0x01) trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3541: dumph_send: error status dumpx_send: 02 01 02 dumpv_send: Integer: 2 (0x02) trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3554: dumph_send: request_id dumpx_send: 02 04 49 D1 13 26 dumpv_send: Integer: 1238438694 (0x49D11326) trace: _snmp_build(): snmp_api.c, 3083: dumph_send: Community String dumpx_send: 04 06 70 75 62 6C 69 63 dumpv_send: String: public trace: _snmp_build(): snmp_api.c, 3099: dumph_send: SNMP Version Number dumpx_send: 02 01 00 dumpv_send: Integer: 0 (0x00) trace: _snmp_build(): snmp_api.c, 3118: dumph_send: SNMPv1 Message trace: _sess_async_send(): snmp_api.c, 5122: sess_process_packet: sending message id#0 reqid#1238438694 trace: netsnmp_udp_send(): snmpUDPDomain.c, 276: netsnmp_udp: send 49 bytes from 0x816bfaf to UDP: [127.0.0.1]:52764->[127.0.0.1] on fd 7 trace: netsnmp_remove_and_free_agent_snmp_session(): snmp_agent.c, 1786: snmp_agent: REMOVE session == 0x817d540 trace: free_agent_snmp_session(): snmp_agent.c, 1378: snmp_agent: agent_session 0x817d540 released trace: free_agent_snmp_session(): snmp_agent.c, 1383: verbose:asp: asp 0x817d540 reqinfo 0x8150fe8 freed trace: check_delayed_request(): snmp_agent.c, 2808: snmp_agent: processing delegated request, asp = 0x8159680 trace: _snmp_build(): snmp_api.c, 3074: snmp_send: Building SNMPv1 message... trace: _snmp_build(): snmp_api.c, 3077: dumph_send: RESPONSE trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3445: snmp_pdu_realloc_rbuild: starting trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3460: dumph_send: VarBind trace: snmp_realloc_rbuild_var_op(): snmp.c, 341: dumph_send: Value dumpx_send: 05 00 dumpv_send: NULL trace: snmp_realloc_rbuild_var_op(): snmp.c, 442: dumph_send: Name dumpx_send: 06 0E 2B 06 01 04 01 BC 02 02 03 02 01 03 01 01 dumpv_send: ObjID: OSCAR-MIB::ctecSlotName.1.1 trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3528: dumph_send: error index dumpx_send: 02 01 01 dumpv_send: Integer: 1 (0x01) trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3541: dumph_send: error status dumpx_send: 02 01 02 dumpv_send: Integer: 2 (0x02) trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3554: dumph_send: request_id dumpx_send: 02 04 49 D1 13 26 dumpv_send: Integer: 1238438694 (0x49D11326) trace: _snmp_build(): snmp_api.c, 3083: dumph_send: Community String dumpx_send: 04 06 70 75 62 6C 69 63 dumpv_send: String: public trace: _snmp_build(): snmp_api.c, 3099: dumph_send: SNMP Version Number dumpx_send: 02 01 00 dumpv_send: Integer: 0 (0x00) trace: _snmp_build(): snmp_api.c, 3118: dumph_send: SNMPv1 Message trace: _sess_async_send(): snmp_api.c, 5122: sess_process_packet: sending message id#0 reqid#1238438694 trace: netsnmp_udp_send(): snmpUDPDomain.c, 276: netsnmp_udp: send 49 bytes from 0x816bfaf to UDP: [127.0.0.1]:52764->[127.0.0.1] on fd 7 trace: netsnmp_remove_and_free_agent_snmp_session(): snmp_agent.c, 1786: snmp_agent: REMOVE session == 0x8159680 trace: free_agent_snmp_session(): snmp_agent.c, 1378: snmp_agent: agent_session 0x8159680 released trace: free_agent_snmp_session(): snmp_agent.c, 1383: verbose:asp: asp 0x8159680 reqinfo 0x8147d20 freed trace: check_delayed_request(): snmp_agent.c, 2808: snmp_agent: processing delegated request, asp = 0x8161100 trace: _snmp_build(): snmp_api.c, 3074: snmp_send: Building SNMPv1 message... trace: _snmp_build(): snmp_api.c, 3077: dumph_send: RESPONSE trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3445: snmp_pdu_realloc_rbuild: starting trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3460: dumph_send: VarBind trace: snmp_realloc_rbuild_var_op(): snmp.c, 341: dumph_send: Value dumpx_send: 05 00 dumpv_send: NULL trace: snmp_realloc_rbuild_var_op(): snmp.c, 442: dumph_send: Name dumpx_send: 06 0E 2B 06 01 04 01 BC 02 02 03 02 01 03 01 01 dumpv_send: ObjID: OSCAR-MIB::ctecSlotName.1.1 trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3528: dumph_send: error index dumpx_send: 02 01 01 dumpv_send: Integer: 1 (0x01) trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3541: dumph_send: error status dumpx_send: 02 01 02 dumpv_send: Integer: 2 (0x02) trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3554: dumph_send: request_id dumpx_send: 02 04 49 D1 13 26 dumpv_send: Integer: 1238438694 (0x49D11326) trace: _snmp_build(): snmp_api.c, 3083: dumph_send: Community String dumpx_send: 04 06 70 75 62 6C 69 63 dumpv_send: String: public trace: _snmp_build(): snmp_api.c, 3099: dumph_send: SNMP Version Number dumpx_send: 02 01 00 dumpv_send: Integer: 0 (0x00) trace: _snmp_build(): snmp_api.c, 3118: dumph_send: SNMPv1 Message trace: _sess_async_send(): snmp_api.c, 5122: sess_process_packet: sending message id#0 reqid#1238438694 trace: netsnmp_udp_send(): snmpUDPDomain.c, 276: netsnmp_udp: send 49 bytes from 0x816bfaf to UDP: [127.0.0.1]:52764->[127.0.0.1] on fd 7 trace: netsnmp_remove_and_free_agent_snmp_session(): snmp_agent.c, 1786: snmp_agent: REMOVE session == 0x8161100 trace: free_agent_snmp_session(): snmp_agent.c, 1378: snmp_agent: agent_session 0x8161100 released trace: free_agent_snmp_session(): snmp_agent.c, 1383: verbose:asp: asp 0x8161100 reqinfo 0x8153418 freed trace: check_delayed_request(): snmp_agent.c, 2808: snmp_agent: processing delegated request, asp = 0x81512c8 trace: _snmp_build(): snmp_api.c, 3074: snmp_send: Building SNMPv1 message... trace: _snmp_build(): snmp_api.c, 3077: dumph_send: RESPONSE trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3445: snmp_pdu_realloc_rbuild: starting trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3460: dumph_send: VarBind trace: snmp_realloc_rbuild_var_op(): snmp.c, 341: dumph_send: Value dumpx_send: 05 00 dumpv_send: NULL trace: snmp_realloc_rbuild_var_op(): snmp.c, 442: dumph_send: Name dumpx_send: 06 0E 2B 06 01 04 01 BC 02 02 03 02 01 03 01 01 dumpv_send: ObjID: OSCAR-MIB::ctecSlotName.1.1 trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3528: dumph_send: error index dumpx_send: 02 01 01 dumpv_send: Integer: 1 (0x01) trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3541: dumph_send: error status dumpx_send: 02 01 02 dumpv_send: Integer: 2 (0x02) trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3554: dumph_send: request_id dumpx_send: 02 04 49 D1 13 26 dumpv_send: Integer: 1238438694 (0x49D11326) trace: _snmp_build(): snmp_api.c, 3083: dumph_send: Community String dumpx_send: 04 06 70 75 62 6C 69 63 dumpv_send: String: public trace: _snmp_build(): snmp_api.c, 3099: dumph_send: SNMP Version Number dumpx_send: 02 01 00 dumpv_send: Integer: 0 (0x00) trace: _snmp_build(): snmp_api.c, 3118: dumph_send: SNMPv1 Message trace: _sess_async_send(): snmp_api.c, 5122: sess_process_packet: sending message id#0 reqid#1238438694 trace: netsnmp_udp_send(): snmpUDPDomain.c, 276: netsnmp_udp: send 49 bytes from 0x816bfaf to UDP: [127.0.0.1]:52764->[127.0.0.1] on fd 7 trace: netsnmp_remove_and_free_agent_snmp_session(): snmp_agent.c, 1786: snmp_agent: REMOVE session == 0x81512c8 trace: free_agent_snmp_session(): snmp_agent.c, 1378: snmp_agent: agent_session 0x81512c8 released trace: free_agent_snmp_session(): snmp_agent.c, 1383: verbose:asp: asp 0x81512c8 reqinfo 0x814e518 freed trace: unregister_mibs_by_session(): agent_registry.c, 1311: register_mib: unregister_mibs_by_session(0x815b460) ctxt "" ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users