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 2D269196E8 for ; Mon, 7 Mar 2016 14:43:20 +0000 (UTC) Received: (qmail 74350 invoked by uid 500); 7 Mar 2016 14:43:20 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 74294 invoked by uid 500); 7 Mar 2016 14:43:19 -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 Delivered-To: moderator for dev@activemq.apache.org Received: (qmail 13520 invoked by uid 99); 7 Mar 2016 14:16:51 -0000 X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.286 X-Spam-Level: ** X-Spam-Status: No, score=2.286 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972, URI_HEX=1.313, URI_TRY_3LD=0.001] autolearn=disabled Date: Mon, 7 Mar 2016 05:49:08 -0800 (PST) From: "yang.yang.zz" To: dev@activemq.apache.org Message-ID: <1457358548323-4708972.post@n4.nabble.com> In-Reply-To: <1457276500095-4708953.post@n4.nabble.com> References: <1457276500095-4708953.post@n4.nabble.com> Subject: Re: ActiveMQ duplex network connector dead lock [5.13.1, 5.11.1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I tried the 3 patches matteo rulli provided in AMQ5260. It seems reduced the chance of running into deadlock but it does not completely eliminate it. I can still see FutureResponse.getResult being waiting forever. Therefore I added another patch to make getResult can timeout after 30 secs and throw Exception. With these 4 patches, it passed our network failure test. All the connections are fully recovered after the network failure. It takes 25-30 mins though, but it's much better than being blocked forever. Name: ActiveMQ Transport: tcp:///10.130.156.205:46138@61616 State: WAITING on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@482aaa1a Total blocked: 5 Total waited: 6 Stack trace: sun.misc.Unsafe.park(Native Method) java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:403) org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40) org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:87) org.apache.activemq.network.DemandForwardingBridgeSupport.addSubscription(DemandForwardingBridgeSupport.java:911) org.apache.activemq.network.DemandForwardingBridgeSupport.addConsumerInfo(DemandForwardingBridgeSupport.java:1184) org.apache.activemq.network.DemandForwardingBridgeSupport.serviceRemoteConsumerAdvisory(DemandForwardingBridgeSup -- View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-duplex-network-connector-dead-lock-5-13-1-5-11-1-tp4708953p4708972.html Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.