I tried running the subagent with gdb and it happened to receive SIGPIPE.
This explains why it died silently.

Is it possible to recover from this state?

This is my init code.
 init_agent(MODULE_NAME);

    /* initialize mib code here */

    /*Call the entry point for the MIB specific code. Every MIB sub-agent
     * should implement a function called init_appMIB from which it calls
the
     * MIB specific init functions generated by mib2c*/
    init_appMIB();

    /* example-demon will be used to read example-demon.conf files. */
    init_snmp(MODULE_NAME);

    /* In case we recevie a request to stop (kill -TERM or kill -INT) */
    keep_running = 1;
    signal(SIGTERM, stop_server);
    signal(SIGINT, stop_server);

    /*snmp_log(LOG_INFO,"example-demon is up and running.\n");*/

    /* your main loop here... */
    while(keep_running) {
        /* if you use select(), see snmp_select_info() in snmp_api(3) */
        /*     --- OR ---  */
        agent_check_and_process(1); /* 0 == don't block */
    }
    /* at shutdown time */

My next step would be to catch the SIGPIPE and call this init function again
and see if it recovers.


On Wed, Mar 5, 2008 at 9:12 PM, Thomas Anders <[EMAIL PROTECTED]>
wrote:

> deepak b wrote:
> > I am running some stress test on my subagent, roughly 250 attribute
> > get/second from 5 client and 2 more clients doing snmpset on 5 and 2
> > attributes/15 second.
> > After running for a couple of hours, the subagent dies silently(without
> > any core dumps) and it spits out the following before doing so.
> > dropping bad AgentX request (wrong mode 2)
> > dropping bad AgentX request (wrong mode 2)
> > dropping bad AgentX request (wrong mode 2)
> > dropping bad AgentX request (wrong mode 2)
> > dropping bad AgentX request (wrong mode 2)
> > dropping bad AgentX request (wrong mode 2) �
> > (It dies about 6 times in 10 hours)
> >
> > I did search about the error in the mail archive and the only thing i
> > came to know is they come when there is load on the subagent.
>
> This rings a bell. I think I've seen this before with an AgentX
> master/subagent combination under load. However, I've never been able to dig
> into the reason. Let us know what you find out!
>
>
> +Thomas
>
> --
> Thomas Anders (thomas.anders at blue-cable.de)
>



-- 
Regards,
Deepak B.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to