Hi folks, I got hit by another deadlock condition. Thats two different ones on two consecutive days :(
In ActiveMQ I see a lot of blocks of code using synchronized access, nothing wrong with that but this increases the potential for deadlocks as evidenced by the last two problems I have hit within the span of a couple of days (https://issues.apache.org/activemq/browse/AMQ-1467, https://issues.apache.org/activemq/browse/AMQ-1468) This may be just my luck but I think it points to concurrency 101 lessons (http://undergraduate.csse.uwa.edu.au/units/CITS3213/lectures2/lect4.pdf) some which are a.) Lock on the appropriate object 2.) don't hold locks for longer than absolutely necessary 3.) avoid nested locks like the plague. 4.) Establish locking order for nested locks etc. Thoughts? Nicky BTW. JConsole has a cool detect deadlock feature in jdk6 which makes this exercise quick (once you stumble across the deadlock that is >:)) + this article (http://www.javaspecialists.eu/archive/Issue130.html) has code that you can run periodically to dump them when they happen... something to be included in perhaps a debug version to help root all these out ? -- View this message in context: http://www.nabble.com/Deadlocks-again-%3A%28-tf4643498s2354.html#a13263508 Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.