[1.16.5] Memory leak
Eidigii opened this issue ยท 9 comments
Playing All In One modpack 1.4.2: https://www.curseforge.com/minecraft/modpacks/all-in-one-modded-one-block/files
The server is leaking memory, possibly caused by Productive Bees?
[05:09:57] [Server thread/ERROR] [minecraft/MinecraftServer]: Encountered an unexpected exception net.minecraft.crash.ReportedException: Ticking entity at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:855) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:the_bumblezone.mixins.json:entities.MinecraftServerMixin,pl:mixin:A,pl:runtimedistcleaner:A} at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:291) ~[?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:787) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:the_bumblezone.mixins.json:entities.MinecraftServerMixin,pl:mixin:A,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:642) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:the_bumblezone.mixins.json:entities.MinecraftServerMixin,pl:mixin:A,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:232) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:the_bumblezone.mixins.json:entities.MinecraftServerMixin,pl:mixin:A,pl:runtimedistcleaner:A} at java.lang.Thread.run(Unknown Source) [?:1.8.0_271] {} Caused by: java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Unknown Source) ~[?:1.8.0_271] {} at java.util.ArrayList.grow(Unknown Source) ~[?:1.8.0_271] {} at java.util.ArrayList.ensureExplicitCapacity(Unknown Source) ~[?:1.8.0_271] {} at java.util.ArrayList.ensureCapacityInternal(Unknown Source) ~[?:1.8.0_271] {} at java.util.ArrayList.add(Unknown Source) ~[?:1.8.0_271] {} at net.minecraft.tags.TagRegistry.add(TagRegistry.java:64) ~[?:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.tags.TagRegistry.createOptional(TagRegistry.java:30) ~[?:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.tags.BlockTags.createOptional(BlockTags.java:105) ~[?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.tags.BlockTags.createOptional(BlockTags.java:101) ~[?:?] {re:classloading,pl:accesstransformer:B} at cy.jdkdigital.productivebees.init.ModTags.getTag(ModTags.java:38) ~[productivebees:1.16.5-0.6.9.9] {re:classloading} at cy.jdkdigital.productivebees.common.entity.bee.ConfigurableBeeEntity.isFlowerBlock(ConfigurableBeeEntity.java:284) ~[productivebees:1.16.5-0.6.9.9] {re:classloading} at cy.jdkdigital.productivebees.common.entity.bee.ProductiveBeeEntity$PollinateGoal.lambda$new$0(ProductiveBeeEntity.java:496) ~[productivebees:1.16.5-0.6.9.9] {re:classloading} at cy.jdkdigital.productivebees.common.entity.bee.ProductiveBeeEntity$PollinateGoal$$Lambda$16213/1669839060.test(Unknown Source) ~[?:?] {} at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) ~[?:1.8.0_271] {} at java.util.Iterator.forEachRemaining(Unknown Source) ~[?:1.8.0_271] {} at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source) ~[?:1.8.0_271] {} at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[?:1.8.0_271] {} at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[?:1.8.0_271] {} at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source) ~[?:1.8.0_271] {} at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source) ~[?:1.8.0_271] {} at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[?:1.8.0_271] {} at java.util.stream.ReferencePipeline.forEach(Unknown Source) ~[?:1.8.0_271] {} at cy.jdkdigital.productivebees.common.entity.bee.ProductiveBeeEntity$PollinateGoal.findFlower(ProductiveBeeEntity.java:570) ~[productivebees:1.16.5-0.6.9.9] {re:classloading} at cy.jdkdigital.productivebees.common.entity.bee.ProductiveBeeEntity$PollinateGoal.func_226507_o_(ProductiveBeeEntity.java:549) ~[productivebees:1.16.5-0.6.9.9] {re:classloading} at cy.jdkdigital.productivebees.common.entity.bee.ProductiveBeeEntity$PollinateGoal.func_225506_g_(ProductiveBeeEntity.java:531) ~[productivebees:1.16.5-0.6.9.9] {re:classloading} at net.minecraft.entity.passive.BeeEntity$PassiveGoal.func_75250_a(BeeEntity.java:896) ~[?:?] {re:classloading,re:mixin} at cy.jdkdigital.productivebees.common.entity.bee.ProductiveBeeEntity$PollinateGoal.func_75250_a(ProductiveBeeEntity.java:486) ~[productivebees:1.16.5-0.6.9.9] {re:classloading} at net.minecraft.entity.ai.goal.PrioritizedGoal.func_75250_a(SourceFile:22) ~[?:?] {re:classloading} at com.performant.coremod.entity.ai.CustomGoalSelector.func_75774_a(CustomGoalSelector.java:350) ~[performant:1.16.2-5-3.40m] {re:classloading} at net.minecraft.entity.MobEntity.func_70626_be(MobEntity.java:682) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:buzzier_bees.mixins.json:MobEntityMixin,pl:mixin:APP:the_bumblezone.mixins.json:items.HoneyShieldCooldownMixin,pl:mixin:APP:the_bumblezone.mixins.json:items.HoneyShieldPreferredSlotMixin,pl:mixin:APP:assets/botania/botania.mixins.json:AccessorMobEntity,pl:mixin:APP:performant.mixins.json:entity.MobEntityMixin,pl:mixin:A,pl:runtimedistcleaner:A} at net.minecraft.entity.LivingEntity.func_70636_d(LivingEntity.java:2411) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,xf:fml:astralsorcery:set_player_field,xf:fml:astralsorcery:water_movement_slowdown_prevention,pl:mixin:APP:performant.mixins.json:entity.LivingEntityMixin,pl:mixin:APP:eidolon.mixins.json:LivingEntityMixin,pl:mixin:APP:kubejs-common.mixins.json:LivingEntityMixin,pl:mixin:APP:the_bumblezone.mixins.json:entities.LivingEntityMixin,pl:mixin:APP:assets/botania/botania.mixins.json:AccessorLivingEntity,pl:mixin:A,pl:runtimedistcleaner:A} at net.minecraft.entity.MobEntity.func_70636_d(MobEntity.java:488) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:buzzier_bees.mixins.json:MobEntityMixin,pl:mixin:APP:the_bumblezone.mixins.json:items.HoneyShieldCooldownMixin,pl:mixin:APP:the_bumblezone.mixins.json:items.HoneyShieldPreferredSlotMixin,pl:mixin:APP:assets/botania/botania.mixins.json:AccessorMobEntity,pl:mixin:APP:performant.mixins.json:entity.MobEntityMixin,pl:mixin:A,pl:runtimedistcleaner:A}
I tried manually updating Productive Bees to 0.6.9.9, but had the same result.
2 full crashlogs:
https://pastebin.com/fzkCqjpv
https://pastebin.com/vNn1k3eb
latest debuglog:
debug-1.log.gz
The server starts slowly lagging until it crashes. All In One is pretty much a skyblock, so we are constantly in the same place :)
Our base chunks are loaded and the server leaks enough over night to be in a crashed state by morning.
What I mean is if it the same place in the code? :)
I've played the pack myself a bit, so I'll try leaving my world open for a bit and see if I can reproduce.
I noticed that the bee AI is terrible for skyblocks and bees get stuck over the void, can you check if you have any floating around down there?
The bees are in a closed space in my world to avoid that. I will check the logs once the server crashes again for the code line. Before the last crash I had max ticktime enabled, so the server restarted after lagging 60s.
I've plastered my world with bees and let it run for some time without seeing an increase in memory use. It looks to me that something else is causing the rise in memory and the final drop just happens to come from bees.
Could you try picking up all the bees in bee cages, so there's no bees at all active in the world, and see if it still crashes?
(if you break the hives the bees are kept inside, so it's probably easier to just break all the hives at night)
Latest crashlog:
crash-2021-04-27_05.40.51-server.txt