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 1BCE2200D0C for ; Wed, 6 Sep 2017 00:21:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1A19C160D85; Tue, 5 Sep 2017 22:21:06 +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 613C1160BCB for ; Wed, 6 Sep 2017 00:21:05 +0200 (CEST) Received: (qmail 87129 invoked by uid 500); 5 Sep 2017 22:21:04 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 87114 invoked by uid 99); 5 Sep 2017 22:21:04 -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; Tue, 05 Sep 2017 22:21:04 +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 CE4861832B5 for ; Tue, 5 Sep 2017 22:21:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.363 X-Spam-Level: X-Spam-Status: No, score=0.363 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id mf-q2OHJFYOB for ; Tue, 5 Sep 2017 22:20:59 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id BC52061260 for ; Tue, 5 Sep 2017 22:20:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id v85MKvPT032663; Tue, 5 Sep 2017 22:20:57 GMT Message-Id: <201709052220.v85MKvPT032663@ip-10-146-233-104.ec2.internal> Date: Tue, 5 Sep 2017 22:20:57 +0000 From: "Joe McDonnell (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Dan Hecht , Tim Armstrong , Sailesh Mukil Reply-To: joemcdonnell@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-5750=3A_Catch_exceptions_from_boost_thread_creation=0A?= X-Gerrit-Change-Id: I15a2f278dc71892b7fec09593f81b1a57ab725c0 X-Gerrit-ChangeURL: X-Gerrit-Commit: 5bdf3dfbff22e56572680568ee24dff748b3f33d In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.7 archived-at: Tue, 05 Sep 2017 22:21:06 -0000 Joe McDonnell has posted comments on this change. Change subject: IMPALA-5750: Catch exceptions from boost thread creation ...................................................................... Patch Set 8: (5 comments) http://gerrit.cloudera.org:8080/#/c/7730/8/be/src/runtime/query-state.cc File be/src/runtime/query-state.cc: Line 226: if (fis->IsPrepared()) { > should this check that the prepare status is ok? if Prepare() failed, then The first thing that Prepare() does is allocate the RuntimeState. It has a comment saying not to return before that. See https://github.com/apache/incubator-impala/blob/master/be/src/runtime/fragment-instance-state.cc#L119 We also check whether fis->profile() is null. So, I think this should be safe. When IMPALA-5892 goes in, I will just use fis==nullptr. That will make this part of the change unnecessary, as nothing needs to send status for an unprepared fragment instance. Line 328: ExecEnv::GetInstance()->query_exec_mgr()->ReleaseQueryState(this); > this is a little weird since ReleaseQueryState() can delete this. Except it Added a comment. PS8, Line 332: true > passing instances_started=true can lead to a deadlock if the RPC send fails Good point, changed this to instances_started=false. If the RPC to the coordinator fails, I think there are other ways to hang, but this is clearly wrong. I'll think about whether there is a better way to handle this case. PS8, Line 336: update fis_map_ > nit: seems excessive Done http://gerrit.cloudera.org:8080/#/c/7730/8/be/src/runtime/thread-resource-mgr.h File be/src/runtime/thread-resource-mgr.h: Line 288: if (!in_callback) InvokeCallbacks(); > As we discussed in person, I don't think it's safe even in that case genera I went with option #1. I added a comment with a warning to thread-resource-mgr.h and noted why we were using skip_callbacks in kudu-scan-node.cc and hdfs-scan-node.cc. -- To view, visit http://gerrit.cloudera.org:8080/7730 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I15a2f278dc71892b7fec09593f81b1a57ab725c0 Gerrit-PatchSet: 8 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Joe McDonnell Gerrit-Reviewer: Dan Hecht Gerrit-Reviewer: Joe McDonnell Gerrit-Reviewer: Sailesh Mukil Gerrit-Reviewer: Tim Armstrong Gerrit-HasComments: Yes