Extreme Slowdown/Crash with High Chunk Loading
Technocality opened this issue ยท 10 comments
Describe the bug
When lot's of players are on, typically 12+ for a noticeable slowdown and 20+ for and extreme slowdown (<6 TPS), and later crash, and they are spread out, with 25 players in a few chunks, there is no issue. Also when 3-4 players are flying around the extreme slowdown occurs and players are getting kicked. This was tested without C2ME installed and there was a major boost in chunk loading speed, no crash, and just minor rubberbanding.
To Reproduce
Steps to reproduce the behavior:
Have lots of player spread out, like in an SMP, or have a few players fly around.
Extreme slowdown and even crash
Expected behavior
Some slowdown, no crash, when C2ME is removed all that happens is some rubberbanding.
Runtime info (please complete the following information):
- OS: Ubuntu 24.04.1 LTS
- Minecraft version: 1.21.4
- Mod version: 1.21.4-0.3.2+alpha.0.41
Crash reports / logs
https://pastebin.com/H3EwiiS2
https://pastebin.com/4qFevnZf
Crash 1 Spark.zip
In the Spark profile once players started to spread out , the tps started dropping dramatically down to 6.16 till it crashed.

Other mods
https://pastebin.com/n0vnG2g5
Checklist
- I am using the official version of the mod.
- I tried the latest development version but the issue persists.
- I searched for similar open issues and could not find an existing bug report on this.
Additional context
Few Player Flying
heap_Leak_Suspects.zip
Lots of players
heap_Leak_Suspects 2.zip
Lots of players (Worst one)
heap_Leak_Suspects 3.zip
Vanilla
heap_Leak_Suspects 4.zip
The first crash is caused by Discord-MC-Chat, and the second crash is (probably) BanHammer.
There might be other mods that just can't handle the loading speed and freak out.
Try reproduce with only Lithium, ScalableLux, C2ME, ServerCore, Very Many Players.
crash-2025-03-30_01.45.26-server.txt
New crash with just the mods you said + spark, and using ZGC, 5 people flying in random directions on a pre-generated world
It seems like with ZGC it somehow ran out of memory, as in spark, before the crash, Memory (process) 2.1 GB / 2.2 GB 96.42% is shown, even tho the Xmx is set to 7680M
Can't reproduce. I have 8 players flying in 8 direction nonstop starting at spawn point and it haven't crashed so far for 30 minutes.
Both were set to default at the time of crash, which I understand to be enabled, I will do more testing tomorrow
Also, the server is running in a docker container on my pterodactyl instance, and the main reason I made the issue here was because I created a heap dump and then did a possible memory leak report and it gave me this: One instance of "com.ishland.c2me.rewrites.chunksystem.common.TheChunkSystem" loaded by "net.fabricmc.loader.impl.launch.knot.KnotClassLoader @ 0x620000000" occupies 1.10 GB (36.95%) bytes. The memory is accumulated in one instance of "java.lang.Object[]", loaded by "", which occupies 1.10 GB (36.95%) bytes.
That was consistent on all of the heap dumps I made when the server was slowing and C2ME was installed
And after I removed C2ME I no longer had any of the problems, I can send the heap dumps tomorrow if you want.
Thank you
Heap dumps for memory leak are mostly only valid when generated automatically by -XX:+HeapDumpOnOutOfMemoryError
That heap dump is certainly not going to show you the problem. That object is literally just storing all the chunks in your server, which is always going to be large.
Thank you for clarifying, I somewhat expected that, but I will continue to investigate why removing C2ME seems to have fixed the lag.