Possible memory Leak?
PandaGGuy opened this issue ยท 6 comments
Hey there, Been trying to trackdown a memory leak on my server while pregening. I think i tracked it down to starlight?
My test server setup:
- JDK: Zulu 17
- Java Arguments: -Xms1024M -Xmx5G -XX:MaxMetaspaceSize=512M -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=compact -XX:ShenandoahUncommitDelay=20000 -XX:ShenandoahGarbageThreshold=10 -XX:ShenandoahAllocationThreshold=20 -XX:ShenandoahGuaranteedGCInterval=20000 -XX:ShenandoahUnloadClassesFrequency=60 -XX:MaxTenuringThreshold=1 -XX:+PerfDisableSharedMem -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:ParallelGCThreads=16 -XX:ConcGCThreads=4 -Dusing.aikars.flags=true
- Base Mods:
- fabric-api-0.46.4+1.18
- lithium-fabric-mc1.18.1-0.7.7
- sodium-fabric-mc1.18.1-0.4.0-alpha6+build.14
- lazydfu-0.1.2
- Chunky-1.2.164
- spark-fabric
Test Procedure: Spun up two servers with same exact setup from above but one with starlight and one without. Ran chunky on both servers at the same time and took a heapdump after 10 minutes. Then let both servers sit idle for 5 minutes and took another heap dump. It looks like with starlight, java is struggling to clear out memory. This eventually causes the server to either hang/ crash due to out of memory/ or another occasional random crash while pregenning.
Example occasional crash while pregening w/ chunky on starlight server
It looks like once pregening is done, the server is fine and memory is able to clear out but while pregening it keeps building which causes issues when Pregening large modded worlds.
Please find heapdumps in dropbox folder below:
Speak Heap Dump Folder
Heads up, I do not have much dev experience in java. So if this was misidentified, please let me know!
Can confirm I was having the same issue when generating with Chunky. After testing by uninstalling each mod one by one, the memory leak issues disappeared when I removed Starlight and restarted the pregeneration.
I've run into the same thing, but only with chunky and not with other pregeneration mods. It's probably an issue on starlight's end.
I can confirm Chunky with starlight 0.2 CPS without starlight 12 CPS.
ETA for some chunk generation with starlight 400 hours without starlight 16 hours.