[snmp] deadlock when destroying a context
Stephen Chen
schen at ziplip.net
Fri Jan 26 12:02:16 GMT 2007
I didn't catch the beginning of this, but I encountered the same thing.
> On 26 Jan 2007, at 14:08, Josh Bers wrote:
>
> > Hi Tim,
> >
> > Here's some code snippets. Good luck reproducing it... It seems to
> > occur
> > when one thread is sending trap PDU's while another tries to
> > destroy the
> > context. I put a delay between my last trap send and the destroy
> > and haven't
> > seen it again.. (see lines marked // **uncomment to fix deadlock).
>
> Ah, that makes sense - traps don't behave like other PDUs in that
> there is no retry so the Transmitter can be destroyed immediately
> after the first send() .
I modified ResponsePdu to notify after send.
This allows the observer to initiate context destruction.
This looks similar to fillin and handleNoAnswer in Pdu.
> I can from the code how it happens, but a tidy fix will have to wait
> 'till
> next week!
>
> Tim.
While building an agent, I needed an AsnObjectId comparator
or have AsnObjectId implement Comparable. I built an AsnObjectId comparator,
which made get next requests easier to fulfill.
Any thoughts about providing this in the stack?
Any chance of providing a better example of an agent with get or get next response?
The trap example just sends or receives, and I had to combine the two to
get a working agent.
My biggest wish would be for an agent that responds to Sun's JVM MIB and is extendable,
as the one included in the 1.5 JVM is not extendable.
Stephen Chen
Senior Software Engineer
ZipLip, Inc.
schen at ziplip.net
More information about the snmp
mailing list