You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2026/03/17 22:15:35 UTC
(spark) branch master updated: [MINOR][CORE][TESTS] Call System.gc() before running test java.lang.ArrayIndexOutOfBoundsException in TimSort
This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 0390e4b44aa6 [MINOR][CORE][TESTS] Call System.gc() before running test java.lang.ArrayIndexOutOfBoundsException in TimSort
0390e4b44aa6 is described below
commit 0390e4b44aa6e8d575b7fa840281d5babfbaa484
Author: Cheng Pan <ch...@apache.org>
AuthorDate: Wed Mar 18 07:15:21 2026 +0900
[MINOR][CORE][TESTS] Call System.gc() before running test java.lang.ArrayIndexOutOfBoundsException in TimSort
### What changes were proposed in this pull request?
As title.
### Why are the changes needed?
I see many times that the CI fails with
```
Uncaught exception when running org.apache.spark.util.collection.SorterSuite: java.lang.OutOfMemoryError: Java heap space
```
for example, https://github.com/apache/spark/actions/runs/23195671190/job/67403496767
the test case allocates a large array on the heap, so doing a GC ahead might help.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Monitor CI stability.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #54867 from pan3793/minor-gc.
Authored-by: Cheng Pan <ch...@apache.org>
Signed-off-by: Hyukjin Kwon <gu...@apache.org>
---
core/src/test/scala/org/apache/spark/util/collection/SorterSuite.scala | 1 +
1 file changed, 1 insertion(+)
diff --git a/core/src/test/scala/org/apache/spark/util/collection/SorterSuite.scala b/core/src/test/scala/org/apache/spark/util/collection/SorterSuite.scala
index 4eb38e51071b..7551327d704b 100644
--- a/core/src/test/scala/org/apache/spark/util/collection/SorterSuite.scala
+++ b/core/src/test/scala/org/apache/spark/util/collection/SorterSuite.scala
@@ -71,6 +71,7 @@ class SorterSuite extends SparkFunSuite {
}
test("java.lang.ArrayIndexOutOfBoundsException in TimSort") {
+ System.gc()
// scalastyle:off
val runLengths = Array(76405736, 74830360, 1181532, 787688, 1575376, 2363064, 3938440, 6301504,
1181532, 393844, 15753760, 1575376, 787688, 393844, 1969220, 3150752, 1181532,787688, 5513816, 3938440,
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org