From issues-return-712-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Thu Aug 15 08:19:02 2019 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 01C6E180645 for ; Thu, 15 Aug 2019 10:19:01 +0200 (CEST) Received: (qmail 51110 invoked by uid 500); 15 Aug 2019 08:19:01 -0000 Mailing-List: contact issues-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list issues@zookeeper.apache.org Received: (qmail 51099 invoked by uid 99); 15 Aug 2019 08:19:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Aug 2019 08:19:01 +0000 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 48B88E2FA7 for ; Thu, 15 Aug 2019 08:19:00 +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 09F0927789 for ; Thu, 15 Aug 2019 08:19:00 +0000 (UTC) Date: Thu, 15 Aug 2019 08:19:00 +0000 (UTC) From: "Damien Diederen (JIRA)" To: issues@zookeeper.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (ZOOKEEPER-3510) Frequent 'zkServer.sh stop' failures when running C test suite MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Damien Diederen created ZOOKEEPER-3510: ------------------------------------------ Summary: Frequent 'zkServer.sh stop' failures when running C t= est suite Key: ZOOKEEPER-3510 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3510 Project: ZooKeeper Issue Type: Bug Reporter: Damien Diederen As mentioned in https://github.com/apache/zookeeper/pull/1054#discussion_r3= 14208678 : There is a {{sleep 3}} statement in {{zkServer.sh restart}}. I am unable t= o unearth the history of that particular line, but I believe part=E2=80=94i= f not all=E2=80=94of that {{sleep}} should be part of {{zkServer.sh stop}}. I frequently observe {{FAILED TO START}} errors in the C test suite; the lo= gs consistently show that those are caused by {{java.net.BindException: Add= ress already in use}}. Adding a simple {{sleep 1}} before {{echo STOPPED}}= "fixes" it for me. I will submit an initial PR with the corresponding cha= nge and a commit message akin to: ---- ZOOKEEPER-XXXX: Make zkServer.sh stop more reliable Kill is asynchronous, and without the sleep, the server's TCP port can stil= l be busy when the next server is started=E2=80=94causing flaky runs of the= C client's test suite. (It would probably be better to spin a few times, probing with ps -p.) ---- As noted above, the sleep is far from optimal, an adaptive mechanism would = be better=E2=80=94but I do not want to make the first iteration too complic= ated. -- This message was sent by Atlassian JIRA (v7.6.14#76016)