activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Davies <rajdav...@gmail.com>
Subject Re: Deadlocks again :(
Date Thu, 18 Oct 2007 14:47:19 GMT
Thanks Nicky - really appreciate the input and help!! Will look at  
adding the dead lock detection code



cheers,

Rob

http://rajdavies.blogspot.com/



On Oct 18, 2007, at 3:07 PM, Nicky Sandhu wrote:

>
> Hi Rob,
>  It was not my intention to question your skill, rather it was to  
> point that
> synchronizations lead to deadlocks (potentially) and they are too  
> difficult
> to predict and code review. So I was proposing adding a deadlock  
> detector
> like the one referenced below to optional activemq code.
>  I see a lot of threads on hung producer/consumer/broker issues and  
> if such
> a deadlock detector could be run either on demand or periodically  
> it would
> help the team in pinpointing deadlock issues. Ofcourse not all hung  
> issues
> would be deadlocks but this can't hurt.
>
> Very gently,
>  Nicky
>
> rajdavies wrote:
>>
>> Thanks Nicky!
>>
>> will apply patches asap - we're usually pretty good at avoiding
>> deadlocks :(
>>
>>
>> cheers,
>>
>> Rob
>>
>> http://rajdavies.blogspot.com/
>>
>>
>>
>> On Oct 17, 2007, at 10:40 PM, Nicky Sandhu wrote:
>>
>>>
>>> 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.
>>>
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Deadlocks-again- 
> %3A%28-tf4643498s2354.html#a13275334
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>


Mime
View raw message