On Wed, 06 May 2009 18:09:25 +0530 sanjaykumar wrote:
S> Basically when application reboot then it facing problem in 
"init_mib_modules()"
S> and it crash.
S> Backtrace show that most of crash come after "netsnmp_container_get_ct"
S> I run the valgrind and getting most of the same problem
S> Could anybody suggest what could be reason of this crash ???
S> One of Backtrace for the reference :
S> 
S> ***********************************************************************
S> #0  0x0811f416 in netsnmp_container_get_ct (type=0x82b63e8 
"udpEndpointTable") at container.c:189

See if this patch helps:

Index: snmplib/container.c
===================================================================
--- snmplib/container.c (revision 17653)
+++ snmplib/container.c (working copy)
@@ -188,6 +188,9 @@
 netsnmp_container_get_ct(const char *type)
 {
     container_type ct;
+
+    if (NULL == containers)
+        return NULL;
     
     ct.name = type;
     return (container_type *)CONTAINER_FIND(containers, &ct);


S> 2 :
S> While application shutdown " snmp_shutdown(app_name)" getting called
S> what about the   " shutdown_master_agent()  and    shutdown_agent()"
S> How the respective functionalities achieved by AGENT as in code it 
maintained that
S> it cause the broken code
S> respective code for the reference :
S> *******************************
S> snmp_shutdown(app_name);
S> #ifdef SHUTDOWN_AGENT_CLEANLY /* broken code */
S>     /* these attempt to free all known memory, but result in double frees */
S>     shutdown_master_agent();
S>     shutdown_agent();
S> #endif

It's well know that net-snmp does not release all resources when exiting,
depending on the OS to do it when the app ends. Running the agent as a thread
is not supported, so you'll have a lot of work ahead of you if you want a
thread to be able to shutdown cleanly, releasing all resources.

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to