GTNewHorizons / GT-New-Horizons-Modpack

New Modpack with Gregtech, Thaumcraft and Witchery
https://www.gtnewhorizons.com/
Other
948 stars 296 forks source link

Memory Leak by tesla #14727

Closed koiNoCirculation closed 2 months ago

koiNoCirculation commented 11 months ago

Your GTNH Discord Username

No response

Your Pack Version

2.4.0

Your Server

private server

Java Version

Java 17

Type of Server

Vanilla Forge

Your Expectation

Server runs in 20 TPS, and consumes about 4-6GB Memory.

The Reality

TPS drop down after 10-30minutes since server start, /forge tps shows that there is a lag in personal space contains tesla. The heap memory is almost full and top -Hp shows ZWorker(ZGC) consumes most of cpu time. Through Memory Analyzer I discovered that tesla coil eats most of memory. Deleting that personal space fixex the problem.

image

These instances are referenced from one instance of java.util.HashMap$Node[], loaded by , which occupies 931,864 (0.01%) bytes. heapdump2023-10-17-22-362628212631873181506_Top_Components.zip heapdump2023-10-17-22-362628212631873181506_System_Overview.zip heapdump2023-10-17-22-362628212631873181506_Leak_Suspects.zip

Your Proposal

Fix memory leak.

Final Checklist

Cardinalstars commented 10 months ago

Is this problem only in personal dimensions? What was the state of this tesla coil? Was it on? Transmitting? We need more details to figure this one out.

koiNoCirculation commented 10 months ago

it's in personal dim.

Caedis commented 10 months ago

@koiNoCirculation can I get a copy of your world?

koiNoCirculation commented 8 months ago

@Caedis My world is here. Personal DIM 182 is laggy. http://minecraft.youtiao.dev:19999/backup.zip backup.zip is large(7.3GB), so it may take time. You may have to use wget or IDM to download because of hsts settings of browser.

koiNoCirculation commented 8 months ago

@Caedis hello, the save is given in the link and if there's any findings just reply.