Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-1691

StackOverflowError in TimestampedMessageParser.parseNextLine()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.0
    • Component/s: None
    • Labels:
      None

      Description

      Below function will throws StackOverflowError if no matching line is found for a few consecutive lines.

      This will be a common scenario in HA where bundle/coord/WF got executed in other host. For log aggregation we have to search logs in all host and may lead to StackOverflowError.

      protected String parseNextLine() throws IOException {
              String line = reader.readLine();
              if (line != null) {
                  ArrayList<String> logParts = filter.splitLogMessage(line);
                  if (logParts != null) {
                      patternMatched = filter.matches(logParts);
                  }
                  if (!patternMatched) {
                      line = parseNextLine();
                  }
              }
              return line;
          }
      

      Exception
      Caused by: java.lang.StackOverflowError
      at java.util.regex.Pattern$GroupTail.match(Pattern.java:4615)
      at java.util.regex.Pattern$Curly.match0(Pattern.java:4170)
      ...........................................
      at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3715)
      at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3715)
      at java.util.regex.Pattern$GroupHead.match(Pattern.java:4556)
      at java.util.regex.Matcher.match(Matcher.java:1221)
      at java.util.regex.Matcher.matches(Matcher.java:559)
      at org.apache.oozie.util.XLogStreamer$Filter.splitLogMessage(XLogStreamer.java:138)
      at org.apache.oozie.util.TimestampedMessageParser.parseNextLine(TimestampedMessageParser.java:138)
      at org.apache.oozie.util.TimestampedMessageParser.parseNextLine(TimestampedMessageParser.java:143)
      at org.apache.oozie.util.TimestampedMessageParser.parseNextLine(TimestampedMessageParser.java:143)
      at org.apache.oozie.util.TimestampedMessageParser.parseNextLine(TimestampedMessageParser.java:143)

        Attachments

        1. OOZIE-1691.patch
          3 kB
          Purshotam Shah
        2. OOZIE-1691.patch
          3 kB
          Purshotam Shah

          Activity

            People

            • Assignee:
              puru Purshotam Shah
              Reporter:
              puru Purshotam Shah
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: