Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2A36217CF4 for ; Fri, 6 Feb 2015 11:36:53 +0000 (UTC) Received: (qmail 41424 invoked by uid 500); 6 Feb 2015 11:36:52 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 41382 invoked by uid 500); 6 Feb 2015 11:36:52 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 41370 invoked by uid 99); 6 Feb 2015 11:36:52 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Feb 2015 11:36:52 +0000 Date: Fri, 6 Feb 2015 11:36:52 +0000 (UTC) From: "Hudson (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-11526) Memory leak in Bzip2Compressor and Bzip2Decompressor MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-11526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14309022#comment-14309022 ] Hudson commented on HADOOP-11526: --------------------------------- FAILURE: Integrated in Hadoop-Yarn-trunk #830 (See [https://builds.apache.org/job/Hadoop-Yarn-trunk/830/]) HADOOP-11526. Memory leak in Bzip2Compressor and Bzip2Decompressor. Contributed by Anu Engineer. (cnauroth: rev 6583ad148be5447eb2f086a2c6c7006631dff4da) * hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/bzip2/Bzip2Compressor.c * hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/bzip2/Bzip2Decompressor.c * hadoop-common-project/hadoop-common/CHANGES.txt > Memory leak in Bzip2Compressor and Bzip2Decompressor > ---------------------------------------------------- > > Key: HADOOP-11526 > URL: https://issues.apache.org/jira/browse/HADOOP-11526 > Project: Hadoop Common > Issue Type: Bug > Components: io, native > Affects Versions: 2.6.0 > Reporter: Ian Rogers > Assignee: Anu Engineer > Fix For: 2.7.0 > > Attachments: HADOOP-11526.001.patch, HADOOP-11526.002.patch > > > The use of JNI's GetStringUTFChars should be paired with ReleaseStringUTFChars or else the utf-8 char* created by Java's JNI implementation is leaked. It isn't in Bzip2Decompressor.c: > https://apache.googlesource.com/hadoop-common/+/refs/heads/trunk/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/bzip2/Bzip2Decompressor.c#45 > A less error-prone way of handling JNI resources like local references and UTF strings is to use a smart pointer like the Apache licensed code in Android's ScopedLocalRef and ScopedUtfChars: > https://android.googlesource.com/platform/libnativehelper/+/jb-mr1.1-dev-plus-aosp/include/nativehelper/ScopedLocalRef.h > https://android.googlesource.com/platform/libnativehelper/+/jb-mr1.1-dev-plus-aosp/include/nativehelper/ScopedUtfChars.h -- This message was sent by Atlassian JIRA (v6.3.4#6332)