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 9F195200BC2 for ; Thu, 17 Nov 2016 16:31:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9E43A160AD8; Thu, 17 Nov 2016 15:31:00 +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 E7103160B0B for ; Thu, 17 Nov 2016 16:30:59 +0100 (CET) Received: (qmail 35622 invoked by uid 500); 17 Nov 2016 15:30:59 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 35478 invoked by uid 99); 17 Nov 2016 15:30:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Nov 2016 15:30:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id AFE262C0088 for ; Thu, 17 Nov 2016 15:30:58 +0000 (UTC) Date: Thu, 17 Nov 2016 15:30:58 +0000 (UTC) From: "John Zhuge (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-13824) FsShell can suppress the real error if no error message is present MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 17 Nov 2016 15:31:00 -0000 [ https://issues.apache.org/jira/browse/HADOOP-13824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15673990#comment-15673990 ] John Zhuge commented on HADOOP-13824: ------------------------------------- Hi [~rvesse], thanks a lot for reporting the issue. It will make hadoop much more usable and supportable to fix a issue like this. Could you please provide the command line for your test? > FsShell can suppress the real error if no error message is present > ------------------------------------------------------------------ > > Key: HADOOP-13824 > URL: https://issues.apache.org/jira/browse/HADOOP-13824 > Project: Hadoop Common > Issue Type: Bug > Components: fs > Affects Versions: 2.7.1, 2.7.3 > Reporter: Rob Vesse > > The {{FsShell}} error handling assumes in {{displayError()}} that the {{message}} argument is not {{null}}. However in the case where it is this leads to a NPE which results in suppressing the actual error information since a higher level of error handling kicks in and just dumps the stack trace of the NPE instead. > e.g. > {noformat} > Exception in thread "main" java.lang.NullPointerException > at org.apache.hadoop.fs.FsShell.displayError(FsShell.java:304) > at org.apache.hadoop.fs.FsShell.run(FsShell.java:289) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84) > at org.apache.hadoop.fs.FsShell.main(FsShell.java:340) > {noformat} > This is deeply unhelpful because depending on what the underlying error was there may be no stack dumped/logged for it (as HADOOP-7114 provides) since {{FsShell}} doesn't explicitly dump traces for {{IllegalArgumentException}} which appears to be the underlying cause of my issue. Line 289 is where {{displayError()}} is called for {{IllegalArgumentException}} handling and that catch clause does not log the error. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-issues-help@hadoop.apache.org