Dear All
I have been all day today trying to avoid crash in the my snmp sub agent while
sending a trap. As I have explained in my earlier mail, when there are tonnes
of traps ( I do agree that this should not be the case, but this can happen
based on some wroing input data in another process which triggers these traps)
going from my agent to the snmpd, my agent crashes even though I have added the
thread safe utilities.
I have modified my code to have snmp get/set processing and sending traps code
into one thread. I tried making both 'receiving internal messages from another
application which triggers traps' and processing get/set
(agent_check_and_process) function call. I have also tried making one get/set
as blocking call and the other is called in a non-blocking way in a signal
handler (sigalarm) periodically. I have tried vice-versa as well.
None of the above attempts worked.
I am thinking of the following:
1. Can I create two subagent processes on the same machine. One for processing
get/set and the other for sending the traps.
2. Integrate my code that does get/set into snmpd and create another process to
send traps based on the triggers received from outside.
I prefer the item 1 above given the complexity in doing item 2 as we have to
maintain net-snmp code and build the whole thing every time there is change in
my application.
I appreciate if you can give me any pointers to solve this problem.
Thanks
Reddy
Robert Story <[EMAIL PROTECTED]> wrote: On Tue, 2 Jan 2007 07:55:27 -0800 (PST)
Venkata wrote:
VG> I am running net-snmp 5.4 on RHEL 4.0 64 bit OS. I have been seeing the
subagent crashing sometimes while sending traps.
Have you tested on RHEL 32 bit? Does it crash as well?
VG> #11 0x0000000000406142 in HandleNormalMsgThread () at netman.cpp:173
Have you read README.threads? You have to be very careful using the library
with threads, because a good deal of the library is not thread-safe.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders