Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AE28A103E5 for ; Fri, 13 Dec 2013 13:17:16 +0000 (UTC) Received: (qmail 61574 invoked by uid 500); 13 Dec 2013 13:17:12 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 61501 invoked by uid 500); 13 Dec 2013 13:17:11 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 61396 invoked by uid 99); 13 Dec 2013 13:17:09 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Dec 2013 13:17:09 +0000 Date: Fri, 13 Dec 2013 13:17:09 +0000 (UTC) From: "Gary Tully (JIRA)" To: dev@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMQ-4935) Deadlock caused by Re-entrant lock with no locking thread MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-4935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13847467#comment-13847467 ] Gary Tully commented on AMQ-4935: --------------------------------- It may be worth building a simple test case that you can share. > Deadlock caused by Re-entrant lock with no locking thread > --------------------------------------------------------- > > Key: AMQ-4935 > URL: https://issues.apache.org/jira/browse/AMQ-4935 > Project: ActiveMQ > Issue Type: Bug > Components: Broker > Affects Versions: 5.9.0 > Environment: Oracle JRE 1.7.0 update 45 > Reporter: Michael Yara > > We have a distributed application that uses ActiveMQ for communication between nodes. We are currently using ActiveMQ 5.9.0 running with Oracle JRE 1.7.0 update 45. > We are seeing some strange deadlock behavior in the ActiveMQ ThreadPoolExecutor when trying to serialize instances of ConcurrentHashMap. The thread dump can be seen at the following link: > http://pastebin.com/wmNxSF4p > We can see that there are two threads that are blocked waiting for a lock on some of the segments in a ConcurrentHashMap yet the thread dump does not indicate any threads that currently hold a lock on those objects. This lock does not occur all the time and can take around 5-10 messages before the deadlock occurs. I have been able to recreate this issue on two different physical machines. > Our test environment that generated this thread dump is as follows. Node A is the instance that thread dump was taken from. For testing both nodes are on the same physical machine. > Node A: > * In its own JVM instance. > * Runs an embedded ActiveMQ broker. > * Performs communication via vm transport and sends ObjectMessages via a TopicConnection. > * Has copyMessageOnSend=false > * Has ObjectMessageSerializationDefered=true > Node B: > * In its own JVM instance. > * Connects to Node A's broker via tcp transport. > * Sends BytesMessages serialized with Kryo and sent via a TopicConnection. > * Has copyMessageOnSend=false > * Has ObjectMessageSerializationDefered=false > Both nodes are set up to detect the type of incoming messages and deserialize them appropriately with kryo if it receives a BytesMessage or default serialization if it receives an ObjectMessage (handled by ActiveMQ). > The only thing I have found resembling this issue is the following link. I am no sure if it is related to this exact problem or not. > http://appcrawler.com/wordpress/2013/05/06/one-way-to-tell-if-a-thread-pool-is-hung/ -- This message was sent by Atlassian JIRA (v6.1.4#6159)