Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C89F2200D29 for ; Thu, 26 Oct 2017 20:48:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9C3A61609E8; Thu, 26 Oct 2017 18:48:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E23961609E5 for ; Thu, 26 Oct 2017 20:48:04 +0200 (CEST) Received: (qmail 10478 invoked by uid 500); 26 Oct 2017 18:48:04 -0000 Mailing-List: contact jira-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@kafka.apache.org Delivered-To: mailing list jira@kafka.apache.org Received: (qmail 10467 invoked by uid 99); 26 Oct 2017 18:48:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Oct 2017 18:48:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 3CCAA1A14A7 for ; Thu, 26 Oct 2017 18:48:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.001 X-Spam-Level: X-Spam-Status: No, score=-100.001 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id jhCwD1hcetAK for ; Thu, 26 Oct 2017 18:48:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id D54735FD97 for ; Thu, 26 Oct 2017 18:48:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 04E23E00C9 for ; Thu, 26 Oct 2017 18:48:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2F631212FB for ; Thu, 26 Oct 2017 18:48:00 +0000 (UTC) Date: Thu, 26 Oct 2017 18:48:00 +0000 (UTC) From: "Piotr Nowojski (JIRA)" To: jira@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-6132) KafkaProducer.initTransactions dead locks MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 26 Oct 2017 18:48:06 -0000 [ https://issues.apache.org/jira/browse/KAFKA-6132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16221003#comment-16221003 ] Piotr Nowojski commented on KAFKA-6132: --------------------------------------- Could you give me a hint how to access this RC from staging repository? > KafkaProducer.initTransactions dead locks > ----------------------------------------- > > Key: KAFKA-6132 > URL: https://issues.apache.org/jira/browse/KAFKA-6132 > Project: Kafka > Issue Type: Bug > Components: producer > Affects Versions: 0.11.0.0, 0.11.0.1 > Environment: Travis > Reporter: Piotr Nowojski > Priority: Critical > > I have found some intermittent failures on travis when using Kafka 0.11 transactions for writing. One of them is a apparent deadlock with the following stack trace: > {code:java} > "KafkaTestThread[19, false]" #166 prio=5 os_prio=0 tid=0x00007f4b64c29800 nid=0x1260 waiting on condition [0x00007f4b10fa4000] > java.lang.Thread.State: WAITING (parking) > at sun.misc.Unsafe.park(Native Method) > - parking to wait for <0x00000000947048a8> (a java.util.concurrent.CountDownLatch$Sync) > at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) > at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836) > at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997) > at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304) > at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231) > at org.apache.kafka.clients.producer.internals.TransactionalRequestResult.await(TransactionalRequestResult.java:50) > at org.apache.kafka.clients.producer.KafkaProducer.initTransactions(KafkaProducer.java:537) > {code} > I was unsuccessful to reproduce it locally, however I think I can semi reliably reproduce it on Travis. Scenario includes simultaneous sequence of instantiating new producers, calling {{KafkaProducer.initTransactions}}, closing them interleaved with writing. I have created a stripped down version of this scenario as a github project: > https://github.com/pnowojski/kafka-init-deadlock > The code for the test scenario is here: > https://github.com/pnowojski/kafka-init-deadlock/blob/master/src/test/java/pl/nowojski/KafkaInitDeadLockTest.java > I have defined 30 build profiles that run this test and in case of detecting a dead lock (5 minutes period of inactivity), stack trace of all threads is being printed out. Example travis run: > https://travis-ci.org/pnowojski/kafka-init-deadlock/builds/293256284 > as you can see deadlock occurred in 7 out of 30 builds. It seems like in this scenario all of them are failing/dead locking in exactly same way. > I have observed this issue both on 0.11.0.0 and 0.11.0.1 -- This message was sent by Atlassian JIRA (v6.4.14#64029)