chukwa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Spishak (JIRA)" <>
Subject [jira] [Created] (CHUKWA-641) PatternSyntaxException Crash from Unvalidated Regular Expression Usage
Date Wed, 09 May 2012 00:45:50 GMT
Eric Spishak created CHUKWA-641:

             Summary: PatternSyntaxException Crash from Unvalidated Regular Expression Usage
                 Key: CHUKWA-641
             Project: Chukwa
          Issue Type: Bug
    Affects Versions: 0.5.0
            Reporter: Eric Spishak

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:

Exception in thread "main" java.util.regex.PatternSyntaxException:
Unclosed group near index 1
       at java.util.regex.Pattern.error(
       at java.util.regex.Pattern.accept(
       at java.util.regex.Pattern.group0(
       at java.util.regex.Pattern.sequence(
       at java.util.regex.Pattern.expr(
       at java.util.regex.Pattern.compile(
       at java.util.regex.Pattern.<init>(
       at java.util.regex.Pattern.compile(
       at org.apache.hadoop.chukwa.util.Filter.<init>(
       at org.apache.hadoop.chukwa.util.DumpChunks.dump(
       at org.apache.hadoop.chukwa.util.DumpChunks.main(

After applying the supplied patch the output is:

Error parsing "tags" regular expression: Unclosed group near index 1

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message