On Fri, 10 Sep 2004 11:43:01 +0900 Won-Sik wrote:
WSK> WSK> 3. what did I do to solve this problem ?
WSK> WSK>     a. I removed following two lines from file agent/snmp_agent.c
WSK> RSTORY> That is definitely not the right solution, as it will
WSK> RSTORY> unconditionally remove all delegated requests for all sessions.
WSK> I know it is not a right solution. But, 'removing all delegated requests
WSK> for all sessions' is better than 'no more response from snmpd'.

Good point.

WSK> For your convenience, once more I describe my locking problem.
WSK> 1. our system have more than two sub-agents.
WSK> 2. there are many set requests to sub-agents.
WSK> 3. shutdown interface between master agent and a sub-agent

Can you reproduce the problem with a single sub-agent?

Also, running with debugging (in particular, the 'agentx/master' token) might
help too. Start with a single sub-agent, and a diconnect, to see what a normal
sequence looks like. Then start your testing, and once the lockup occurs, check
the recent log messages and see if anything seems to be missing.

WSK> I used net-snmp more than two years. And, I used agentX feature from last
WSK> year. In the beginning, agentX feature had several problems. but, the
WSK> fruit of many people's efforts, current agentX feature in net-snmp is very
WSK> robust and memory safe.

Excellent, that is good to hear!

WSK> Finally, I only have following two problems in my
WSK> net-snmp agentX system. 1. above locking problem
WSK> 2. during MIB registration of sub-agent to master agent, if I shutdown
WSK> interface between
WSK>     master agent and sub-agent, sometimes, sub-agent crash. (very rarely
WSK>     happen)

You should submit a bug report for each of these.

WSK> I will wait a good news from you.

Unfortunately, since the situation to reproduce this case is rather extreme,
this bug will be fairly low on the priority list.

But, can you try this patch, and see if it helps any?

Index: agent/mibgroup/agentx/master_admin.c
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/agent/mibgroup/agentx/master_admin.c,v
retrieving revision 5.6
diff -u -r5.6 master_admin.c
--- agent/mibgroup/agentx/master_admin.c        9 Nov 2002 15:06:40 -0000       5.6
+++ agent/mibgroup/agentx/master_admin.c        10 Sep 2004 16:27:25 -0000
@@ -144,13 +144,13 @@
          * requests, so that the delegated request will be completed and
          * further requests can be processed
          */
-        netsnmp_remove_delegated_requests_for_session(session);
         if (session->subsession != NULL) {
             netsnmp_session *subsession = session->subsession;
             for(; subsession; subsession = subsession->next) {
                 netsnmp_remove_delegated_requests_for_session(subsession);
             }
         }
+        netsnmp_remove_delegated_requests_for_session(session);
                 
         return AGENTX_ERR_NOERROR;
     }



-- 
Robert Story; NET-SNMP Junkie <http://www.net-snmp.org/>
<irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>

You are lost in a twisty maze of little standards, all different. 


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to