Skip to content

Commit fba63c1

Browse files
committed
[SPARK-22607][BUILD] Set large stack size consistently for tests to avoid StackOverflowError
## What changes were proposed in this pull request? Set `-ea` and `-Xss4m` consistently for tests, to fix in particular: ``` 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) ... ``` ## How was this patch tested? Existing tests. Manually verified it resolves the StackOverflowError this intends to resolve. Author: Sean Owen <[email protected]> Closes #19820 from srowen/SPARK-22607.
1 parent 4d8ace4 commit fba63c1

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2101,7 +2101,7 @@
21012101
<include>**/*Suite.java</include>
21022102
</includes>
21032103
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
2104-
<argLine>-Xmx3g -Xss4096k -XX:ReservedCodeCacheSize=${CodeCacheSize}</argLine>
2104+
<argLine>-ea -Xmx3g -Xss4m -XX:ReservedCodeCacheSize=${CodeCacheSize}</argLine>
21052105
<environmentVariables>
21062106
<!--
21072107
Setting SPARK_DIST_CLASSPATH is a simple way to make sure any child processes
@@ -2150,7 +2150,7 @@
21502150
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
21512151
<junitxml>.</junitxml>
21522152
<filereports>SparkTestSuite.txt</filereports>
2153-
<argLine>-ea -Xmx3g -XX:ReservedCodeCacheSize=${CodeCacheSize}</argLine>
2153+
<argLine>-ea -Xmx3g -Xss4m -XX:ReservedCodeCacheSize=${CodeCacheSize}</argLine>
21542154
<stderr/>
21552155
<environmentVariables>
21562156
<!--

project/SparkBuild.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ object TestSettings {
789789
javaOptions in Test ++= System.getProperties.asScala.filter(_._1.startsWith("spark"))
790790
.map { case (k,v) => s"-D$k=$v" }.toSeq,
791791
javaOptions in Test += "-ea",
792-
javaOptions in Test ++= "-Xmx3g -Xss4096k"
792+
javaOptions in Test ++= "-Xmx3g -Xss4m"
793793
.split(" ").toSeq,
794794
javaOptions += "-Xmx3g",
795795
// Exclude tags defined in a system property

sql/catalyst/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
<groupId>org.scalatest</groupId>
135135
<artifactId>scalatest-maven-plugin</artifactId>
136136
<configuration>
137-
<argLine>-Xmx4g -Xss4096k -XX:MaxPermSize=${MaxPermGen} -XX:ReservedCodeCacheSize=512m</argLine>
137+
<argLine>-ea -Xmx4g -Xss4m -XX:MaxPermSize=${MaxPermGen} -XX:ReservedCodeCacheSize=512m</argLine>
138138
</configuration>
139139
</plugin>
140140
<plugin>

sql/core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@
195195
<groupId>org.scalatest</groupId>
196196
<artifactId>scalatest-maven-plugin</artifactId>
197197
<configuration>
198-
<argLine>-Xmx4g -Xss4096k -XX:MaxPermSize=${MaxPermGen} -XX:ReservedCodeCacheSize=512m</argLine>
198+
<argLine>-ea -Xmx4g -Xss4m -XX:MaxPermSize=${MaxPermGen} -XX:ReservedCodeCacheSize=512m</argLine>
199199
</configuration>
200200
</plugin>
201201
<plugin>

0 commit comments

Comments
 (0)