On Sun, Nov 13, 2005 at 08:16:58PM -0500, Robert Story wrote: > On Sun, 13 Nov 2005 23:12:47 +0100 Magnus wrote: > MF> lib/libnetsnmpagent.a(snmp_agent.o): In function `handle_getnext_loop': > MF> agent/snmp_agent.c:2832: undefined reference to `running' > MF> > MF> when I try to > MF> > MF> net-snmp-config --compile-subagent scalar_int.c > MF> > MF> where scalar_int.c is in agent/mibgroup/examples. > > Sigh. That was me, trying to fix a problem where an agent stuck in a get-next > loop was not responding to SIGTERM. > > The problem is that there are loops in the agent library which will not > terminate when a signal is received. In the past week, I've run into this > twice. Once, a get-next loop when bad, resulting in an infinite loop with no > way out. The second was an agentx subagent connecting to a missing master > agent would not exit on SIGTERM until it had made all of its retires to > connect > (which would be at least 5 seconds by default). > > Obviously introducing a dependency on an external variable, and breaking > backwards compatibility, is not a good thing. However, if we were going to do > it, 5.3 would be the right time. > > The other options would be moving the variable into the library. Then any > application that installed a signal handler and set the flag would be able to > exit these loops. > > Thoughts?
* If we introduce an external variable it should be named netsnmp_*, running is not a sufficiently unique name. * The infinite loop in snmp_agent seems to be due to us wishing to handle any kind of data source, the best way forward I can imagine would be to check for progress (there are more data now than last time) on each lap and if there haven't been any progress for sufficiently many laps (1?, 3?) then we could assume something is broken and report an error. * Looking at the agentx subagent code I failed to locate the loop and thus I have no comments on it. /MF ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
