Hello coders! This mail has already been sent, but in mailing list it is arranged in wrong order so I'm sending it again.
Nice day, Igor G. ____________________________________________________________________________ ___ Related to my poor deaf or better dead master agent I discovered few things. When I manage to achive the state of 'darknes' :) at master agent I I connect remotely to the master with the gdb. There is no other living agentx client or something else to disturb my test case. When connected, master is mostly in the select() at snmpd.c. Then I make some snmp request from some other device and I discovered, that with every request in function 'netsnmp_handle_request (asp=0x189310, status=560432) at snmp_agent.c:2935' global pointer 'netsnmp_processing_set' pointing at some structure. If I understand right coments in code: " * if this isn't a delegated request trying to finish, * processing of a set request should not start until all * delegated requests have completed, and no other new requests * should be processed until the set request completes. " and code itself, every new requests is added to the requests linked list instead of processed imediatly. And it seems to me, that from this state is no return for master unless it is restarted... I concluded, that in master agent in some point of processing get, set and agentx requests disarrange this requests, one of set becomes delegated and no other processing is further possible. Actually, every further requests is added to the delegated requests queue. Bellow is debugger listing, which make me thought about that. And interesting, I made up the same test environment at much faster PC machine, there is no slow peripheral devices like in the presented embedded system. Guess what, after few days of testing, I couldn't achive the deaf master agent (!). (By the way: I made test script, which is doing periodicaly get/set requests and restarting one subagent) Now I'm begging you... please help! Nice day, Igor G. ============================================================================ ============ Breakpoint 2, netsnmp_handle_request (asp=0x18e640, status=560432) at snmp_agent.c:2935 2935 if ((0 == netsnmp_check_delegated_chain_for(asp)) && (gdb) p *asp $37 = {mode = 0, session = 0x88f18, pdu = 0x1bf910, orig_pdu = 0xa3500, rw = 1, exact = 1, status = 0, index = 0, oldmode = 0, next = 0x0, reqinfo = 0x1a9758, requests = 0x0, treecache = 0x0, bulkcache = 0x0, treecache_len = 0, treecache_num = -1, cache_store = 0x0, vbcount = 0} (gdb) p *asp->session $38 = {version = -1, retries = 5, timeout = 1000000, flags = 0, subsession = 0x0, next = 0x0, peername = 0x0, remote_port = 0, localname = 0x0, local_port = 0, authenticator = 0, callback = 0x18c84 <handle_snmp_packet>, callback_magic = 0x0, s_errno = 0, s_snmp_errno = 0, sessid = 5, community = 0x88d90 "", community_len = 0, rcvMsgMaxSize = 65507, sndMsgMaxSize = 0, isAuthoritative = 1 '\001', contextEngineID = 0x0, contextEngineIDLen = 0, engineBoots = 0, engineTime = 0, contextName = 0x88da0 "", contextNameLen = 0, securityEngineID = 0x0, securityEngineIDLen = 0, securityName = 0x0, securityNameLen = 0, securityAuthProto = 0x89010, securityAuthProtoLen = 10, securityAuthKey = '\0' <repeats 31 times>, securityAuthKeyLen = 0, securityAuthLocalKey = 0x0, securityAuthLocalKeyLen = 0, securityPrivProto = 0x89040, securityPrivProtoLen = 10, securityPrivKey = '\0' <repeats 31 times>, securityPrivKeyLen = 0, securityPrivLocalKey = 0x0, securityPrivLocalKeyLen = 0, securityModel = 3, securityLevel = 1, securityInfo = 0x0, myvoid = 0x0} (gdb) p *asp->pdu $39 = {version = 1, command = 161, reqid = 1140618767, msgid = 0, transid = 27241, sessid = 0, errstat = 0, errindex = 0, time = 0, flags = 0, securityModel = 2, securityLevel = 1, msgParseModel = 0, transport_data = 0x177090, transport_data_length = 16, tDomain = 0x64f70, tDomainLen = 7, variables = 0x1ee2b8, community = 0x1e1958 "public", community_len = 6, enterprise = 0x0, enterprise_length = 0, trap_type = 0, specific_type = 0, agent_addr = "\000\000\000", contextEngineID = 0x0, contextEngineIDLen = 0, contextName = 0x0, contextNameLen = 0, securityEngineID = 0x0, securityEngineIDLen = 0, securityName = 0x0, securityNameLen = 0, priority = 0, range_subid = 0, securityStateRef = 0x0} (gdb) p netsnmp_processing_set $40 = (struct netsnmp_agent_session_s *) 0x88bd0 (gdb) n 2941 if (netsnmp_processing_set) { (gdb) 2963 netsnmp_add_queued(asp); (gdb) si 0x00019ee8 2963 netsnmp_add_queued(asp); (gdb) netsnmp_add_queued (asp=0x18e640) at snmp_agent.c:1447 1447 if (NULL == netsnmp_agent_queued_list) { (gdb) n 1449 return 1; (gdb) 1456 asp_tmp = netsnmp_agent_queued_list; (gdb) p netsnmp_agent_queued_list $41 = (struct netsnmp_agent_session_s *) 0x1c6280 (gdb) p *netsnmp_agent_queued_list $42 = {mode = 0, session = 0x88f18, pdu = 0x1c90d0, orig_pdu = 0x1c0a68, rw = 1, exact = 1, status = 0, index = 0, oldmode = 0, next = 0x1b6318, reqinfo = 0x1c2610, requests = 0x0, treecache = 0x0, bulkcache = 0x0, treecache_len = 0, treecache_num = -1, cache_store = 0x0, vbcount = 0} (gdb) p *netsnmp_agent_queued_list->pdu $43 = {version = 1, command = 163, reqid = 612679711, msgid = 0, transid = 27136, sessid = 0, errstat = 0, errindex = 0, time = 0, flags = 0, securityModel = 2, securityLevel = 1, msgParseModel = 0, transport_data = 0x1c9dc8, transport_data_length = 16, tDomain = 0x64f70, tDomainLen = 7, variables = 0x89ad8, community = 0x1bf030 "public", community_len = 6, enterprise = 0x0, enterprise_length = 0, trap_type = 0, specific_type = 0, agent_addr = "\000\000\000", contextEngineID = 0x0, contextEngineIDLen = 0, contextName = 0x0, contextNameLen = 0, securityEngineID = 0x0, securityEngineIDLen = 0, securityName = 0x0, securityNameLen = 0, priority = 0, range_subid = 0, securityStateRef = 0x0} (gdb) p *netsnmp_agent_queued_list->session $44 = {version = -1, retries = 5, timeout = 1000000, flags = 0, subsession = 0x0, next = 0x0, peername = 0x0, remote_port = 0, localname = 0x0, local_port = 0, authenticator = 0, callback = 0x18c84 <handle_snmp_packet>, callback_magic = 0x0, s_errno = 0, s_snmp_errno = 0, sessid = 5, community = 0x88d90 "", community_len = 0, rcvMsgMaxSize = 65507, sndMsgMaxSize = 0, isAuthoritative = 1 '\001', contextEngineID = 0x0, contextEngineIDLen = 0, engineBoots = 0, engineTime = 0, contextName = 0x88da0 "", contextNameLen = 0, securityEngineID = 0x0, securityEngineIDLen = 0, securityName = 0x0, securityNameLen = 0, securityAuthProto = 0x89010, securityAuthProtoLen = 10, securityAuthKey = '\0' <repeats 31 times>, securityAuthKeyLen = 0, securityAuthLocalKey = 0x0, securityAuthLocalKeyLen = 0, securityPrivProto = 0x89040, securityPrivProtoLen = 10, securityPrivKey = '\0' <repeats 31 times>, securityPrivKeyLen = 0, securityPrivLocalKey = 0x0, securityPrivLocalKeyLen = 0, securityModel = 3, securityLevel = 1, securityInfo = 0x0, myvoid = 0x0} (gdb) n 1461 if (asp_tmp == asp) (gdb) p asp $45 = (struct netsnmp_agent_session_s *) 0x18e640 (gdb) n 1467 if (NULL == asp_tmp->next) (gdb) n 1468 asp_tmp->next = asp; (gdb) 1457 for (; asp_tmp; asp_tmp = asp_tmp->next) { (gdb) 1461 if (asp_tmp == asp) (gdb) 1467 if (NULL == asp_tmp->next) (gdb) 1468 asp_tmp->next = asp; (gdb) until 1470 netsnmp_add_queued (asp=0x18e640) at snmp_agent.c:1471 1471 } (gdb) n netsnmp_handle_request (asp=0x18e640, status=560432) at snmp_agent.c:2964 2964 return 1; (gdb) n 3005 } (gdb) _sess_process_packet (sessp=0x88d78, sp=0x88f18, isp=0x88ee0, transport=0x88d30, opaque=0x125180, olength=1511944, packetptr=0x1ca058 "0)\002\001\001\004\006public|\034\002\004C|v\017\002\001", length=43) at snmp_api.c:5249 5249 if (pdu != NULL && pdu->securityStateRef && (gdb) 5268 if (!handled) { (gdb) 5273 snmp_free_pdu(pdu); (gdb) 5274 return 0; (gdb) 5275 } ============================================================================ ========= ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders