Skip to content

OutOfMemoryError in dotty.tools.dotc.core.Types #10900

Closed
@marcus-nl

Description

@marcus-nl

While trying out M3, aka the Developer's Preview (using SBT 1.4.4 and sbt-dotty 0.5.1), on our Scala 2.13 codebase, dotty crashes with an OutOfMemory error.

First I get these warnings (increasing available memory or using G1GC doesn't help):

[warn] In the last 10 seconds, 5.051 (51.4%) were spent in GC. [Heap: 0.04GB free of 1.00GB, max 1.00GB] Consider increasing the JVM heap using `-Xmx` or try a different collector, e.g. `-XX:+UseG1GC`, for better performance.
[warn] In the last 9 seconds, 8.492 (98.9%) were spent in GC. [Heap: 0.01GB free of 1.00GB, max 1.00GB] Consider increasing the JVM heap using `-Xmx` or try a different collector, e.g. `-XX:+UseG1GC`, for better performance.
...etc...

And then eventually:

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "classloader-cache-cleanup-0"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "pool-9-thread-7"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "pool-9-thread-3"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "pool-9-thread-5"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "sbt-progress-report-scheduler"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "pool-9-thread-8"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "pool-9-thread-9"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "sbt-task-progress-report-thread"

I've pasted an extract of the stacktrace below, creating using control-\ while it was still running.

Minimized code

n/a since I don't know where it went wrong. Is there any way I can pinpoint this?

Output (click arrow to expand)

	at dotty.tools.dotc.core.Types$LazyRef$.apply$$anonfun$1(Types.scala:2735)
	at dotty.tools.dotc.core.Types$LazyRef$$$Lambda$5806/0x0000000841e70840.apply(Unknown Source)
	at dotty.tools.dotc.core.Types$LazyRef.ref(Types.scala:2748)
	at dotty.tools.dotc.core.Types$TypeMap.mapOver$$anonfun$1(Types.scala:5166)
	at dotty.tools.dotc.core.Types$TypeMap$$Lambda$5812/0x0000000841e75040.apply(Unknown Source)
	at dotty.tools.dotc.core.Types$LazyRef$.apply$$anonfun$1(Types.scala:2735)
        // ...hundreds more of these lines...
	at dotty.tools.dotc.core.Types$LazyRef$$$Lambda$5806/0x0000000841e70840.apply(Unknown Source)
	at dotty.tools.dotc.core.Types$LazyRef.ref(Types.scala:2748)
	at dotty.tools.dotc.core.Types$TypeMap.mapOver$$anonfun$1(Types.scala:5166)
	at dotty.tools.dotc.core.Types$TypeMap$$Lambda$5812/0x0000000841e75040.apply(Unknown Source)
	at dotty.tools.dotc.core.Types$LazyRef$.apply$$anonfun$1(Types.scala:2735)
	at dotty.tools.dotc.core.Types$LazyRef$$$Lambda$5806/0x0000000841e70840.apply(Unknown Source)
	at dotty.tools.dotc.core.Types$LazyRef.ref(Types.scala:2748)
	at dotty.tools.dotc.core.Types$TypeMap.mapOver$$anonfun$1(Types.scala:5166)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions