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 CCCF8200B85 for ; Thu, 1 Sep 2016 06:53:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B3BE4160AB4; Thu, 1 Sep 2016 04:53:08 +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 060F7160AB5 for ; Thu, 1 Sep 2016 06:53:07 +0200 (CEST) Received: (qmail 24705 invoked by uid 500); 1 Sep 2016 04:53:06 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 24683 invoked by uid 99); 1 Sep 2016 04:53:06 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2016 04:53:06 +0000 Received: from mail-lf0-f49.google.com (mail-lf0-f49.google.com [209.85.215.49]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 00F641A0436; Thu, 1 Sep 2016 04:53:05 +0000 (UTC) Received: by mail-lf0-f49.google.com with SMTP id b199so51859442lfe.0; Wed, 31 Aug 2016 21:53:05 -0700 (PDT) X-Gm-Message-State: AE9vXwPI7wS8RIpV1b6NXN6cfNZkW+ob/Zj1VUFNnj2KxEVmydzJjfY3Dif6TbLe0FjpIVNXW52xy6gI3PnFsw== X-Received: by 10.46.0.134 with SMTP id e6mr4399121lji.40.1472705584232; Wed, 31 Aug 2016 21:53:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.159.3 with HTTP; Wed, 31 Aug 2016 21:52:23 -0700 (PDT) In-Reply-To: <1717792521.2377662.1472602547300@mail.yahoo.com> References: <1717792521.2377662.1472602547300.ref@mail.yahoo.com> <1717792521.2377662.1472602547300@mail.yahoo.com> From: Patrick Hunt Date: Wed, 31 Aug 2016 21:52:23 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Issue with NettyServerCnxn.java To: DevZooKeeper , yuliya Feldman , Benjamin Reed Cc: "user@zookeeper.apache.org" Content-Type: multipart/alternative; boundary=001a1142b58c3504fd053b6afdd3 archived-at: Thu, 01 Sep 2016 04:53:09 -0000 --001a1142b58c3504fd053b6afdd3 Content-Type: text/plain; charset=UTF-8 Hi Yuliya - my read is that sendResponse in NIOServerCnxn is logging, then dropping, any Exceptions encountered during sendResponse. In other words it's doing best effort response. Not sure if that is "correct", but that's what it's currently doing in NIO. Surprisingly it's also hiding any IOExceptions, which is part of the method signature as defined by ServerCnxn. Some of the calling code is trying to handle IOException in some cases which is odd... I suspect it was an oversight in ZOOKEEPER-597, but I'm not sure. Ben any insight? Patrick On Tue, Aug 30, 2016 at 5:15 PM, yuliya Feldman wrote: > Hello there, > We have been extensively testing Netty connection versus NIIO and there > are some issues that show up I wanted to get community response on. > In the process of testing https://issues.apache. > org/jira/browse/ZOOKEEPER-2509 fix we identified that sendResponse() > method may try to do some operations after close() was invoked - as > channel.close() in Netty is asynch. and subsequently lead to some NPE. > NPE itself is not a good thing but the problems aggravates with the fact > that propagation of NPE will lead to main processing thread exiting and at > that point ZK server becomes unresponsive - since no requests will be > processed anymore. > In NIOServerCnxn.java in sendResponse() it is catching Exception and just > logs a warning which was added as part of https://issues.apache.org/ > jira/browse/ZOOKEEPER-597 > I am trying to understand what a behavior should be in case of any > exception in sendResponse. > Any insight would be highly appreciated > Thanks,Yuliya > > --001a1142b58c3504fd053b6afdd3--