Thank you very much for your reply; I did not see anything immediately
obvious in the "select" man page; however, the repository fix seems to
do what I had envisioned for the recv{from|msg} problem. I will
create a patch from SVN and try it out.
Thank you again,
Doug
On Thu, Mar 5, 2009 at 12:31 PM, Magnus Fromreide <[email protected]> wrote:
>
> - Show quoted text -
> On Thu, Mar 05, 2009 at 10:35:51AM -0500, Doug Manley wrote:
> > Hello, all,
> >
> > I'm noticing some of my SNMP polling threads (in an application)
> > freeze from time to time. GDB says that it's hanging up on "recvmsg",
> > and some code hunts show that it's the one in "netsnmp_udp_recvfrom".
> > If I GDB in and wait for a few minutes, the threads unfreeze and go
> > about their business normally.
> >
> > My thought is that the SIGTRAP that GDB sends (or the halt of
> > execution) messes up the system "recvmsg" call and causes it to
> > finally return. I've had these calls run for half a day, only to
> > immediately return after I run GDB (very confusing for me the first
> > time around). Subsequent tests confirm this behaviour.
> >
> > So, looking at "snmplib/snmpUDPDomain.c" on line 141, I see a recvmsg
> > *without* a prior "select" to make sure that there is data to be had.
> > Should there be a "select" beforehand?
> >
> > Any help would be appreciated.
>
> You haven't told what net-snmp version you are using, but I suspect that you
> are using linux. I suspect that revision 17258 (trunk, 5.4.2+, 5.3.2+ and
> 5.2.5+) is about this problem. See also the BUGS section in the linux select
> man page.
>
> Could you please check if any of releases mentioned above fixes your problem?
>
> /MF
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders