[SNMP4J] Bug report: org.snmp4j.util.ThreadPool deadlock
Frank Fock
fock at agentpp.com
Tue Oct 10 23:59:14 CEST 2006
Hi Alex,
Thanks for the report. This bug has been fixed in 1.7.6a.
Best regards,
Frank
Pashkov Alex wrote:
> Hi,
> i'm using snmp4j with a thread pool. From time to time the following deadlocks:
>
> ...
> Java stack information for the threads listed above:
> ===================================================
> "main":
> at org.snmp4j.util.ThreadPool.stop(ThreadPool.java:169)
> - waiting to lock <0x13acc638> (a org.snmp4j.util.ThreadPool$TaskManager)
> - locked <0x13ad1e20> (a org.snmp4j.util.ThreadPool)
> <skipped>
>
> "snmp.0":
> at org.snmp4j.util.ThreadPool$TaskManager.run(ThreadPool.java:240)
> - waiting to lock <0x13ad1e20> (a org.snmp4j.util.ThreadPool)
> - locked <0x13acc638> (a org.snmp4j.util.ThreadPool$TaskManager)
>
> Found 1 deadlock.
>
> Thread "snmp.0" from thread pool executes a task, while "main" thread executes ThreadPool.stop().
> So "main" thread first locks ThreadPool.this (via synchronized keyword in stop() definition), then it tries to lock TaskManager.this explicitly to notify() it.
> "snmp.0" thread locks TaskManager.this (via synchronized keyword in run() definition), then tries to lock ThreadPool.this to notify() it...
>
> Hope, this helps.
>
> Best regards,
> Pashkov Alexander
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j
--
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com
More information about the SNMP4J
mailing list