Folia icon indicating copy to clipboard operation
Folia copied to clipboard

Villager Force load POI Lag

Open PedroMPagani opened this issue 1 year ago • 7 comments

Profile link

Description of issue

Ok, I am getting this weird stacktrace here PID: 194 | Suspended: false | Native: false | State: WAITING Stack: [email protected]/jdk.internal.misc.Unsafe.park(Native Method) [email protected]/java.util.concurrent.locks.LockSupport.park(LockSupport.java:371) ca.spottedleaf.moonrise.patches.chunk_system.scheduling.ChunkHolderManager.loadPoiChunk(ChunkHolderManager.java:1170) net.minecraft.world.entity.ai.village.poi.PoiManager.getOrLoad(PoiManager.java:99) net.minecraft.world.entity.ai.village.poi.PoiManager.getType(PoiManager.java:354) net.minecraft.world.entity.ai.behavior.PoiCompetitorScan.lambda$create$4(PoiCompetitorScan.java:28) net.minecraft.world.entity.ai.behavior.PoiCompetitorScan$$Lambda/0x000072072e095888.trigger(Unknown Source) net.minecraft.world.entity.ai.behavior.declarative.BehaviorBuilder$1.trigger(BehaviorBuilder.java:42) net.minecraft.world.entity.ai.behavior.OneShot.tryStart(OneShot.java:17) net.minecraft.world.entity.ai.Brain.startEachNonRunningBehavior(Brain.java:451) net.minecraft.world.entity.ai.Brain.tick(Brain.java:403) net.minecraft.world.entity.npc.Villager.customServerAiStep(Villager.java:268) net.minecraft.world.entity.npc.Villager.customServerAiStep(Villager.java:262) net.minecraft.world.entity.Mob.serverAiStep(Mob.java:982) net.minecraft.world.entity.LivingEntity.aiStep(LivingEntity.java:3507) net.minecraft.world.entity.Mob.aiStep(Mob.java:705) net.minecraft.world.entity.AgeableMob.aiStep(AgeableMob.java:155) net.minecraft.world.entity.LivingEntity.tick(LivingEntity.java:3206) net.minecraft.world.entity.Mob.tick(Mob.java:472) net.minecraft.world.entity.npc.Villager.tick(Villager.java:310) net.minecraft.world.entity.Entity.rideTick(Entity.java:3003) net.minecraft.world.entity.LivingEntity.rideTick(LivingEntity.java:3758) net.minecraft.server.level.ServerLevel.tickPassenger(ServerLevel.java:1475) net.minecraft.server.level.ServerLevel.tickNonPassenger(ServerLevel.java:1437) net.minecraft.server.level.ServerLevel$$Lambda/0x000072072dccf320.accept(Unknown Source) net.minecraft.world.level.Level.guardEntityTick(Level.java:1469) net.minecraft.server.level.ServerLevel.lambda$tick$4(ServerLevel.java:846) net.minecraft.server.level.ServerLevel$$Lambda/0x000072072d89a500.accept(Unknown Source) io.papermc.paper.threadedregions.RegionizedWorldData.forEachTickingEntity(RegionizedWorldData.java:582) net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:827) net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1933) net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:473) net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1756) io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:492) io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:440) ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:540) [email protected]/java.lang.Thread.runWith(Thread.java:1596) [email protected]/java.lang.Thread.run(Thread.java:1583)

Plugin and Datapack List

Server Plugins (1): Goliath

Server config files

Paste configs or paste.gg link here!

Folia version

dev 1.21.1

Other

The villager was a passenger, i located the chunk and it was riding a minecart, there was a player in front of the villager, and a zombie as well, i dont know if this is reproducable.

PedroMPagani avatar Sep 18 '24 20:09 PedroMPagani

"dev 1.21.1" is not a valid version.

powercasgamer avatar Sep 18 '24 21:09 powercasgamer

"dev 1.21.1" is not a valid version.

This is complete nonsense. How do you expect the dev version to reach the official version 1.21.1 without people reporting bugs and issues on dev? With magic that will find and fix bugs?

Potenza7 avatar Sep 20 '24 06:09 Potenza7

https://pastes.dev/UtykzDcn4m Yes, I see that too.

Potenza7 avatar Sep 20 '24 06:09 Potenza7

"dev 1.21.1" is not a valid version.

This is complete nonsense. How do you expect the dev version to reach the official version 1.21.1 without people reporting bugs and issues on dev? With magic that will find and fix bugs?

I think he mainly meant that we don't know the build of 1.21.1 used, is it on Folia or another fork?

Euphillya avatar Sep 20 '24 06:09 Euphillya

The fork is using the latest commit 88e0907cadf2358e1d3e06222c0a97722ca4ce12 from the dev 1.21.1 branch. and there's no patches that are touching any of the chunk system therefore not causing this. Let's focus on what's causing or maybe a solution. not on the basic normal business that a normal server owner with no development knowledge would have to go through.

PedroMPagani avatar Sep 20 '24 11:09 PedroMPagani

I assume this is fixed on the latest. With the ref count changes? @Spottedleaf

PedroMPagani avatar Dec 09 '24 10:12 PedroMPagani

POI data load doesn't run through main, so I would hesitate to say it is fixed.

I'm not sure what caused this. There's unfortunately a significant lack of profiling data available from the chunk system. Guess I can put that on my wishlist for that.

Spottedleaf avatar Jan 21 '25 00:01 Spottedleaf