Vampirism - Become a vampire!

Vampirism - Become a vampire!

16M Downloads

[1.11.2] Vampirism Converted Creature AI causes massive CPU usage on server after world load

Ozurian opened this issue ยท 2 comments

commented

Versions

  • Minecraft: 1.11.2
  • Forge: 1.11.2-13.20.1.2388
  • Vampirism: Vampirism-1.11.2-1.2.1

Issue Description

After starting the server there are no problems until right after the world has loaded, within a few seconds the server thread stalls at its maximum CPU usage for up to an hour or so, but it eventually frees up and everything is playable without issue after, but obviously something is quite wrong here for the converted creature AI to lock the server for an hour preventing any joins until it is done hanging on AI processing :)

Reproduce Steps

  1. Fire up server
  2. Wait until world loads

Additional Information

VisualVM sample is here:
https://1drv.ms/u/s!AmguJ4ElBm0igc4PJzuI3fR2jAtZMg

Latest server log:
https://gist.github.com/Ozurian/1f6e18396e7c70a744edb1a15f58e875

For the most part it seems to be stuck on

func_177435_g | getBlockState (net.minecraft.world.chunk.Chunk)

while running EntityAIAvoidEntity -> EntityLivingbase.canEntityBeSeen

I'm not really sure which exact entity causes this, but earlier I did also get lots of spam in the console on not being able to replace creeper target tasks.

commented

Thanks for investigating this.
This is really strange. I can't find any reason why Chunk#func_177435_g (getBlockState(BlockPos) could take so long.
Also this is the (unmodified) vanilla AI, so I'm not sure how Vampirism is causing this issue.

If this issue persist, you could try to remove the converted creature which is causing the problem (e.g. by killing all vampires "/kill @e[vampirism:faction=vampire]")

commented

Definitely really strange

Unfortunately not had the time to test again here after saving the world to a backup for a bit before due to the world being a bit unplayable due to this also happening after load specifically when venturing into a Vampire Forest biome or anywhere near it after load also.

I'll update here after testing killing off the vampires after reloading when I have an opportunity again soon. I'll do a quick test then also as to how reproducible this is in new worlds with the mod loaded :)