Stargate Journey

Stargate Journey

5M Downloads

Server Crash: GoauldTemple

samuli100 opened this issue ยท 11 comments

commented

Situation:
Our server is currently running an ATM9 Server (Version: 0.2.51). Overnight, we encountered repeated crashes attributed to the GoauldTemple of the Stargate Journey mod. The sudden onset of these crashes has left us puzzled, as the root cause remains unidentified.

Troubleshooting Steps Attempted:

  • Update of Stargate Journey Mod: We attempted to resolve the issue by updating the Stargate Journey mod to version 0.6.22. However, this did not alleviate the crashing problem.

  • Mod Deletion from Modpack: We explored the option of removing the problematic mod from the Modpack. Unfortunately, this proved unfeasible due to dependency issues, preventing us from executing this solution.

  • Temporary Fix - Deletion of Abydos Dimension: As a temporary measure, we resorted to deleting the Abydos dimension. While this has provided us with some respite, it is not a sustainable solution and only serves to prolong the inevitable crashes.

Attached Crash Report:
crash-2024-04-10_05.27.51-server.txt

commented

Alright, since the crash report path involved mixins from other mods and I've still never even used mixins, I asked around people on the Discord server if they know what might be happening and I was told this is most likely a case of slow CPU.

So, if you would, perhaps using a profiler to check what specifically is taking so long and sending the info here could help in identifying the issue, but I'm not sure if I'm capable of solving anything in this case.

commented

Can you provide your world save, or if that is problematic for you, seed ?

Also are you doing something special (non vanilla) with villagers?
Like... using archeology villagers (from sg journey) in trader blocks from easy villagers or basically anything related to villagers and their trades....

commented

The creator of this issue and I host the server together.

The problem is probably not due to a slow CPU. I've tried running the server locally on my PC with an i7 9700K @4.9 Ghz and the problem is still the same.

As you suggested, I ran a profiler and will attach the file for Spark Profiler

profile.zip

commented

I have just one archeology villager in my village but otherwise we arent doing anything special with them.

Here is a save of our world: MEGA

commented

After thorough investigation, we've identified the root cause of the crashes: it occurs during the process of refreshing the trades of the archeologist. Specifically, when the archeologist generates a map to the Goauld Temple, it triggers the crash. The issue lies in the game's behavior of attempting to generate the map regardless of the distance to the structure. In our case, this resulted in structures being located over 30,000 blocks away, causing the server's calculation time to be consumed entirely, leading to a timeout and subsequent watchdog intervention after 180 seconds.

I've conducted extensive testing on various seeds and can confirm that this issue is reproducible under these conditions and it's noteworthy that on my CPU (Ryzen 7 7800X3D), it took approximately 4 minutes to generate the map.

A possible solution to mitigate this problem could be to set a limit on how far the structure can be from the generated map. By imposing such a limit, it is possible to prevent the game from being overwhelmed by excessively distant structures during map generation.

It's worth noting that our temporary fix of deleting the Abydos dimension was purely coincidental and not a reliable solution to the underlying problem.

commented

yes I basically just did the same thing :D

image

also afaik there should be a distance limit for the structure search

and I can give you another temporary solution, if you get to state when you are not even able to join server, kill the villager with command (from console /execute in minecraft:overworld run kill @e[type=villager] this will kill all villagers, there might be some way to specify archeologist, not sure about that)

commented

I've conducted extensive testing on various seeds and can confirm that this issue is reproducible

At this point if you have few seeds with same problem, they might be helpful for further testing

commented

Regardless of the seed used, the problem persists, suggesting a recurring issue. I suspect that the extensive mod list is increasing the distance between generated structures, overwhelming the archaeologist's search process.

commented

It's really weird though, since the max search distance is limited to 100 chunks, no idea what's increasing it so much it's still searching even 30 000 blocks away.

commented

Have you tried running /locate structure #sgjourney:goauld_temple?

commented

Have you tried running /locate structure #sgjourney:goauld_temple?

There may be temples nearby, but the villagers are programmed to always look for new structures (without this, all villagers in the same place would give you the same map over and over again).
From testing it seems that the 100 chunk limit is being ignored in some way.