Return-Path: X-Original-To: apmail-incubator-chukwa-dev-archive@www.apache.org Delivered-To: apmail-incubator-chukwa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 95620C1ED for ; Thu, 10 May 2012 04:27:28 +0000 (UTC) Received: (qmail 31329 invoked by uid 500); 10 May 2012 04:27:25 -0000 Delivered-To: apmail-incubator-chukwa-dev-archive@incubator.apache.org Received: (qmail 31280 invoked by uid 500); 10 May 2012 04:27:24 -0000 Mailing-List: contact chukwa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: chukwa-dev@incubator.apache.org Delivered-To: mailing list chukwa-dev@incubator.apache.org Received: (qmail 31253 invoked by uid 99); 10 May 2012 04:27:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 May 2012 04:27:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 May 2012 04:27:22 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 16BE048F7EC for ; Thu, 10 May 2012 04:27:02 +0000 (UTC) Date: Thu, 10 May 2012 04:27:01 +0000 (UTC) From: "Eric Yang (JIRA)" To: chukwa-dev@incubator.apache.org Message-ID: <927455467.47921.1336624022198.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <787618217.41849.1336524350622.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (CHUKWA-641) PatternSyntaxException Crash from Unvalidated Regular Expression Usage MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CHUKWA-641?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eric Yang updated CHUKWA-641: ----------------------------- Resolution: Fixed Status: Resolved (was: Patch Available) +1 Thanks Eric, I just committed this. > PatternSyntaxException Crash from Unvalidated Regular Expression Usage > ---------------------------------------------------------------------- > > Key: CHUKWA-641 > URL: https://issues.apache.org/jira/browse/CHUKWA-641 > Project: Chukwa > Issue Type: Bug > Affects Versions: 0.5.0 > Reporter: Eric Spishak > Assignee: Eric Spishak > Attachments: CHUKWA-641.patch > > > Chukwa sometimes crashes with an unhelpful stack trace. In particular, a PatternSyntaxException is thrown when an invalid regular expression is passed to the dumpChunk command. This exception isn't useful to users to diagnose the error. I think it would be better to report a detailed error message. The attached patch makes this change. > Steps to reproduce: > # Run 'bin/chukwa dumpChunk "tags.=(" file' > # dumpChunk command fails to start > # See exception: > {code} > Exception in thread "main" java.util.regex.PatternSyntaxException: > Unclosed group near index 1 > ( > ^ > at java.util.regex.Pattern.error(Pattern.java:1713) > at java.util.regex.Pattern.accept(Pattern.java:1571) > at java.util.regex.Pattern.group0(Pattern.java:2533) > at java.util.regex.Pattern.sequence(Pattern.java:1806) > at java.util.regex.Pattern.expr(Pattern.java:1752) > at java.util.regex.Pattern.compile(Pattern.java:1460) > at java.util.regex.Pattern.(Pattern.java:1133) > at java.util.regex.Pattern.compile(Pattern.java:847) > at org.apache.hadoop.chukwa.util.Filter.(Filter.java:94) > at org.apache.hadoop.chukwa.util.DumpChunks.dump(DumpChunks.java:88) > at org.apache.hadoop.chukwa.util.DumpChunks.main(DumpChunks.java:53) > {code} > After applying the supplied patch the output is: > {code} > Error parsing "tags" regular expression: Unclosed group near index 1 > ( > ^ > {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