Anchor Jigsaw is missing from starts pool, causing OoMs
f-raZ0R opened this issue ยท 8 comments
crash-2023-06-28_19.19.20-server.txt
also, relevant snippet from server log:
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "spark-java-sampler-0-4" 2023-06-28 19:18:56,279 Server thread WARN org.apache.logging.slf4j.Log4jLogger caught java.lang.OutOfMemoryError logging ReusableSimpleMessage: Encountered an unexpected exception java.lang.OutOfMemoryError: Java heap space [19:19:20] [Worker-Main-5/ERROR]: Couldn't load structure betteroceanmonuments:start java.lang.OutOfMemoryError: Java heap space [19:19:20] [Worker-Main-5/ERROR]: No starting jigsaw with Name betteroceanmonuments:anchor found in start pool betteroceanmonuments:starts [19:19:20] [Server thread/ERROR]: This crash report has been saved to: $(FILEPATH)
there definitely seems to be something malformed with the structure files here.
Mabye it was like this:
Couldn't load structure betteroceanmonuments:start
because java.lang.OutOfMemoryError: Java heap space
which lead to No starting jigsaw with Name betteroceanmonuments:anchor found in start pool betteroceanmonuments:starts
If this structure / mod had general problems there would be a lot more messages about it
Try using more than 4GB
Have confirmed, the start.nbt file is outdated which is causing DFU to balloon memory usage. When unlimited it spiked memory from 8GB to 40GB used. when limited on a server that hard limits memory, it ends up with OOM errors. updating the start.nbt file completely prevents this massive memory issue due to DFU trying to update the structure files every time.
It was pointed out by TelepathicGrunt that the additional blocks you are using as placeholders instead of structure void balloons the file which may have a great effect on the datafixer processes. It may be prudent to automate structure void usage for production builds and test memory and dfu usage after the fact (though at that point you might as well just automate structure updating in your production build as well)
If anyone is looking for a fix, https://github.com/jaskarth/structure-fixer can update the structures if placed in a folder for it, or modernfix https://www.curseforge.com/minecraft/mc-mods/modernfix can cache the updated structures so that the next time it tries to load the structure it wont fire off DFU. Either way, DFU would be used to load the structure the first time so either solution should not be done on a constrained server. ideally the mod dev would use either option to be sure their structures arent killing servers and clients due to DFU runaway.
Servers with hard OOM limits and containers should be using the -XX:MaxRAMPercentage= instead of xmx. I personally use 80 ( -XX:MaxRAMPercentage=80.0 ) as that seems to hold it below the cap on my memory allocation to allow all the off threads and non heap memory to function.
I'm not able to replicate the issue, but I'll create a 1.19.2 Fabric build using a new structure nbt with structure fixer and post it here so y'all can verify it fixes the issue. The new build will also have placeholders replaced with actual voids.
Turns out I don't have a build server ready for 1.19.2 (we jumped from 1.18.2 to 1.20), so instead I used the start.nbt structure from our 1.20 server after replacing the void placeholder blocks with regular void. In other words, the new start.nbt file is from a 1.20 save. I don't think that should cause any issues, and I imagine it should fix any issues with DFU introduced when using 1.18.x structure files in 1.19. Let me know if it works and I'll post a public release.
Beta release here: https://github.com/YUNG-GANG/YUNGs-Better-Ocean-Monuments/releases/tag/v2.1.1-beta0
Bump on this. If anyone is having this issue, please let me know if the beta above fixes it!
This does appear to resolve the memory issue. DFU still has a bit of work going on which will crash servers using default watchdog timers, but that appears to be par for the course for modders these days, relying on servers and clients to each dynamically load, convert, and reload structures just to worldgen rather than the build process. I appreciate you addressing the oom issue.
This mod is now no worse (and generally better) than other structure mods for its resource needs. I would suggest anyone running into server issues to be sure to install modernfix, pregenerate your world, and report any outdated structures to the mod devs.
A new version has been uploaded for 1.19.2 that removes the wool from the structure and replaces all structure NBT with up-to-date versions that should no longer trigger DFU. I've also done the same for all of my mods on 1.20.
Thanks for all the help, and please feel free to open another issue if the problem persists!