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 45D5F200C56 for ; Fri, 14 Apr 2017 22:58:45 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 447A2160B8C; Fri, 14 Apr 2017 20:58:45 +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 8C676160B8A for ; Fri, 14 Apr 2017 22:58:44 +0200 (CEST) Received: (qmail 69049 invoked by uid 500); 14 Apr 2017 20:58:43 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 69040 invoked by uid 99); 14 Apr 2017 20:58:43 -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; Fri, 14 Apr 2017 20:58:43 +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 3EBDED0AB2 for ; Fri, 14 Apr 2017 20:58:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-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 dxnB5Zai10Qm for ; Fri, 14 Apr 2017 20:58:42 +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 4C0F85FBB8 for ; Fri, 14 Apr 2017 20:58:42 +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 DBDE1E0026 for ; Fri, 14 Apr 2017 20:58:41 +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 9811720D54 for ; Fri, 14 Apr 2017 20:58:41 +0000 (UTC) Date: Fri, 14 Apr 2017 20:58:41 +0000 (UTC) From: "Aihua Xu (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-16455) ADD JAR command leaks JAR Files MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 14 Apr 2017 20:58:45 -0000 [ https://issues.apache.org/jira/browse/HIVE-16455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aihua Xu updated HIVE-16455: ---------------------------- Attachment: HIVE-16455.1.patch patch-1: we need to explicitly remove jars from the classpath of the classloader. Looks like closing the classLoader is not necessarily releasing the references to the jar. > ADD JAR command leaks JAR Files > ------------------------------- > > Key: HIVE-16455 > URL: https://issues.apache.org/jira/browse/HIVE-16455 > Project: Hive > Issue Type: Bug > Components: HiveServer2 > Reporter: Aihua Xu > Assignee: Aihua Xu > Attachments: HIVE-16455.1.patch > > > HiveServer2 is leaking file handles when using ADD JAR statement and the JAR file added is not used in the query itself. > {noformat} > beeline> !connect jdbc:hive2://localhost:10000 admin > 0: jdbc:hive2://localhost:10000> create table test_leak (a int); > 0: jdbc:hive2://localhost:10000> insert into test_leak Values (1); > -- Exit beeline terminal; Find PID of HiveServer2 > [root@host-10-17-80-111 ~]# lsof -p 29588 | grep "(deleted)" | wc -l > 0 > [root@host-10-17-80-111 ~]# beeline -u jdbc:hive2://localhost:10000/default -n admin > And run the command "ADD JAR hdfs:///tmp/hive-contrib.jar; select * from test_leak" > [root@host-10-17-80-111 ~]# lsof -p 29588 | grep "(deleted)" | wc -l > 1 > java 29588 hive 391u REG 252,3 125987 2099944 /tmp/57d98f5b-1e53-44e2-876b-6b4323ac24db_resources/hive-contrib.jar (deleted) > java 29588 hive 392u REG 252,3 125987 2099946 /tmp/eb3184ad-7f15-4a77-a10d-87717ae634d1_resources/hive-contrib.jar (deleted) > java 29588 hive 393r REG 252,3 125987 2099825 /tmp/e29dccfc-5708-4254-addb-7a8988fc0500_resources/hive-contrib.jar (deleted) > java 29588 hive 394r REG 252,3 125987 2099833 /tmp/5153dd4a-a606-4f53-b02c-d606e7e56985_resources/hive-contrib.jar (deleted) > java 29588 hive 395r REG 252,3 125987 2099827 /tmp/ff3cdb05-917f-43c0-830a-b293bf397a23_resources/hive-contrib.jar (deleted) > java 29588 hive 396r REG 252,3 125987 2099822 /tmp/60531b66-5985-421e-8eb5-eeac31fdf964_resources/hive-contrib.jar (deleted) > java 29588 hive 397r REG 252,3 125987 2099831 /tmp/78878921-455c-438c-9735-447566ed8381_resources/hive-contrib.jar (deleted) > java 29588 hive 399r REG 252,3 125987 2099835 /tmp/0e5d7990-30cc-4248-9058-587f7f1ff211_resources/hive-contrib.jar (deleted) > {noformat} > You can see the the session directory (and therefore anything in it) is set to delete only on exit. -- This message was sent by Atlassian JIRA (v6.3.15#6346)