PluginBugs / Issues-ItemsAdder

Repository used to keep track of issues of my plugin ItemsAdder
https://itemsadder.devs.beer
52 stars 21 forks source link

1.21 memory leak - IA is fried. #3893

Closed spookymgmt closed 2 weeks ago

spookymgmt commented 1 month ago

Terms

Discord tag (optional)

No response

What happened?

Plugin consumes 30gb of ram, it's cooked. image

Steps to reproduce the issue

image

Server version

1.21

ItemsAdder Version

4.0.2 alpha test

ProtocolLib Version

1.4.3

LoneLibs Version

1.0.56

Full server log

No response

Error (optional)

a

Problematic items yml configuration file (optional)

No response

Other files, you can drag and drop them here to upload. (optional)

No response

Screenshots/Videos (you can drag and drop files or paste links)

image

Andre601 commented 1 month ago

Please provide a proper profiling report using more sophisticated tools such as Lucko's Spark (Which is now included in latest Paper Builds).

Just displaying screenshots of a random tool barely anyone may know of is no real proof. In addition, share your latest log. We request it for a reason.

spookymgmt commented 1 month ago

Please provide a proper profiling report using more sophisticated tools such as Lucko's Spark (Which is now included in latest Paper Builds).

Just displaying screenshots of a random tool barely anyone may know of is no real proof. In addition, share your latest log. We request it for a reason.

What are you talking about a random tool? It's called analyzing a heap dump. This is MAT. Eclipse memory analyzer tool.

Itemsadder does not show up in spark due to it being a MEMORY LEAK. Not a CPU or ram leak.

Here's a spark https://spark.lucko.me/2EcKXCsmul where you can see the GC is horrible. Why is it horrible? Because items adder has a memory leak.

chrome_y0ErhYVpkS

And here's a log for ya.

[20:40:09] [Server thread/WARN]: EARTH ▶ Error loading world 'fixed_glitched_blocks.pregion' file. Regenerated: /home/earth/./world/itemsadder/region/fixed_glitched_blocks.pregion 2639: [14:46:22] [Server thread/INFO]: [AlonsoTags] [ItemsAdder] ItemsAdder items were updated. Reloading tags/colors.. 2640 [14:46:22] [Server thread/INFO]: [AlonsoTags] Forced mode is not enabled. Players can choose the mode they want.. 2641 [14:46:22] [Server thread/INFO]: [AlonsoTags] Loading 'default' color.. [14:44:21] [Server thread/INFO]: [SpigotLibraryLoader] [MythicMobs] Loaded library /home/EARTH/libraries/net/kyori/option/1.0.0/option-1.0.0.jar 59 [14:44:21] [Server thread/INFO]: [SpigotLibraryLoader] [MythicMobs] Loaded library /home/EARTH/libraries/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar 60: [14:44:22] [Server thread/INFO]: [SpigotLibraryLoader] [ItemsAdder] Loading 3 libraries... please wait 61: [14:44:22] [Server thread/INFO]: [SpigotLibraryLoader] [ItemsAdder] Loaded library /home/EARTH/libraries/org/apache/httpcomponents/httpmime/4.5.14/httpmime-4.5.14.jar 62: [14:44:22] [Server thread/INFO]: [SpigotLibraryLoader] [ItemsAdder] Loaded library /home/EARTH/libraries/org/apache/httpcomponents/httpclient/4.5.14/httpclient-4.5.14.jar 63: [14:44:22] [Server thread/INFO]: [SpigotLibraryLoader] [ItemsAdder] Loaded library /home/EARTH/libraries/org/apache/httpcomponents/httpcore/4.4.16/httpcore-4.4.16.jar 64: [14:44:22] [Server thread/INFO]: [SpigotLibraryLoader] [ItemsAdder] Loaded library /home/EARTH/libraries/commons-logging/commons-logging/1.2/commons-logging-1.2.jar 65: [14:44:22] [Server thread/INFO]: [SpigotLibraryLoader] [ItemsAdder] Loaded library /home/EARTH/libraries/commons-codec/commons-codec/1.11/commons-codec-1.11.jar 66: [14:44:22] [Server thread/INFO]: [SpigotLibraryLoader] [ItemsAdder] Loaded library /home/EARTH/libraries/org/apache/commons/commons-math3/3.6.1/commons-math3-3.6.1.jar 67: [14:44:22] [Server thread/INFO]: [SpigotLibraryLoader] [ItemsAdder] Loaded library /home/EARTH/libraries/net/sourceforge/streamsupport/speedy-math/1.0.0/speedy-math-1.0.0.jar 68 [14:44:23] [Server thread/INFO]: [SpigotLibraryLoader] [VotingPlugin] Loading 1 libraries... please wait 69 [14:44:23] [Server thread/INFO]: [SpigotLibraryLoader] [VotingPlugin] Loaded library /home/EARTH/libraries/org/openjdk/nashorn/nashorn-core/15.3/nashorn-core-15.3.jar .. 133 [14:44:38] [Server thread/INFO]: [TAB] Loading server plugin TAB v4.1.6 134 [14:44:38] [Server thread/INFO]: [Jobs] Loading server plugin Jobs v5.2.4.0 135: [14:44:38] [Server thread/INFO]: [ItemsAdder] Loading server plugin ItemsAdder v4.0.2-alpha-test-3 136 [14:44:38] [Server thread/INFO]: [GPet] Loading server plugin GPet v1.4.6 137 [14:44:38] [Server thread/INFO]: [squaremap] Loading server plugin squaremap v1.2.6 ... 795 [14:45:07] [Server thread/INFO]: SCore MythicMobs hooked ! (5.7.1-7b44def4) Load After 796 [14:45:07] [Server thread/INFO]: SCore DecentHolograms hooked ! (2.8.11) Load Before 797: [14:45:07] [Server thread/INFO]: SCore ItemsAdder hooked ! (4.0.2-alpha-test-3) Load After 798 [14:45:07] [Server thread/INFO]: SCore TAB hooked ! (4.1.6) Load After 799 [14:45:07] [Server thread/INFO]: SCore WorldEdit hooked ! (2.11.1-SNAPSHOT-866;f93ad59) Load Before ... 1077 [14:45:24] [Server thread/INFO]: Plugin has been enabled successfully. 1078 [14:45:24] [Server thread/INFO]: ------------------------------------ 1079: [14:45:24] [Server thread/INFO]: [ItemsAdder] Enabling ItemsAdder v4.0.2-alpha-test-3 1080 [14:45:25] [Server thread/INFO]: EARTH ▶ 1081: ItemsAdder 4.0.2-alpha-test-3 1082 | | | |\/| /` /\ | \ | \ | |) LoneLibs 1.0.56 1083 | | | | | ./ /--\ |/ |__/ |___ | \ Axolotl 1.21-DEV-4224509 (MC: 1.21) 1084
1085 [14:45:25] [Server thread/WARN]: EARTH ▶
1086: [14:45:25] [Server thread/WARN]: EARTH ▶ This is a test version of ItemsAdder v4 for Minecraft 1.20.6 and 1.21. 1087 [14:45:25] [Server thread/WARN]: EARTH ▶ Please make backups before using this version. 1088 [14:45:25] [Server thread/WARN]: EARTH ▶ Use this only on a test server. .... 1092 [14:45:25] [Server thread/INFO]: EARTH ▶ [Pack] Extracting internal contents from .jar 1093 [14:45:26] [Server thread/INFO]: EARTH ▶ [Pack] Done extracting internal contents from .jar 1094: [14:45:26] [Server thread/WARN]: EARTH ▶ Detected legacy ItemsAdder pack (pre 3.3.0). 1095 [14:45:26] [Server thread/WARN]: EARTH ▶ Trying to load files, unexpected results might occur. 1096 [14:45:26] [Server thread/WARN]: EARTH ▶ It's adviced to follow the new guidelines: https://a.devs.beer/ia-new-guidelines-330 .... 2567 ... 11 more 2568 [14:46:20] [Craft Scheduler Thread - 11 - Essentials/INFO]: [Essentials] Update checking disabled in config. 2569: [14:46:20] [Craft Scheduler Thread - 12 - ItemsAdder/INFO]: EARTH ▶ [License] Spigot product licensed to: (4471) 2570: [14:46:20] [Craft Scheduler Thread - 9 - ItemsAdder/ERROR]: EARTH ▶ Solid hitbox too big (max 3) for furniture 'elitecreatures:santa_decoration_v1_christmas_tree'. File /contents/elitecreatures/configs/elitecreatures/santa_decoration/pack_santa_decoration.yml 2571 [14:46:20] [Craft Scheduler Thread - 15 - Pl-Hide-Pro/INFO]: [Pl-Hide-Pro] §3Pl§7-§3Hide§7-§6Pro §8▎ §r§aUpdate available: §l§b2.10.4§r§a! You are on §l§b2.10.3§r§a! 2572: [14:46:20] [Craft Scheduler Thread - 9 - ItemsAdder/INFO]: EARTH ▶ Loaded 1342 items 2573: [14:46:20] [Craft Scheduler Thread - 9 - ItemsAdder/INFO]: EARTH ▶ Used 0/188 REAL block IDs 2574: [14:46:20] [Craft Scheduler Thread - 9 - ItemsAdder/INFO]: EARTH ▶ Used 0/750 REAL_NOTE block IDs 2575: [14:46:20] [Craft Scheduler Thread - 9 - ItemsAdder/INFO]: EARTH ▶ Used 0/63 REAL_TRANSPARENT block IDs 2576: [14:46:20] [Craft Scheduler Thread - 9 - ItemsAdder/INFO]: EARTH ▶ Used 0/127 REAL_WIRE block IDs 2577: [14:46:20] [Craft Scheduler Thread - 9 - ItemsAdder/INFO]: EARTH ▶ Used 0/14 FIRE block IDs 2578: [14:46:20] [Craft Scheduler Thread - 9 - ItemsAdder/INFO]: EARTH ▶ Used 214/6608 font_images

spookymgmt commented 1 month ago

chrome_pkEOzNGIel

spookymgmt commented 1 month ago

Maybe related? [15:20:30 ERROR]: [ca.spottedleaf.moonrise.patches.chunk_system.scheduling.NewChunkHolder] Failed to save entity data (-30,-205) in world 'resourcenether' | net.minecraft.ReportedException: Saving entity NBT at net.minecraft.world.entity.Entity.saveWithoutId(Entity.java:2744) ~[axolotl-api-1.21-R0.1-SNAPSHOT.jar:?] at net.minecraft.world.entity.Entity.saveAsPassenger(Entity.java:2562) ~[axolotl-api-1.21-R0.1-SNAPSHOT.jar:?] at net.minecraft.world.entity.Entity.saveAsPassenger(Entity.java:2548) ~[axolotl-api-1.21-R0.1-SNAPSHOT.jar:?] at net.minecraft.world.entity.Entity.save(Entity.java:2578) ~[axolotl-api-1.21-R0.1-SNAPSHOT.jar:?] at ca.spottedleaf.moonrise.patches.chunk_system.level.entity.ChunkEntitySlices.saveEntityChunk0(ChunkEntitySlices.java:119) ~[axolotl-1.21.jar:1.21-DEV-4224509] at ca.spottedleaf.moonrise.patches.chunk_system.level.entity.ChunkEntitySlices.saveEntityChunk(ChunkEntitySlices.java:97) ~[axolotl-1.21.jar:1.21-DEV-4224509] at ca.spottedleaf.moonrise.patches.chunk_system.level.entity.ChunkEntitySlices.save(ChunkEntitySlices.java:149) ~[axolotl-1.21.jar:1.21-DEV-4224509] at ca.spottedleaf.moonrise.patches.chunk_system.scheduling.NewChunkHolder.saveEntities(NewChunkHolder.java:1843) ~[axolotl-1.21.jar:1.21-DEV-4224509] at ca.spottedleaf.moonrise.patches.chunk_system.scheduling.NewChunkHolder.unloadStage2(NewChunkHolder.java:910) ~[axolotl-1.21.jar:1.21-DEV-4224509] at ca.spottedleaf.moonrise.patches.chunk_system.scheduling.ChunkHolderManager.processUnloads(ChunkHolderManager.java:1160) ~[axolotl-1.21.jar:1.21-DEV-4224509] at net.minecraft.server.level.ChunkMap.processUnloads(ChunkMap.java:427) ~[axolotl-api-1.21-R0.1-SNAPSHOT.jar:?] at net.minecraft.server.level.ChunkMap.tick(ChunkMap.java:416) ~[axolotl-api-1.21-R0.1-SNAPSHOT.jar:?] at net.minecraft.server.level.ServerChunkCache.tick(ServerChunkCache.java:420) ~[axolotl-api-1.21-R0.1-SNAPSHOT.jar:?] at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:691) ~[axolotl-api-1.21-R0.1-SNAPSHOT.jar:?] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1828) ~[axolotl-1.21.jar:1.21-DEV-4224509] at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:483) ~[axolotl-1.21.jar:1.21-DEV-4224509] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1620) ~[axolotl-1.21.jar:1.21-DEV-4224509] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1320) ~[axolotl-1.21.jar:1.21-DEV-4224509] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:334) ~[axolotl-1.21.jar:1.21-DEV-4224509] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?] Caused by: java.lang.IllegalStateException: Value must be within range [1;99]: 119 at com.mojang.serialization.DataResult$Error.getOrThrow(DataResult.java:287) ~[datafixerupper-8.0.16.jar:?] at com.mojang.serialization.DataResult.getOrThrow(DataResult.java:81) ~[datafixerupper-8.0.16.jar:?] at net.minecraft.world.item.ItemStack.save(ItemStack.java:626) ~[axolotl-1.21.jar:1.21-DEV-4224509] at net.minecraft.world.entity.item.ItemEntity.addAdditionalSaveData(ItemEntity.java:432) ~[axolotl-1.21.jar:1.21-DEV-4224509] at net.minecraft.world.entity.Entity.addAdditionalSaveData(Entity.java:2909) ~[axolotl-api-1.21-R0.1-SNAPSHOT.jar:?] at net.minecraft.world.entity.Entity.saveWithoutId(Entity.java:2692) ~[axolotl-api-1.21-R0.1-SNAPSHOT.jar:?] ... 19 more

Lonedev would know the issue instantly

Andre601 commented 1 month ago

Lonedev would know the issue instantly

Maybe or maybe not. You never know. I for my part cannot do much with the screenshot from your MAT execution, especially given that it shows large values for everything, but the actual IA method has very low values and a 0 percentage.

Some other things I personally have issues with:

spookymgmt commented 1 month ago

Lonedev would know the issue instantly

Maybe or maybe not. You never know. I for my part cannot do much with the screenshot from your MAT execution, especially given that it shows large values for everything, but the actual IA method has very low values and a 0 percentage.

Some other things I personally have issues with:

  • You are using a unknown fork (Axolotl), which ItemsAdder isn't tested against, so the memory leak could also be caused by something within that fork that isn't in your common Spigot/Paper server.
  • Your logs provided show 2569: [14:46:20] [Craft Scheduler Thread - 12 - ItemsAdder/INFO]: EARTH ▶ [License] Spigot product licensed to: (4471), which is something that shouldn't be the case here, as the username should also be displayed for the Spigot product, so I personally have my doubts of you using a legit copy of IA.

That's fine to assume, we'll wait for lone.

LoneDev6 commented 4 weeks ago

Thanks for the report, I will check it out, probably a small oversight.

LoneDev6 commented 3 weeks ago

Currently working on it

LoneDev6 commented 3 weeks ago

Do you have Discord @spookymgmt ?

spookymgmt commented 3 weeks ago

Do you have Discord @spookymgmt ?

TY, "dr.lunar" is my discord, I enabled friend requests.