Hi,
I am working with net-snmp as master agent and a subagent which
register a private MIB with a table.
First I create a row with set the RowStatus = createAndGo, set the
row object (in my example a DisplayString).
Than I destroy this row again.
While de-register the row, while working on the snmpset
request ...RowStatus = destroy
the master agent crashes!
This happens every time when I do set sequence, with net-snmp V5.4.3,
V5.5, and V5.6!
I need some advice what I can do to locate the problem?
Claus
$ ./libtool --mode=execute gdb agent/snmpd
GNU gdb 6.8.0.20080328-cvs (cygwin-special)
Copyright (C) 2008 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 "i686-pc-cygwin"...
(gdb) run -Le -C -c c:/usr/etc/snmp/snmpd.conf -Le -f
Starting program: /cygdrive/c/downloads/net-snmp-5.4.3-patched/agent/
snmpd -Le -C -c c:/usr/etc/snmp/snmpd.conf -Le -f
[New thread 1440.0x6508]
[New thread 1440.0x617c]
Turning on AgentX master support.
Turning on AgentX master support.
warning: Lowest section in /cygdrive/c/WINNT/system32/wmi.dll is .text
at 76cf1000
[New thread 1440.0x3f94]
NET-SNMP version 5.4.3
NET-SNMP version 5.4.3
[New thread 1440.0x33a4]
[New thread 1440.0x43a0]
Program received signal SIGSEGV, Segmentation fault.
netsnmp_call_handlers (reginfo=0x5, reqinfo=0x7bb470,
requests=0x7bb480) at agent_handler.c:477
477 if (reginfo->handler == NULL) {
(gdb) where
#0 netsnmp_call_handlers (reginfo=0x5, reqinfo=0x7bb470,
requests=0x7bb480) at agent_handler.c:477
#1 0x004060a0 in handle_var_requests (asp=0x79f830) at snmp_agent.c:
2552
#2 0x00406795 in handle_set (asp=0x79f830) at snmp_agent.c:3063
#3 0x00406a12 in handle_set_loop (asp=0x79f830) at snmp_agent.c:3079
#4 0x004084e0 in check_delayed_request (asp=0x79f830) at snmp_agent.c:
2790
#5 0x0040856e in netsnmp_check_outstanding_agent_requests () at
snmp_agent.c:2650
#6 0x0040235a in main (argc=7, argv=0x74a590) at snmpd.c:1231
(gdb)
(gdb) list
472 netsnmp_assert(reginfo != NULL);
473 netsnmp_assert(requests != NULL);
474 return SNMP_ERR_GENERR;
475 }
476
477 if (reginfo->handler == NULL) {
478 snmp_log(LOG_ERR, "no handler specified.");
479 return SNMP_ERR_GENERR;
480 }
481
(gdb)
(gdb) up
#1 0x004060a0 in handle_var_requests (asp=0x79f830) at snmp_agent.c:
2552
2552 status = netsnmp_call_handlers(reginfo, asp-
>reqinfo,
(gdb) list
2547 * - should this case encompass more of this subroutine?
2548 * - does check_request_status make send if handlers
weren't called?
2549 */
2550 if(NULL != asp->treecache[i].subtree->reginfo) {
2551 reginfo = asp->treecache[i].subtree->reginfo;
2552 status = netsnmp_call_handlers(reginfo, asp-
>reqinfo,
2553 asp-
>treecache[i].requests_begin);
2554 }
2555 else
2556 status = SNMP_ERR_GENERR;
(gdb)
(gdb) print asp->treecache[i].subtree
$4 = (struct netsnmp_subtree_s *) 0x7bb100
(gdb) print * asp->treecache[i].subtree
$5 = {name_a = 0x7bb0f8, namelen = 248 '▒', start_a = 0x0, start_len
= 0 '\0', end_a = 0x7bc0c0,
end_len = 2 '\002', variables = 0x1, variables_len = 3,
variables_width = 6,
label_a = 0x1 <Address 0x1 out of bounds>, session = 0x4, flags = 1
'\001', priority = 0 '\0',
timeout = 59999, next = 0x21, prev = 0x1, children = 0x2,
range_subid = 1, range_ubound = 2, reginfo = 0x5,
cacheid = 1, global_cacheid = 3, oid_off = 1}
(gdb) up
#2 0x00406795 in handle_set (asp=0x79f830) at snmp_agent.c:3063
3063 status = handle_var_requests(asp);
(gdb) list
3058 }
3059
3060 if (asp->mode != FINISHED_SUCCESS && asp->mode !=
FINISHED_FAILURE) {
3061 DEBUGMSGTL(("agent_set", "doing set mode = %d (%s)\n",
asp->mode,
3062 se_find_label_in_slist("agent_mode", asp-
>mode)));
3063 status = handle_var_requests(asp);
3064 DEBUGMSGTL(("agent_set", "did set mode = %d, status =
%d\n",
3065 asp->mode, status));
3066 if ((status != SNMP_ERR_NOERROR && asp->status ==
SNMP_ERR_NOERROR) ||
3067 status == SNMP_ERR_COMMITFAILED ||
(gdb)
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders