On Mon, Dec 7, 2009 at 11:29 AM, Manu Mehta <[email protected]> wrote:
>
> 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

Coincidentally I ran into a similar issue around the same time (see
also the e-mail I posted on the net-snmp-users mailing list). Does the
patch below fix the issue you observed ?

Bart.

Index: agent/mibgroup/disman/mteTriggerTable.c
===================================================================
--- agent/mibgroup/disman/mteTriggerTable.c     (revision 19074)
+++ agent/mibgroup/disman/mteTriggerTable.c     (working copy)
@@ -192,17 +192,6 @@ init_mteTriggerTable(void)
     se_add_pair_to_slist("mteBooleanOperators", strdup(">="),
                          MTETRIGGERBOOLEANCOMPARISON_GREATEROREQUAL);

-#ifdef NETSNMP_TRANSPORT_CALLBACK_DOMAIN
-    /*
-     * open a 'callback' session to the main agent
-     */
-    if (mte_callback_sess == NULL) {
-        mte_callback_sess = netsnmp_callback_open(callback_master_num,
-                                                  NULL, NULL, NULL);
-        DEBUGMSGTL(("mteTriggerTable", "created callback session = %08x\n",
-                    mte_callback_sess));
-    }
-#endif
     DEBUGMSGTL(("mteTriggerTable", "done.\n"));
 }

@@ -3063,6 +3052,12 @@ mte_get_response(struct mteTriggerTable_data *item
          * send to the local agent
          */

+        if (mte_callback_sess == NULL)
+            mte_callback_sess = netsnmp_query_get_default_session();
+
+        if (!mte_callback_sess)
+            return NULL;
+
         status = snmp_synch_response(mte_callback_sess, pdu, &response);

         if (status != SNMP_ERR_NOERROR ||
Index: agent/mibgroup/utilities/iquery.c
===================================================================
--- agent/mibgroup/utilities/iquery.c   (revision 19074)
+++ agent/mibgroup/utilities/iquery.c   (working copy)
@@ -61,6 +61,10 @@ _init_default_iquery_session( int majorID, int min
     if (secName)
         netsnmp_query_set_default_session(
              netsnmp_iquery_user_session(secName));
+    else
+        snmp_log(LOG_WARNING,
+                 "Warning: agentSecName has not been configured -- internal"
+                 " queries will fail.\n");
     return SNMPERR_SUCCESS;
 }

Attachment: disman.patch
Description: Binary data

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to