One more question/problem for you: can I set the socket options to
have a timeout from my program *without* modifying the 5.4.1 library?

I want to avoid the trouble of an upgrade of 3rd-party software on my
customers' production boxes (changing our executables is easy;
recompiling system stuff is hard).  I was hoping to just set a quick
socket option on the transport to have it time out after, say, one
minute no matter what and wait for our operating system to carry the
new version of net-snmp.

I looked into the structures, and it looks like I need the session
list structure so I can grab the transport.  Is there an easier way?

Doug

On Thu, Mar 5, 2009 at 2:42 PM, Doug Manley <[email protected]> wrote:
> 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

Reply via email to