Well it turns out the "forever" loop I was referencing in my previous posts was 
the reason why other applications (following the subagent) could not be started 
when our hardware box started up.  Basically, the "forever" loop was never 
returning control to the "GenInit()" routine for it to continue on to load 
other applications.   Anyway, I am now starting the subagent in it's own thread 
and all applications are requested to start now, however, it turns out the 
subagent code still eventually crashes.  

The main subagent code calls the "agent_check_and_process()" method which then 
calls "snmp_timeout()" routine.   The "snmp_timeout()" routine calls the 
"snmp_sess_timeout()" routine with an invalid address pointer, which eventually 
causes a coredump to occur within the "snmp_sess_timeout()" routine when the 
pointer is accessed.

Here is the "snmp_timeout()" routine:

     void  snmp_timeout(void)
     {
         struct session_list *slp;
         snmp_res_lock(MT_LIBRARY_ID, MT_LIB_SESSION);
         for (slp = Sessions; slp; slp = slp->next) {
             snmp_sess_timeout((void *) slp);
         }
         snmp_res_unlock(MT_LIBRARY_ID, MT_LIB_SESSION);
     }

In this routine, the bad pointer address comes from the "Sessions" linked list 
and is passed into the "snmp_sess_timeout()" routine.   

Will someone please explain to me what the "Sessions" linked list represents, 
how it is populated and (if possible) why it could contain an invalid address?

I do not understand the NetSNMP code enough to figure this one out.  I have 
been looking at this all morning and I have no idea what I am doing.  Some 
hints on how to approach this problem would obviously be beneficial and greatly 
appreciated.



       
---------------------------------
Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green Center.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to