We noticed, that our test suite is constantly reac...
# k2-adopters
d
We noticed, that our test suite is constantly reaching OOM error on CI in our benchmarks run. However, it passes just fine on the latest stable K1. Looks like it runs out of meta space on subsequent runs (from 3rd to 5th). The Gradle daemon is stopped before each run, so not sure what's going on there. More details in the thread.
Looks like it fails in particular on KSP processing. And it may happen on any run. Might be because KSP still technically uses K1 under the hood, but that's my uneducated guess.
Also, we do not set custom JVM params for the Kotlin compiler daemon, if that helps. Our current settings for the Gradle daemon are:
org.gradle.jvmargs=-Xmx12g -XX:MaxMetaspaceSize=1g -XX:+UseParallelGC -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
e
Did you update KSP to v2? If so it's expected to use more memory because it's in process instead of in the Kotlin daemon. From the blog post:
Note: You might need to enlarge the heap size of the Gradle daemon now that KSP and processors run in the Gradle daemon instead of the Kotlin compiler’s daemon
d
Not really, it didn't work out for us with Dagger. We ran into problems on our initial try. Also, it's a little sus, that it only happens during test runs, and not during different app build flavors benchmarks.
t
would be helpful to do a heap dump on OOM and either analyse it yourself or upload it to us via https://uploads.jetbrains.com/ (need to tell use the id of the upload)