scala3
scala3 copied to clipboard
OOM since scala-library was updated from 2.13.6 to 2.13.8 before 3.2.1-RC1
Compiler version
3.2.1-RC1
Minimized code
Can hardly isolate a simple code reproducer, but some integration tests consistently reproduce the issue.
Output
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "classloader-cache-cleanup-0"
Exception in thread "process reaper" Uncaught error from thread [reactivemongo-akka.actor.default-dispatcher-7]: Java heap space, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[reactivemongoUncaught error from thread [reactivemongo-akka.actor.default-dispatcher-5]: Java heap space, java.lang.OutOfMemoryError: Java heap space
]
Exception in thread "classloader-cache-cleanup-0" java.lang.OutOfMemoryError: Java heap space
at sbt.internal.classpath.ClassLoaderCache$$Lambda$466/0x0000000100533840.get$Lambda(Unknown Source)
at java.base/java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(DirectMethodHandle$Holder)
at java.base/java.lang.invoke.Invokers$Holder.linkToTargetMethod(Invokers$Holder)
Expectation
With Scala3 nightly before the change, the latest being 3.1.2-RC1-bin-20220113-8d28d94-NIGHTLY
the tests with Scala3 run fine with no such error, and were even much more stable that Scala2 tests executions.
Debug
Comparing the commits between the latest nightly version 3.1.2-RC1-bin-20220120-246ee6a-NIGHTLY
with which tests run fine and the first exhibiting the issue 3.1.2-RC1-bin-20220121-7ce60e1-NIGHTLY
:
commit 7ce60e14c681c870bb534bffe7e64ba733d700b7 (HEAD)
Merge: b0fa1fdf5e e474ab3b9e
Author: Guillaume Martres <[email protected]>
Date: Fri Jan 21 13:29:32 2022 +0100
Merge pull request #14258 from SethTisue/scala-2.13.8
Scala 2.13.8 (was 2.13.6)
commit b0fa1fdf5e8c1e17ea2b356151a72e47d5d0bb44
Merge: c99f6caa74 97b96b6f69
Author: odersky <[email protected]>
Date: Fri Jan 21 13:00:12 2022 +0100
Merge pull request #14270 from dwijnand/improve-typer-trace
Improve typer traces
commit c99f6caa74e74a67dd42e8df6ede53c29cd7fce9
Merge: c49a1cf106 3c9a2ffd78
Author: odersky <[email protected]>
Date: Fri Jan 21 11:43:02 2022 +0100
Merge pull request #14274 from dwijnand/arrays-crash
Fix checkNoModuleClash & avoid types with less precision loss
commit c49a1cf106f2f4df06b8b06d94fcf76d687b1bdb
Merge: 246ee6a904 c5fa617a1f
Author: Andrzej Ratajczak <[email protected]>
Date: Fri Jan 21 10:28:52 2022 +0100
Merge pull request #14304 from BarkingBad/fix-vulnerable-dep
Fix vulnerable dependency
commit 246ee6a904edf3c0fdb3696d87723200869a39f0
Merge: aea38cfbc0 5fb38f1a10
Author: Guillaume Martres <[email protected]>
Date: Thu Jan 20 21:13:09 2022 +0100
Merge pull request #14310 from gagandeepkalra/fix/13648
Fix byte code generation for by-name parameters
Snapshot builds were build for each intermediate commit to run the tests with.
Only the last one 7ce60e1
has the issue.
Another SNAPSHOT just with this change has been built, porting only the change from Scala Library dependency from 2.13.6 to 2.13.8 introduce by this commit to sources from the previous commit b0fa1fd
.
The tests also fails with such Scala3 SNAPSHOT.
So it seems that in some way this change introduce an issue.
Also have tried major versions published since (3.1.2-RCx, 3.1.3, 3.2 RCx), but none fixed the issue, which seems consistent with the fact the changed code is exactly the same since.