Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-22607

Set large stack size consistently for tests to avoid StackOverflowError

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.2, 2.3.0
    • Component/s: Build, Tests
    • Labels:
      None
    • Target Version/s:

      Description

      I was seeing this error while testing the 2.2.1 RC:

      OrderingSuite:
      ...
      - GenerateOrdering with ShortType
      *** RUN ABORTED ***
      java.lang.StackOverflowError: 
      at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java:370) 
      at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java:541) 
      at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java:541) 
      at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java:541) 
      at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java:541) 
      at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java:541) 
      at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java:541) 
      at org.codehaus.janino.CodeContext.flowAnalysis(CodeContext.java:541)
      ...
      

      This doesn't seem to happen on Jenkins, for whatever reason. It seems like we set JVM flags for tests inconsistently, and in particular, only set a 4MB stack size for surefire, not scalatest-maven-plugin. Adding -Xss4m made the test pass for me.

      We can also make sure that all of these pass -ea consistently.

        Attachments

          Activity

            People

            • Assignee:
              srowen Sean R. Owen
              Reporter:
              srowen Sean R. Owen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: