[AGENT++] SNMP request blocked?

Jochen Katz katz at agentpp.com
Thu Sep 22 21:19:17 CEST 2011


Hi,

> I've run into a situation where we are seeing a thread blocked in SNMP++:
> 
> Thread 21 (Thread 0x4b0c1940 (LWP 28959)):
> #0  0x00000030ff80dd9c in recvfrom () from /lib64/libpthread.so.0
> #1  0x00002aecf1bb878f in receive_snmp_response (sock=138, snmp_session=...,
>     pdu=..., fromaddress=..., engine_id=..., process_msg=true)
>     at uxsnmp.cpp:338
> #2  0x00002aecf1b9b045 in CSNMPMessageQueue::HandleEvents (
>     this=0x2aaae41044d0, readfds=0x2aaaac898d10, fds=1) at msgqueue.cpp:521
> 
> I don't see how this could happen - it should timeout.

it should not time out, because the code in HandleEvents should only
trigger the call to recvfrom if there is a packet waiting on the socket.
So the recvfrom should always return immediately.

Did you enable logging? Are you doing a lot of synchronous snmp requests
at the same time? In case you can reproduce it: is the thread unblocked
it you send a random UDP packet to the port?

> Are there any plans for another SNMP++ release which includes the various patches?

Some of them are already integrated, but some will not. And as far as I
remember none of them will have an effect in this case.

Regards,
  Jochen



More information about the AGENTPP mailing list