Occultism

Occultism

19M Downloads

[1.16.5] Server hang occultism storage

bigenergy opened this issue ยท 5 comments

commented

Describe the bug
The server freezes and does not respond to commands

To Reproduce
I cannot reproduce, it is chaotic

System (please complete the following information):

  • Occultism Version: 1.16.5-1.20.0
  • OS: ubuntu
  • Minecraft Version: 1.16.5

Additional context
Thread dump https://pastebin.com/X2rWsusP

commented

The crash happens (as far as I can see from the log) when it tries to find the dimension the storage controller is in within the dimension registry - that is before the tile is accessed.

The only causes I can think of are either a storage remote item's nbt being modified / created via commands, or a dimension no longer existing after a modpack update, but both I suspect there must be another edge case that is more random.

I will add sanity checks for this crash, but I suspect whatever causes it will cause other issues as well

commented

@bigenergy thanks for the report - do you have any idea what might be connected to it?
Based on the crash log it happens when a storage remote tries to access the storage system, but that alone should not cause an issue

commented

@bigenergy thanks for the report - do you have any idea what might be connected to it? Based on the crash log it happens when a storage remote tries to access the storage system, but that alone should not cause an issue

perhaps this happens if the chunk in which the occultism storage is located is not loaded, but this is just an assumption
since it comes from https://github.com/klikli-dev/occultism/blob/main/src/main/java/com/github/klikli_dev/occultism/common/container/storage/StorageControllerContainerBase.java#L114

commented

or maybe you should add a check for existence tile in the world

commented

Looking into this further, I don't think this can be fixed on my end.
The thread gets stuck on Forge's "ResourceKey"/"RegistryKey" class, on String#intern():

   private static <T> ResourceKey<T> create(ResourceLocation pRegistryName, ResourceLocation pLocation) {
      String s = (pRegistryName + ":" + pLocation).intern();
      return (ResourceKey<T>)VALUES.computeIfAbsent(s, (p_135796_) -> {
         return new ResourceKey(pRegistryName, pLocation);
      });
   }

As long as a storage remote is linked by the mod (and not manually), this should work. Even if someone manually places random NBT that should not influence Forge's registry handling, it should just not found anything.

I'm closing this for now, I can further investigate if we find a way to reproduce it reliably, then I can debug it. At that point please ping me so I can reopen