Hi,

I am using net-snmp 5.4 and in agentX framework with 1 Master and 5
subagents. Subagents report there capabilities periodically(every 5
seconds) using AgentX AddAgentCaps PDU.

I have an automated test suite which runs for 5 hours and have tests
consisting of various snmpwalks/snmpgets on various mibs Sometimes
when i run this suite i observe that some of the subagents gets stuck.
The problem is quite random and doesn't consistently or for a given
subagent only. Sometimes i have to run this suite multiple times to
reproduce this behavior
Following is the backtrace of a stuck subagent.

#0  0x0fac1b40 in ___newselect_nocancel () from /lib/libc.so.6
#1  0x0ff666d8 in snmp_synch_response_cb () from /usr/lib/libnetsnmp.so.15
#2  0x0fe90a20 in agentx_synch_response () from /usr/lib/libnetsnmpagent.so.15
#3  0x0fe90c60 in agentx_add_agentcaps () from /usr/lib/libnetsnmpagent.so.15
#4  0x0fe8dd10 in agentx_sysOR_callback () from /usr/lib/libnetsnmpagent.so.15

The back trace suggests that the subagents are waiting for the
response of AGENTX_MSG_ADD_AGENT_CAPS request. Now ideally even if the
master agent doesn't sends back the response, subagent should timeout
using the values of agentXTimeout, agentXRetries which i have defined
in my snmpd.conf as 5 and 1 respectively on subagents but its not
happening and subagents are stuck forever.

I was looking at the code of snmp_synch_response_cb() which the
function being called eventually from agentx_add_agentcaps () and i
can see that the function has changed in netsnmp 5.4.3.pre1.

There has been an additional check introduced snmp_synch_response_cb()
function towards the end -
if ( ss->flags & SNMP_FLAGS_RESP_CALLBACK ) {
            void (*cb)(void);
            cb = ss->myvoid;
            cb();        /* Used to invoke
'netsnmp_check_outstanding_agent_requests();'
                            on internal AgentX queries.  */
}

Can anyone please explain the reason for this additional code and
could this be related to the issue that i am facing?

Thanks,
Manu

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to