From dev-return-71377-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Thu Jul 12 21:11:06 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 543B4180654 for ; Thu, 12 Jul 2018 21:11:06 +0200 (CEST) Received: (qmail 77405 invoked by uid 500); 12 Jul 2018 19:11:04 -0000 Mailing-List: contact dev-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 dev@zookeeper.apache.org Received: (qmail 77393 invoked by uid 99); 12 Jul 2018 19:11:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jul 2018 19:11:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 08BFC1805D3 for ; Thu, 12 Jul 2018 19:11:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id MXMlrvOotD6k for ; Thu, 12 Jul 2018 19:11:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 241945F430 for ; Thu, 12 Jul 2018 19:11:02 +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 0BE63E20C5 for ; Thu, 12 Jul 2018 19:11: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 3B9EE23F9F for ; Thu, 12 Jul 2018 19:11:00 +0000 (UTC) Date: Thu, 12 Jul 2018 19:11:00 +0000 (UTC) From: "Ruslan Nigmatullin (JIRA)" To: dev@zookeeper.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (ZOOKEEPER-3086) [server] Lack of write timeouts causes quorum to stuck MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Ruslan Nigmatullin created ZOOKEEPER-3086: --------------------------------------------- Summary: [server] Lack of write timeouts causes quorum to stuc= k Key: ZOOKEEPER-3086 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3086 Project: ZooKeeper Issue Type: Bug Components: quorum Affects Versions: 3.4.12, 3.5.4 Environment: Linux 4.13.0-32-generic, Java HotSpot(TM) 64-Bit Serv= er VM (build 25.121-b13, mixed mode) Reporter: Ruslan Nigmatullin Attachments: zookeeper-threads.txt Network outage on leader host can cause `QuorumPeer` thread to stuck for pr= olonged period of time (2+ hours, depends on tcp keep alive settings). It e= ffectively stalls the whole zookeeper server making it inoperable. We've fo= und it during one of our internal DRTs (Disaster Recovery Test). The scenario which triggers the behavior (requires relatively high ping-loa= d to the follower): # `Follower.processPacket` processes `Leader.PING` message # Leader is network partitioned # `Learner.ping` makes attempt to write to the leader socket # If write socket buffer is full (due to other ping/sync calls) `Learner.p= ing` blocks # As leader is partitioned - `Learner.ping` blocks forever due to lack of = write timeout # `QuorumPeer` is the only thread reading from the leader socket, effectiv= ely meaning that the whole server is stuck and can't recover without manual= process restart. =C2=A0 Thread dump from the affected server is in attachments. -- This message was sent by Atlassian JIRA (v7.6.3#76005)