From commits-return-10037-archive-asf-public=cust-asf.ponee.io@kafka.apache.org Fri Jul 20 20:14:55 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 13314180663 for ; Fri, 20 Jul 2018 20:14:54 +0200 (CEST) Received: (qmail 32516 invoked by uid 500); 20 Jul 2018 18:14:54 -0000 Mailing-List: contact commits-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list commits@kafka.apache.org Received: (qmail 32506 invoked by uid 99); 20 Jul 2018 18:14:54 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jul 2018 18:14:54 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 8C4C98211D; Fri, 20 Jul 2018 18:14:53 +0000 (UTC) Date: Fri, 20 Jul 2018 18:14:53 +0000 To: "commits@kafka.apache.org" Subject: [kafka] branch 1.1 updated: MINOR: Add thread dumps if broker node cannot be stopped (#5373) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <153211049254.14614.1984151951110309753@gitbox.apache.org> From: jgus@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: kafka X-Git-Refname: refs/heads/1.1 X-Git-Reftype: branch X-Git-Oldrev: 776ff95ae0f8cdd01aede21b95238738ff1db1b3 X-Git-Newrev: 62d24d90f4fd4254eaf53a236f17818a1d23c7b9 X-Git-Rev: 62d24d90f4fd4254eaf53a236f17818a1d23c7b9 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. jgus pushed a commit to branch 1.1 in repository https://gitbox.apache.org/repos/asf/kafka.git The following commit(s) were added to refs/heads/1.1 by this push: new 62d24d9 MINOR: Add thread dumps if broker node cannot be stopped (#5373) 62d24d9 is described below commit 62d24d90f4fd4254eaf53a236f17818a1d23c7b9 Author: Arjun Satish AuthorDate: Fri Jul 20 11:10:43 2018 -0700 MINOR: Add thread dumps if broker node cannot be stopped (#5373) In system tests, it is useful to have the thread dumps if a broker cannot be stopped using SIGTERM. Reviewers: Xavier Léauté , Ismael Juma , Jason Gustafson --- tests/kafkatest/services/kafka/kafka.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/kafkatest/services/kafka/kafka.py b/tests/kafkatest/services/kafka/kafka.py index 22674b9..2eccf5b 100644 --- a/tests/kafkatest/services/kafka/kafka.py +++ b/tests/kafkatest/services/kafka/kafka.py @@ -286,7 +286,19 @@ class KafkaService(KafkaPathResolverMixin, JmxMixin, Service): for pid in pids: node.account.signal(pid, sig, allow_fail=False) - wait_until(lambda: len(self.pids(node)) == 0, timeout_sec=60, err_msg="Kafka node failed to stop") + + try: + wait_until(lambda: len(self.pids(node)) == 0, timeout_sec=60, err_msg="Kafka node failed to stop") + except Exception: + self.thread_dump(node) + raise + + def thread_dump(self, node): + for pid in self.pids(node): + try: + node.account.signal(pid, signal.SIGQUIT, allow_fail=True) + except: + self.logger.warn("Could not dump threads on node") def clean_node(self, node): JmxMixin.clean_node(self, node)