RE: query to dsx1Intervaltable always kills the subagent
Malathi Panyam <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Just to make it clear I am inserting the row into the container at the end of the for loop below. And the complete back trace from the core file #0 dsx1IntervalTable_Extract_Row (rowreq_ctx=0x18b3518) at dsx1IntervalTable_custom.cpp:115 115 long ds1Index = rowreq_ctx->tbl_idx.dsx1IntervalIndex - 1; (gdb) where #0 dsx1IntervalTable_Extract_Row (rowreq_ctx=0x18b3518) at dsx1IntervalTable_custom.cpp:115 #1 0x00044cdc in dsx1IntervalTable_row_prep (rowreq_ctx=0x18b3518) at autogen/dsx1IntervalTable_data_access.c:272 #2 0x0004663c in _mfd_dsx1IntervalTable_object_lookup (handler=0x187da10, reginfo=0x187da48, agtreq_info=0x1893350, requests=0x18aedb0) at autogen/dsx1IntervalTable_interface.c:577 #3 0x40045de4 in _baby_steps_access_multiplexer (handler=0x187da10, reginfo=0x187da48, reqinfo=0x1893350, requests=0x18aedb0) at baby_steps.c:460 #4 0x400252a8 in netsnmp_call_handler (next_handler=0x187da10, reginfo=0x187da48, reqinfo=0x1893350, requests=0x18aedb0) at agent_handler.c:435 #5 0x4002547c in netsnmp_call_next_handler (current=0x187da98, reginfo=0x187da48, reqinfo=0x1893350, requests=0x18aedb0) at agent_handler.c:540 #6 0x400461d8 in _baby_steps_helper (handler=0x187da98, reginfo=0x187da48, reqinfo=0x1893350, requests=0x18aedb0) at baby_steps.c:279 #7 0x400252a8 in netsnmp_call_handler (next_handler=0x187da98, reginfo=0x187da48, reqinfo=0x1893350, requests=0x18aedb0) at agent_handler.c:435 #8 0x4002547c in netsnmp_call_next_handler (current=0x187dad8, reginfo=0x187da48, reqinfo=0x1893350, requests=0x18aedb0) at agent_handler.c:540 #9 0x4004b00c in netsnmp_row_merge_helper_handler (handler=0x187dad8, reginfo=0x187da48, reqinfo=0x1893350, requests=0x18aedb0) at row_merge.c:332 #10 0x400252a8 in netsnmp_call_handler (next_handler=0x187dad8, reginfo=0x187da48, reqinfo=0x1893350, requests=0x18aedb0) at agent_handler.c:435 #11 0x4002547c in netsnmp_call_next_handler (current=0x187db18, reginfo=0x187da48, reqinfo=0x1893350, requests=0x18aedb0) at agent_handler.c:540 #12 0x40050b28 in _container_table_handler (handler=0x187db18, reginfo=0x187da48, agtreq_info=0x1893350, requests=0x18aedb0) at table_container.c:636 #13 0x400252a8 in netsnmp_call_handler (next_handler=0x187db18, reginfo=0x187da48, reqinfo=0x1893350, requests=0x18aedb0) at agent_handler.c:435 #14 0x4002547c in netsnmp_call_next_handler (current=0x187db88, reginfo=0x187da48, reqinfo=0x1893350, requests=0x18aedb0) at agent_handler.c:540 #15 0x4004e08c in table_helper_handler (handler=0x187db88, reginfo=0x187da48, reqinfo=0x1893350, requests=0x18aedb0) at table.c:619 #16 0x400252a8 in netsnmp_call_handler (next_handler=0x187db88, reginfo=0x187da48, reqinfo=0x1893350, requests=0x18aedb0) at agent_handler.c:435 #17 0x40025b1c in netsnmp_call_handlers (reginfo=0x187da48, reqinfo=0x1893350, requests=0x18aedb0) at agent_handler.c:516 #18 0x40017160 in handle_var_requests (asp=0x18aa5b0) at snmp_agent.c:2530 #19 0x40019184 in handle_pdu (asp=0x18aa5b0) at snmp_agent.c:3326 #20 0x40019aa4 in netsnmp_handle_request (asp=0x18aa5b0, status=0x0) at snmp_agent.c:3122 #21 0x4001a2dc in handle_snmp_packet (op=0x1, session=0x1874e38, reqid=0xa, pdu=0x18ac550, magic=0x0) at snmp_agent.c:1852 #22 0x40190d7c in _sess_process_packet (sessp=0x1874de8, sp=0x1874e38, isp=0x1874e00, transport=0x18748f0, opaque=0x18874c8, olength=0x4, packetptr=0x18975c0 "H©e@H©e@\t", length=0x1) at snmp_api.c:5326 #23 0x40192d00 in _sess_read (sessp=0x1874de8, fdset=0xbe1ffcc4) at snmp_api.c:5742 #24 0x40192d80 in snmp_sess_read (sessp=0x1874de8, fdset=0xbe1ffcc4) at snmp_api.c:5761 #25 0x40192e20 in snmp_read (fdset=0xbe1ffcc4) at snmp_api.c:5378 #26 0x4001b6ac in agent_check_and_process (block=0x1) at snmp_agent.c:606 #27 0x00028a04 in start_agent_check_and_process () at snmp.cpp:360 -----Original Message----- From: Malathi Panyam [mailto:[email protected]] Sent: Monday, March 28, 2011 9:45 AM To: Dave Shield Cc: [email protected] Subject: RE: query to dsx1Intervaltable always kills the subagent I am sorry if I am not clear about my question.. 1) Dsx1IntervalTable has two indexes dsx1IntervalIndex and dsx1IntevalNumber 2) I am assigning them to the row request context as we do with other tables for (int dsx1Index = 1, dsx1IntIndex = 1; dsx1Index <= lMaxIndex, dsx1IntIndex <= 96; dsx1Index++, dsx1IntIndex++){ rowreq_ctx = dsx1IntervalTable_allocate_rowreq_ctx(NULL); if (NULL == rowreq_ctx) { log(pSNMPLogger, "memory allocation failed\n"); return MFD_RESOURCE_UNAVAILABLE; } if(MFD_SUCCESS != dsx1IntervalTable_indexes_set(rowreq_ctx , dsx1Index , dsx1IntIndex )) { log(pSNMPLogger,"error setting index while loading " "dsx1IntervalTable data."); dsx1IntervalTable_release_rowreq_ctx(rowreq_ctx); continue; } } Where lMaxIndex will provide the number of DS1's. 3) I need to assign the 96 intervals(for the past 24 hours, 15 min each interval). 4) I have a function call to make from dsx1IntervalTable_row_prep() in dsx1IntervalTable_data_access.c Now I have started seeing a core file which has the trace pointing to the line where we retrieve the index from row request #0 dsx1IntervalTable_Extract_Row (rowreq_ctx=0x18b3518) at dsx1IntervalTable_custom.cpp:115 115 long ds1Index = rowreq_ctx->tbl_idx.dsx1IntervalIndex - 1; (gdb) where #0 dsx1IntervalTable_Extract_Row (rowreq_ctx=0x18b3518) at dsx1IntervalTable_custom.cpp:115 I have been using the similar code for all my tables and I never faced this, except that I am using a two index table for the first time. What am I doing wrong here? Thanks for your help Regards, Malathi -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Dave Shield Sent: Friday, March 25, 2011 6:24 AM To: Malathi Panyam Cc: [email protected] Subject: Re: query to dsx1Intervaltable always kills the subagent On 25 March 2011 03:57, Malathi Panyam <[email protected]> wrote: > We are trying to support DS1 MIB(RFC4805) on our device. We use NetSNMP > 5.4.2.1 and use the mib2c generated code for tables. > > Our subagent for dsx1IntervaTable always getting killed when queried. I > don't find any core file though. You haven't really given much information about exactly what code you're working with, or what might be causing the crash. So there's a limit to how much assistance we can be based on this report. I'd draw your attention to the project Wiki page http://net-snmp.sourceforge.net/wiki/index.php/Debugger which might help you pinpoint the cause of the problem. Dave ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users