Hi,
a don't know, that I found a bug, or it's a feature :)
I use one C++ application, that polls our network equipments every 10
minutes. It sends about 2000 get requests every time.
It has been worked for 2 years on linux 2.4 kernel machine, and i had to
migrate it last week to one new server, with v2.6 kernel. In the new machine
it ran 3-6 times, and after that it hang in recvfrom() libc function, that
called from snmpUDPDomain.c's setsnmp_udp_recv() function. Maybe because the
UDP answer packet lost in the network, and did not arrive. I'm not an
advanced programmer, but I saw in the man of recvfrom(), that if the
socket's O_NONBLOCK option is not set it would hang, and is waiting for the
answer.
I saw in the TCP sockets has this option, so I modified the UDP initiator
setsnmp_udp_trasport() function to set O_NONBLOCK like in the TCP code, and
after that my program works correctly.
Both machine's OS is Debian Sarge, only the kernels are different ones.
Is that a good workaround, or is that a bug?
Qrta
-------------------------------------------------------------------------
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