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 11A69200D2B for ; Thu, 19 Oct 2017 01:48:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 10427160BEA; Wed, 18 Oct 2017 23:48: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 25885160BEE for ; Thu, 19 Oct 2017 01:48:06 +0200 (CEST) Received: (qmail 13263 invoked by uid 500); 18 Oct 2017 23:48:06 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 13253 invoked by uid 99); 18 Oct 2017 23:48:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Oct 2017 23:48:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 70282C4F4A for ; Wed, 18 Oct 2017 23:48:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.001 X-Spam-Level: X-Spam-Status: No, score=-100.001 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id vzUFVFCPwITH for ; Wed, 18 Oct 2017 23:48:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 43D0561162 for ; Wed, 18 Oct 2017 23:48:03 +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 305E6E2647 for ; Wed, 18 Oct 2017 23:48:02 +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 BFBE921EE8 for ; Wed, 18 Oct 2017 23:48:01 +0000 (UTC) Date: Wed, 18 Oct 2017 23:48:01 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-5874) NPE in AnonWebUserConnection.cleanupSession() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 18 Oct 2017 23:48:08 -0000 [ https://issues.apache.org/jira/browse/DRILL-5874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16210330#comment-16210330 ] ASF GitHub Bot commented on DRILL-5874: --------------------------------------- Github user sohami commented on a diff in the pull request: https://github.com/apache/drill/pull/993#discussion_r145565944 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/DrillRestServer.java --- @@ -204,9 +217,15 @@ public WebUserConnection provide() { config.getLong(ExecConstants.HTTP_SESSION_MEMORY_RESERVATION), config.getLong(ExecConstants.HTTP_SESSION_MEMORY_MAXIMUM)); + // Create a dummy close future which is needed by Foreman only. Foreman uses this future to add a close + // listener to known about channel close event from underlying layer. We use this future to notify Foreman + // listeners when the Web connection between Web Client and WebServer is closed. This will help Foreman to cancel + // all the running queries for this Web Client. + final ChannelPromise closeFuture = new DefaultChannelPromise(null, executor); + // Create a WebSessionResource instance which owns the lifecycle of all the session resources. - // Set this instance as an attribute of HttpSession, since it will be used until session is destroyed. - webSessionResources = new WebSessionResources(sessionAllocator, remoteAddress, drillUserSession); + // Set this instance as an attribute of HttpSession, since it will be used until session is destroyed + webSessionResources = new WebSessionResources(sessionAllocator, remoteAddress, drillUserSession, closeFuture); --- End diff -- Will fix the comment. Sorry for confusion. > NPE in AnonWebUserConnection.cleanupSession() > --------------------------------------------- > > Key: DRILL-5874 > URL: https://issues.apache.org/jira/browse/DRILL-5874 > Project: Apache Drill > Issue Type: Bug > Affects Versions: 1.12.0 > Reporter: Paul Rogers > Assignee: Sorabh Hamirwasia > Fix For: 1.12.0 > > > When debugging another issue, I tried to use the Web UI to run the example query: > {code} > SELECT * FROM cp.`employee.json` LIMIT 20 > {code} > The query failed with this error: > {noformat} > Query Failed: An Error Occurred > java.lang.NullPointerException > {noformat} > No stack trace was provided in the log, even at DEBUG level. > Debugging, the problem appears to be deep inside {{AnonWebUserConnection.cleanupSession()}}: > {code} > package io.netty.channel; > public class DefaultChannelPromise ... > protected EventExecutor executor() { > EventExecutor e = super.executor(); > if (e == null) { > return channel().eventLoop(); > } else { > return e; > } > } > {code} > In the above, {{channel()}} is null. the {{channel}} field is also null. > This may indicate that some part of the Web UI was not set up correctly. This is a recent change, as this code worked several days ago. -- This message was sent by Atlassian JIRA (v6.4.14#64029)