MLG-Fortress / ExtraHardMode

The now-official repository for the ExtraHardMode Bukkit Plugin.
http://dev.bukkit.org/bukkit-plugins/fun-hard-mode/
Other
25 stars 21 forks source link

Major peformance issue impact bug. #326

Open Remski01 opened 3 months ago

Remski01 commented 3 months ago

Sometimes the server gets a large lag spike with the following massive error in the console:

[18:31:08 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH  - 1.21-108-73a863b (MC: 1.21) ---
[18:31:08 ERROR]: The server has not responded for 10 seconds! Creating thread dump
[18:31:08 ERROR]: ------------------------------
[18:31:08 ERROR]: Server thread dump (Look for plugins here before reporting to Paper!):
[18:31:08 ERROR]: ------------------------------
[18:31:08 ERROR]: Current Thread: Server thread
[18:31:08 ERROR]:       PID: 35 | Suspended: false | Native: false | State: RUNNABLE
[18:31:08 ERROR]:       Stack:
[18:31:08 ERROR]:               com.mojang.datafixers.optics.Lens.lambda$eval$2(Lens.java:46)
[18:31:08 ERROR]:               com.mojang.datafixers.optics.Lens$$Lambda/0x00007fe5993cd840.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.optics.Optic$CompositionOptic.applyUnchecked(Optic.java:41)
[18:31:08 ERROR]:               com.mojang.datafixers.optics.Optic$CompositionOptic.lambda$eval$0(Optic.java:33)
[18:31:08 ERROR]:               com.mojang.datafixers.optics.Optic$CompositionOptic$$Lambda/0x00007fe5993cda98.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.ProfunctorTransformer.lambda$eval$0(ProfunctorTransformer.java:39)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.ProfunctorTransformer$$Lambda/0x00007fe59a1993c8.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Apply.lambda$eval$0(Apply.java:30)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Apply$$Lambda/0x00007fe59a1967c0.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Apply.lambda$eval$0(Apply.java:30)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Apply$$Lambda/0x00007fe59a1967c0.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Apply.lambda$eval$0(Apply.java:30)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Apply$$Lambda/0x00007fe59a1967c0.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Comp.lambda$eval$2(Comp.java:118)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Comp$$Lambda/0x00007fe5993c99e8.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007fe59a199848.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.util.Either.lambda$mapRight$1(Either.java:166)
[18:31:08 ERROR]:               com.mojang.datafixers.util.Either$$Lambda/0x00007fe599b0b1a8.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.util.Either$Right.map(Either.java:99)
[18:31:08 ERROR]:               com.mojang.datafixers.util.Either.mapRight(Either.java:166)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$Instance.lambda$right$6(FunctionType.java:104)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$Instance$$Lambda/0x00007fe59a199aa0.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007fe59a199848.apply(Unknown Source)
[18:31:08 ERROR]:               java.base@21.0.3/java.util.function.Function.lambda$compose$0(Function.java:68)
[18:31:08 ERROR]:               java.base@21.0.3/java.util.function.Function$$Lambda/0x00007fe599fde198.apply(Unknown Source)
[18:31:08 ERROR]:               java.base@21.0.3/java.util.function.Function.lambda$compose$0(Function.java:68)
[18:31:08 ERROR]:               java.base@21.0.3/java.util.function.Function$$Lambda/0x00007fe599fde198.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007fe59a199848.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Comp.applyUnchecked(Comp.java:126)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Comp.lambda$eval$2(Comp.java:118)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Comp$$Lambda/0x00007fe5993c99e8.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007fe59a199848.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.util.Either.lambda$mapRight$1(Either.java:166)
[18:31:08 ERROR]:               com.mojang.datafixers.util.Either$$Lambda/0x00007fe599b0b1a8.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.util.Either$Right.map(Either.java:99)
[18:31:08 ERROR]:               com.mojang.datafixers.util.Either.mapRight(Either.java:166)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$Instance.lambda$right$6(FunctionType.java:104)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$Instance$$Lambda/0x00007fe59a199aa0.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007fe59a199848.apply(Unknown Source)
[18:31:08 ERROR]:               java.base@21.0.3/java.util.function.Function.lambda$compose$0(Function.java:68)
[18:31:08 ERROR]:               java.base@21.0.3/java.util.function.Function$$Lambda/0x00007fe599fde198.apply(Unknown Source)
[18:31:08 ERROR]:               java.base@21.0.3/java.util.function.Function.lambda$compose$0(Function.java:68)
[18:31:08 ERROR]:               java.base@21.0.3/java.util.function.Function$$Lambda/0x00007fe599fde198.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007fe59a199848.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Comp.applyUnchecked(Comp.java:126)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Comp.lambda$eval$2(Comp.java:118)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Comp$$Lambda/0x00007fe5993c99e8.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007fe59a199848.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.util.Either.lambda$mapRight$1(Either.java:166)
[18:31:08 ERROR]:               com.mojang.datafixers.util.Either$$Lambda/0x00007fe599b0b1a8.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.util.Either$Right.map(Either.java:99)
[18:31:08 ERROR]:               com.mojang.datafixers.util.Either.mapRight(Either.java:166)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$Instance.lambda$right$6(FunctionType.java:104)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$Instance$$Lambda/0x00007fe59a199aa0.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007fe59a199848.apply(Unknown Source)
[18:31:08 ERROR]:               java.base@21.0.3/java.util.function.Function.lambda$compose$0(Function.java:68)
[18:31:08 ERROR]:               java.base@21.0.3/java.util.function.Function$$Lambda/0x00007fe599fde198.apply(Unknown Source)
[18:31:08 ERROR]:               java.base@21.0.3/java.util.function.Function.lambda$compose$0(Function.java:68)
[18:31:08 ERROR]:               java.base@21.0.3/java.util.function.Function$$Lambda/0x00007fe599fde198.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007fe59a199848.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Comp.applyUnchecked(Comp.java:126)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Comp.lambda$eval$2(Comp.java:118)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Comp$$Lambda/0x00007fe5993c99e8.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007fe59a199848.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.util.Either.lambda$mapRight$1(Either.java:166)
[18:31:08 ERROR]:               com.mojang.datafixers.util.Either$$Lambda/0x00007fe599b0b1a8.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.util.Either$Right.map(Either.java:99)
[18:31:08 ERROR]:               com.mojang.datafixers.util.Either.mapRight(Either.java:166)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$Instance.lambda$right$6(FunctionType.java:104)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$Instance$$Lambda/0x00007fe59a199aa0.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007fe59a199848.apply(Unknown Source)
[18:31:08 ERROR]:               java.base@21.0.3/java.util.function.Function.lambda$compose$0(Function.java:68)
[18:31:08 ERROR]:               java.base@21.0.3/java.util.function.Function$$Lambda/0x00007fe599fde198.apply(Unknown Source)
[18:31:08 ERROR]:               java.base@21.0.3/java.util.function.Function.lambda$compose$0(Function.java:68)
[18:31:08 ERROR]:               java.base@21.0.3/java.util.function.Function$$Lambda/0x00007fe599fde198.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007fe59a199848.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007fe59a199848.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.util.Either.lambda$mapRight$1(Either.java:166)
[18:31:08 ERROR]:               com.mojang.datafixers.util.Either$$Lambda/0x00007fe599b0b1a8.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.util.Either$Right.map(Either.java:99)
[18:31:08 ERROR]:               com.mojang.datafixers.util.Either.mapRight(Either.java:166)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$Instance.lambda$right$6(FunctionType.java:104)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$Instance$$Lambda/0x00007fe59a199aa0.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007fe59a199848.apply(Unknown Source)
[18:31:08 ERROR]:               java.base@21.0.3/java.util.function.Function.lambda$compose$0(Function.java:68)
[18:31:08 ERROR]:               java.base@21.0.3/java.util.function.Function$$Lambda/0x00007fe599fde198.apply(Unknown Source)
[18:31:08 ERROR]:               java.base@21.0.3/java.util.function.Function.lambda$compose$0(Function.java:68)
[18:31:08 ERROR]:               java.base@21.0.3/java.util.function.Function$$Lambda/0x00007fe599fde198.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007fe59a199848.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Comp.applyUnchecked(Comp.java:126)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Comp.lambda$eval$2(Comp.java:118)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Comp$$Lambda/0x00007fe5993c99e8.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Fold.lambda$eval$2(Fold.java:91)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Fold$$Lambda/0x00007fe59a194be8.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Comp.applyUnchecked(Comp.java:126)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Comp.lambda$eval$2(Comp.java:118)
[18:31:08 ERROR]:               com.mojang.datafixers.functions.Comp$$Lambda/0x00007fe5993c99e8.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.datafixers.types.Type.capWrite(Type.java:167)
[18:31:08 ERROR]:               com.mojang.datafixers.types.Type.lambda$readAndWrite$10(Type.java:159)
[18:31:08 ERROR]:               com.mojang.datafixers.types.Type$$Lambda/0x00007fe5993c9568.apply(Unknown Source)
[18:31:08 ERROR]:               com.mojang.serialization.DataResult$Success.flatMap(DataResult.java:201)
[18:31:08 ERROR]:               com.mojang.datafixers.types.Type.readAndWrite(Type.java:158)
[18:31:08 ERROR]:               com.mojang.datafixers.DataFixerUpper.update(DataFixerUpper.java:78)
[18:31:08 ERROR]:               org.bukkit.craftbukkit.legacy.CraftLegacy.<clinit>(CraftLegacy.java:411)
[18:31:08 ERROR]:               org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(CraftMagicNumbers.java:127)
[18:31:08 ERROR]:               org.bukkit.craftbukkit.block.CraftBlockState.getData(CraftBlockState.java:163)
[18:31:08 ERROR]:               ExtraHardMode.jar//com.extrahardmode.features.AntiFarming.onBlockGrow(AntiFarming.java:184)
[18:31:08 ERROR]:               com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor504.execute(Unknown Source)
[18:31:08 ERROR]:               org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77)
[18:31:08 ERROR]:               co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:84)
[18:31:08 ERROR]:               org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[18:31:08 ERROR]:               io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54)
[18:31:08 ERROR]:               io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131)
[18:31:08 ERROR]:               org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628)
[18:31:08 ERROR]:               org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(CraftEventFactory.java:1321)
[18:31:08 ERROR]:               org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(CraftEventFactory.java:1312)
[18:31:08 ERROR]:               net.minecraft.world.level.block.BuddingAmethystBlock.randomTick(BuddingAmethystBlock.java:52)
[18:31:08 ERROR]:               net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.randomTick(BlockBehaviour.java:1225)
[18:31:08 ERROR]:               net.minecraft.server.level.ServerLevel.optimiseRandomTick(ServerLevel.java:887)
[18:31:08 ERROR]:               net.minecraft.server.level.ServerLevel.tickChunk(ServerLevel.java:950)
[18:31:08 ERROR]:               net.minecraft.server.level.ServerChunkCache.tickChunks(ServerChunkCache.java:514)
[18:31:08 ERROR]:               net.minecraft.server.level.ServerChunkCache.tick(ServerChunkCache.java:407)
[18:31:08 ERROR]:               net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:732)
[18:31:08 ERROR]:               net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1805)
[18:31:08 ERROR]:               net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:473)
[18:31:08 ERROR]:               net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1597)
[18:31:08 ERROR]:               net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1303)
[18:31:08 ERROR]:               net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330)
[18:31:08 ERROR]:               net.minecraft.server.MinecraftServer$$Lambda/0x00007fe598d55f48.run(Unknown Source)
[18:31:08 ERROR]:               java.base@21.0.3/java.lang.Thread.runWith(Thread.java:1596)
[18:31:08 ERROR]:               java.base@21.0.3/java.lang.Thread.run(Thread.java:1583)
[18:31:08 ERROR]: ------------------------------
[18:31:08 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---
[18:31:08 ERROR]: ------------------------------

Reason i believe it has todo with this plugin is because it mentions the plugin.

ExtraHardMode.jar//com.extrahardmode.features.AntiFarming.onBlockGrow(AntiFarming.java:184)
ExtraHardMode.jar//com.extrahardmode.features.AntiFarming.onBlockGrow(AntiFarming.java:184)
com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor504.execute(Unknown Source)

Paper build: 1.21-108-master@73a863b EHM build: 3.15.1-beta-c1a56d8

I'm aware that the plugin has no released an 1.21 compatibility update, buit feel it should be updated to it at some point and thus reporting is still usefull.

RoboMWM commented 3 months ago

https://github.com/MLG-Fortress/ExtraHardMode/blob/c1a56d85edf1e9c2fe66ffe21f0f66bc7bdd591a/src/main/java/com/extrahardmode/features/AntiFarming.java#L184

Seems like the #getData call took too long on your server. Looks like to know more, we could try printing out some debug to find out what type of block is growing and determine why that's taking so long.

Remski01 commented 3 months ago

Turning the debug on does not print out anything before/after the error/lagspike.

Unless i'm missing something, https://mclo.gs/I4sF5X0

Plugin settings: https://mclo.gs/RRgVmIn (In case its usefull)

Another note, it started to happen pretty much right after updating to 1.21, maybe something related to chunk loading/#getData have changed in 1.21.

Have not tested this on an test server yet, i can provide an test server for you to see the issue firsthand, including server admin access. (if this even happens on an test server)

Remski01 commented 1 month ago

Hello.

Have updated the server to 1.21.1 and noticed the error is now bigger and different. (more lines)

Maybe worth to check out this new error.

The error log seems to have several mentions of block.VineBlock.. Altough, EHM doesnt do anything with those. No? If correct it could be that it was about to grow when the pluign cause the hang what took it in the lagspike error.

[21:10:14 WARN]: [org.bukkit.craftbukkit.legacy.CraftLegacy] Initializing Legacy Material Support. Unless you have legacy plugins and/or data this is a bug!
[21:10:24 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH  - 1.21.1-57-b483da4 (MC: 1.21.1) ---
[21:10:24 ERROR]: The server has not responded for 10 seconds! Creating thread dump
[21:10:24 ERROR]: ------------------------------
[21:10:24 ERROR]: Server thread dump (Look for plugins here before reporting to Paper!):
[21:10:24 ERROR]: ------------------------------
[21:10:24 ERROR]: Current Thread: Server thread
[21:10:24 ERROR]:       PID: 75 | Suspended: false | Native: false | State: RUNNABLE
[21:10:24 ERROR]:       Stack:
[21:10:24 ERROR]:               com.google.common.collect.ImmutableCollection$Builder.addAll(ImmutableCollection.java:474)
[21:10:24 ERROR]:               com.google.common.collect.ImmutableSet$Builder.addAll(ImmutableSet.java:549)
[21:10:24 ERROR]:               com.mojang.datafixers.TypedOptic.compose(TypedOptic.java:89)
[21:10:24 ERROR]:               com.mojang.datafixers.types.templates.Product$ProductType.capLeft(Product.java:251)
[21:10:24 ERROR]:               com.mojang.datafixers.types.templates.Product$ProductType$$Lambda/0x00007ff4721eb8b0.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either$Left.map(Either.java:38)
[21:10:24 ERROR]:               com.mojang.datafixers.types.templates.Product$ProductType.findTypeInChildren(Product.java:241)
[21:10:24 ERROR]:               com.mojang.datafixers.types.Type.lambda$findType$17(Type.java:238)
[21:10:24 ERROR]:               com.mojang.datafixers.types.Type$$Lambda/0x00007ff4713b10d0.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either$Right.map(Either.java:99)
[21:10:24 ERROR]:               com.mojang.datafixers.types.Type.findType(Type.java:236)
[21:10:24 ERROR]:               com.mojang.datafixers.types.templates.Hook$HookType.findTypeInChildren(Hook.java:142)
[21:10:24 ERROR]:               com.mojang.datafixers.types.Type.lambda$findType$17(Type.java:238)
[21:10:24 ERROR]:               com.mojang.datafixers.types.Type$$Lambda/0x00007ff4713b10d0.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either$Right.map(Either.java:99)
[21:10:24 ERROR]:               com.mojang.datafixers.types.Type.findType(Type.java:236)
[21:10:24 ERROR]:               com.mojang.datafixers.types.templates.Named$NamedType.findTypeInChildren(Named.java:175)
[21:10:24 ERROR]:               com.mojang.datafixers.types.Type.lambda$findType$17(Type.java:238)
[21:10:24 ERROR]:               com.mojang.datafixers.types.Type$$Lambda/0x00007ff4713b10d0.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either$Right.map(Either.java:99)
[21:10:24 ERROR]:               com.mojang.datafixers.types.Type.findType(Type.java:236)
[21:10:24 ERROR]:               com.mojang.datafixers.types.Type.findTypeCached(Type.java:232)
[21:10:24 ERROR]:               com.mojang.datafixers.FieldFinder.findType(FieldFinder.java:36)
[21:10:24 ERROR]:               com.mojang.datafixers.OpticFinder.findType(OpticFinder.java:16)
[21:10:24 ERROR]:               com.mojang.datafixers.Typed.getOptional(Typed.java:65)
[21:10:24 ERROR]:               net.minecraft.util.datafix.fixes.ItemStackTagFix.lambda$createFixer$1(ItemStackTagFix.java:36)
[21:10:24 ERROR]:               net.minecraft.util.datafix.fixes.ItemStackTagFix$$Lambda/0x00007ff47139a5e8.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.DataFix.lambda$checked$3(DataFix.java:97)
[21:10:24 ERROR]:               com.mojang.datafixers.DataFix$$Lambda/0x00007ff4713af4a0.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.functions.Comp.applyUnchecked(Comp.java:126)
[21:10:24 ERROR]:               com.mojang.datafixers.functions.Comp.lambda$eval$2(Comp.java:118)
[21:10:24 ERROR]:               com.mojang.datafixers.functions.Comp$$Lambda/0x00007ff4713af260.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007ff4721ef980.apply(Unknown Source)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function.lambda$compose$0(Function.java:68)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function$$Lambda/0x00007ff4720d3848.apply(Unknown Source)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function.lambda$compose$0(Function.java:68)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function$$Lambda/0x00007ff4720d3848.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007ff4721ef980.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either.lambda$mapRight$1(Either.java:166)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either$$Lambda/0x00007ff471b393f0.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either$Right.map(Either.java:99)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either.mapRight(Either.java:166)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$Instance.lambda$right$6(FunctionType.java:104)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$Instance$$Lambda/0x00007ff4721efbd8.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007ff4721ef980.apply(Unknown Source)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function.lambda$compose$0(Function.java:68)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function$$Lambda/0x00007ff4720d3848.apply(Unknown Source)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function.lambda$compose$0(Function.java:68)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function$$Lambda/0x00007ff4720d3848.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007ff4721ef980.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either.lambda$mapRight$1(Either.java:166)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either$$Lambda/0x00007ff471b393f0.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either$Right.map(Either.java:99)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either.mapRight(Either.java:166)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$Instance.lambda$right$6(FunctionType.java:104)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$Instance$$Lambda/0x00007ff4721efbd8.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007ff4721ef980.apply(Unknown Source)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function.lambda$compose$0(Function.java:68)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function$$Lambda/0x00007ff4720d3848.apply(Unknown Source)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function.lambda$compose$0(Function.java:68)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function$$Lambda/0x00007ff4720d3848.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007ff4721ef980.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either.lambda$mapRight$1(Either.java:166)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either$$Lambda/0x00007ff471b393f0.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either$Right.map(Either.java:99)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either.mapRight(Either.java:166)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$Instance.lambda$right$6(FunctionType.java:104)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$Instance$$Lambda/0x00007ff4721efbd8.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007ff4721ef980.apply(Unknown Source)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function.lambda$compose$0(Function.java:68)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function$$Lambda/0x00007ff4720d3848.apply(Unknown Source)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function.lambda$compose$0(Function.java:68)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function$$Lambda/0x00007ff4720d3848.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007ff4721ef980.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either.lambda$mapRight$1(Either.java:166)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either$$Lambda/0x00007ff471b393f0.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either$Right.map(Either.java:99)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either.mapRight(Either.java:166)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$Instance.lambda$right$6(FunctionType.java:104)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$Instance$$Lambda/0x00007ff4721efbd8.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007ff4721ef980.apply(Unknown Source)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function.lambda$compose$0(Function.java:68)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function$$Lambda/0x00007ff4720d3848.apply(Unknown Source)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function.lambda$compose$0(Function.java:68)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function$$Lambda/0x00007ff4720d3848.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007ff4721ef980.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either.lambda$mapRight$1(Either.java:166)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either$$Lambda/0x00007ff471b393f0.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either$Right.map(Either.java:99)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either.mapRight(Either.java:166)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$Instance.lambda$right$6(FunctionType.java:104)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$Instance$$Lambda/0x00007ff4721efbd8.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007ff4721ef980.apply(Unknown Source)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function.lambda$compose$0(Function.java:68)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function$$Lambda/0x00007ff4720d3848.apply(Unknown Source)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function.lambda$compose$0(Function.java:68)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function$$Lambda/0x00007ff4720d3848.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007ff4721ef980.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either.lambda$mapRight$1(Either.java:166)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either$$Lambda/0x00007ff471b393f0.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either$Right.map(Either.java:99)
[21:10:24 ERROR]:               com.mojang.datafixers.util.Either.mapRight(Either.java:166)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$Instance.lambda$right$6(FunctionType.java:104)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$Instance$$Lambda/0x00007ff4721efbd8.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007ff4721ef980.apply(Unknown Source)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function.lambda$compose$0(Function.java:68)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function$$Lambda/0x00007ff4720d3848.apply(Unknown Source)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function.lambda$compose$0(Function.java:68)
[21:10:24 ERROR]:               java.base@21.0.4/java.util.function.Function$$Lambda/0x00007ff4720d3848.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.FunctionType$$Lambda/0x00007ff4721ef980.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.functions.Comp.applyUnchecked(Comp.java:126)
[21:10:24 ERROR]:               com.mojang.datafixers.functions.Comp.lambda$eval$2(Comp.java:118)
[21:10:24 ERROR]:               com.mojang.datafixers.functions.Comp$$Lambda/0x00007ff4713af260.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.functions.Fold.lambda$eval$2(Fold.java:91)
[21:10:24 ERROR]:               com.mojang.datafixers.functions.Fold$$Lambda/0x00007ff4721e6b58.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.functions.Comp.applyUnchecked(Comp.java:126)
[21:10:24 ERROR]:               com.mojang.datafixers.functions.Comp.lambda$eval$2(Comp.java:118)
[21:10:24 ERROR]:               com.mojang.datafixers.functions.Comp$$Lambda/0x00007ff4713af260.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.datafixers.types.Type.capWrite(Type.java:167)
[21:10:24 ERROR]:               com.mojang.datafixers.types.Type.lambda$readAndWrite$10(Type.java:159)
[21:10:24 ERROR]:               com.mojang.datafixers.types.Type$$Lambda/0x00007ff4713aede0.apply(Unknown Source)
[21:10:24 ERROR]:               com.mojang.serialization.DataResult$Success.flatMap(DataResult.java:201)
[21:10:24 ERROR]:               com.mojang.datafixers.types.Type.readAndWrite(Type.java:158)
[21:10:24 ERROR]:               com.mojang.datafixers.DataFixerUpper.update(DataFixerUpper.java:78)
[21:10:24 ERROR]:               org.bukkit.craftbukkit.legacy.CraftLegacy.<clinit>(CraftLegacy.java:411)
[21:10:24 ERROR]:               org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(CraftMagicNumbers.java:127)
[21:10:24 ERROR]:               org.bukkit.craftbukkit.block.CraftBlockState.getData(CraftBlockState.java:163)
[21:10:24 ERROR]:               ExtraHardMode.jar//com.extrahardmode.features.AntiFarming.onBlockGrow(AntiFarming.java:184)
[21:10:24 ERROR]:               com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor493.execute(Unknown Source)
[21:10:24 ERROR]:               org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77)
[21:10:24 ERROR]:               co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:84)
[21:10:24 ERROR]:               org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[21:10:24 ERROR]:               io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54)
[21:10:24 ERROR]:               io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131)
[21:10:24 ERROR]:               org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628)
[21:10:24 ERROR]:               org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(CraftEventFactory.java:1327)
[21:10:24 ERROR]:               net.minecraft.world.level.block.VineBlock.randomTick(VineBlock.java:234)
[21:10:24 ERROR]:               net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.randomTick(BlockBehaviour.java:1226)
[21:10:24 ERROR]:               net.minecraft.server.level.ServerLevel.optimiseRandomTick(ServerLevel.java:844)
[21:10:24 ERROR]:               net.minecraft.server.level.ServerLevel.tickChunk(ServerLevel.java:907)
[21:10:24 ERROR]:               net.minecraft.server.level.ServerChunkCache.tickChunks(ServerChunkCache.java:515)
[21:10:24 ERROR]:               net.minecraft.server.level.ServerChunkCache.tick(ServerChunkCache.java:408)
[21:10:24 ERROR]:               net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:689)
[21:10:24 ERROR]:               net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1806)
[21:10:24 ERROR]:               net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:473)
[21:10:24 ERROR]:               net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1598)
[21:10:24 ERROR]:               net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1304)
[21:10:24 ERROR]:               net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330)
[21:10:24 ERROR]:               net.minecraft.server.MinecraftServer$$Lambda/0x00007ff470d424a8.run(Unknown Source)
[21:10:24 ERROR]:               java.base@21.0.4/java.lang.Thread.runWith(Thread.java:1596)
[21:10:24 ERROR]:               java.base@21.0.4/java.lang.Thread.run(Thread.java:1583)
[21:10:24 ERROR]: ------------------------------
[21:10:24 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---
[21:10:24 ERROR]: ------------------------------
RoboMWM commented 1 month ago

Hmm, I wonder if this is perhaps loading chunks, and Minecraft is attempting to convert these blocks to 1.21 format? I wonder if this occurs on a fresh world.

Looks like I was starting to add some debug stuff but must've been busy doing other things and forgot. I'll try to remember later this week - I basically plan to separate out those calls to variables beforehand and to print said variables to debug log is all for right now to at least confirm the exact method it's stuck on.

Remski01 commented 1 month ago

Did attempt the test it with an fresh world. It didnt happen there i believe(Dont quote me). But that isnt that strange. Its an extreem small world while the world we have is... wel. Not massive. But its way bigger then an fresh world. Meaning that the result are kinda "waste of time".

Also, would like to point out that the plugin has not officially updated to 1.21, not even 1.20.x. Now granted, it worked "fine" on 1.20.6, but maybe 1.21 changed something, so maybe worth to take a peek atleast at the 1.21 dev changes to see if any of it used by the plugin what then might cause it to hang. (It trying todo something what doesnt exists anymore and/or not in the same way)

RoboMWM commented 1 month ago

getData is a newer method as far as I recall from 1.13, so I see no reason why that would change anything. Only thing it could potentially be is the legacy material conversion.

That being said, as for your massive world - are you able to reproduce it? If so, can you use a copy of that in a test server and see if it still happens after the world has been converted (i.e. all chunks loaded and saved once on 1.21)?

Remski01 commented 1 month ago

Its quite hard to reproduce. As it seems to be very inconsistent. As to where it happens. Some places way more then others. The world is "World Force Upgrade" so it should be already 1.21.1.

Have tried testing this on the test server with no result as far i remember. (other then what i said before.)

Will wait for the more improved debugging.

RoboMWM commented 1 month ago

For my notes:

Anything else you think I should print out?

RoboMWM commented 1 month ago

Try this. If it downloads as a .zip rename it to .jar, as it seems that appveyor (or maybe the Edge browser?) is starting to mess around with file extensions... https://ci.appveyor.com/project/RoboMWM39862/extrahardmode/builds/50547906/artifacts

Remski01 commented 1 month ago

Thank you, had something happen in the last days what cause me to forget about this for few days. (Just to be clear i didnt care about it.)

Wil start testing it with the provided jar. (and ps, looks like its AppVeyor as Firefox also change it to an .zip)

Remski01 commented 1 month ago

Did some testing, and found the following results.


Whenever the server lagged it always had the following line.

[ExtraHardMode] BlockGrowEvent block material: VINE, location: Location{world=CraftWorld{name=world},x=330.0,y=-10.0,z=-975.0,pitch=0.0,yaw=0.0}

Followed by:

[org.bukkit.craftbukkit.legacy.CraftLegacy] Initializing Legacy Material Support. Unless you have legacy plugins and/or data this is a bug!

Then the lag spike. (See full log)

Followed by

[ExtraHardMode] Successfully retrieved getNewState#getData

When then teleporting to the coords in the first EHM message its always something like this.

https://postimg.cc/gLq6ktHm


So, seems EHM does get sometimes stuck on it as other "BlockGrowEvent block material:" gets instantly returned. Also, when teleporting removing the fines it continue to happen, but then just to another one. Need to note also down that when they get returned right away it also have the same or familiar conditions.

Full stacktrace: https://mclo.gs/kvLi5Zl

Remski01 commented 1 month ago

Interesting thing, updated Paper to Build 77. Previous logs are from an older build(20 builds) and now there is i believe another new error log. (Do not quote me on it, just did some line copy checking)

https://mclo.gs/VFU6Tuw

RoboMWM commented 1 month ago

mk, so it seems to always be with vines in underground caves? And does it consistently happen when that chunk is loaded? Or is it only on chunk generation?

Remski01 commented 1 month ago

It is always underground caves, yes. Same chunk/when loading. Removing it and then doing the same result's in just an different vine. Cant remember if it was always in the same chunk. dont believe so. Turning "Weak Crops:" to false resolves this lagspike. So it has something todo with said mechanic.

Keep in mind however that this does not always trigger, but when it does is the above.

Remski01 commented 1 month ago

I asked the devs of PaperMC, one of the devs said the following:

I mentioned if 2 methods the plugin uses has recently been changed and gave the lastest crashlog.

RoboMWM commented 1 month ago

Expected from them lol; that's an off-the-cuff answer though. I also wonder what changed.

I have no problem seeing a need to have older plugins update for better performance on newer versions, but one of the goals of the bukkit API is forward compatibility. Anyone is free to PR this sort of change though (or take over the plugin, if they so desire, as I do not use this plugin myself anymore) since I'd imagine it's not a completely trivial effort.