Sending traps from subagent results either in deadlock(tcp recvQ issue) or SIGPIPE
"Usha Kodali" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <A2498D643353C94B81234F9D1DEB17B113FEF64E@mbx031-w1-co-8.exch031.domain.local> |
I am running net-snmp 5.4.2.1 Have a subagent sending traps to the master snmpd daemon. After about (depending on the size of trap buffer) 200 or 500 traps, either the subagent and snmpd deadlock in sendto or subagent receives a SIGPIPE. Observations: 1. The core problem is that snmpd agent doesn't seem to drain it's recvQ (using tcp:localhost:705) 2. If the subagent is implemented as a library call, there is no way to clean up the session and reinit. The following sequence doesn't seem to work init_agent init_snmp(daemon_name); .. // Lets say inorder to avoid the deadlock, I will close the session(subagent) after sending x traps and reinit snmp_shutdown(daemon_name); shutdown_agent(); // Reinit Init_agent Init_snmp I have read through all the forum posts, but didn't find any solution. I did read that 5.7.2 does resolve the SIGPIPE, unfortunately I cannot risk snmp hijacking SIGPIPE since the daemon sending the traps needs to handle this signal for other reasons. Besides that, I have also read that 5.7.2 doesn't solve the deadlock (main cause the recvQ on the snmpd socket doesn't get drained) Appreciate any help or insights into this. Thanks, -Usha ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users