Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-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 5AD55D7C9 for ; Tue, 31 Jul 2012 23:24:35 +0000 (UTC) Received: (qmail 6678 invoked by uid 500); 31 Jul 2012 23:24:35 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 6648 invoked by uid 500); 31 Jul 2012 23:24:35 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 6639 invoked by uid 99); 31 Jul 2012 23:24:35 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Jul 2012 23:24:35 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id C0D3814285A for ; Tue, 31 Jul 2012 23:24:34 +0000 (UTC) Date: Tue, 31 Jul 2012 23:24:34 +0000 (UTC) From: "Colin Patrick McCabe (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <1446983465.124346.1343777074791.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1392207568.69303.1340921384485.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (HDFS-3579) libhdfs: fix exception handling 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/HDFS-3579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13426214#comment-13426214 ] Colin Patrick McCabe commented on HDFS-3579: -------------------------------------------- Thanks for the review, Andy. I'm looking forward to the next comment. bq. [O_WRONLY discussion] I held off on the O_WRONLY fixes, since we have HDFS-3710 open for that. What I've done here is just move the code, not add any new (mis)uses. bq. [linker script discussion] Yeah, HDFS-3742 is open for this. I tried to fix as much whitespace as I could; I'm sure there's still funky stuff lingering somewhere. We can always circle back on that later, though-- as long as this patch moves things in the right direction. > libhdfs: fix exception handling > ------------------------------- > > Key: HDFS-3579 > URL: https://issues.apache.org/jira/browse/HDFS-3579 > Project: Hadoop HDFS > Issue Type: Bug > Components: libhdfs > Affects Versions: 2.0.1-alpha > Reporter: Colin Patrick McCabe > Assignee: Colin Patrick McCabe > Attachments: HDFS-3579.004.patch, HDFS-3579.005.patch, HDFS-3579.006.patch > > > libhdfs does not consistently handle exceptions. Sometimes we don't free the memory associated with them (memory leak). Sometimes we invoke JNI functions that are not supposed to be invoked when an exception is active. > Running a libhdfs test program with -Xcheck:jni shows the latter problem clearly: > {code} > WARNING in native method: JNI call made with exception pending > WARNING in native method: JNI call made with exception pending > WARNING in native method: JNI call made with exception pending > WARNING in native method: JNI call made with exception pending > WARNING in native method: JNI call made with exception pending > Exception in thread "main" java.io.IOException: ... > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira