-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.1.3 constant server crash - ConcurrentModificationException #406
Comments
We have had this crash reported a lot recently. It has been observed in ATM8 and ATM9 - Here's the stack trace so that people searching for this bug have a chance to find this ticket:
The most likely cause is that a chunk is being added to the Chunk Cache in an unsafe manner. As best I can tell the CME is triggered while lighting on the chunks is being updated. As this is being triggered by players I suspect that a mod on the client is requesting chunk data for a chunk that is not in the cache and on the server that mod is getting that chunk loaded into the cache. JourneyMap was mentioned by a player as being possibly involved but we have also seen the crash happen when players join and haven't had a chance to open the map. I'm going to try a few things to see if I can re-create the crash. Possibly having a client view distance greater than the server's distance settings will trigger it. |
I have been unable to re-create the crash by increasing the view distance and using the JourneyMap map screen. I have tried on I'm starting to think that it may be related to world generation. Not chunk generation itself but possibly some sort of lazy population that may happen later. Something that only triggers once a player comes near but also requires chunks to be loaded to complete. The scenario would be:
There is a very large dungeon placed by the Dungeon Crawl mod under the location that was crashing on the |
Didn't spot anything in Dungeon Crawl issues or code that could be related, so I checked the debug log for the time of the crash: The player is part of a team that has forced chunks. When one of these chunks it appears to be triggering world generation. ModernFix reports that is is using cached structure files that have been data-fixed:
This chunk is actually at the location of the player when they crashed. This supports the idea that this is world-gen related. Will need to see if Structory and Iron's Spellbooks do anything extra with their structures. |
I wanted to bump this issue as it is something that I have run into quite a lot as well |
We get the same issue on 0.2.11, just keep crashing every minutes on an integrated server. The crash log seems a lot like the one uploaded earlier |
I'm facing the same problem. Can't figure out exactly which mod is causing this. So I quickly made a simple mod that just replaces the problematic HashSet with a ConcurrentHashSet instead whenever a ServerLevel is loaded. |
I'm seeing a similar concurrent modification crash when a friend attacked a Apotheosis boss skeleton:
This is causing the server to crash any time someone loads into the dimension the skeleton is in. Edit: Deleting the dimension didn't help. It's still crashing when the person in question that was fighting the mob logs in. |
@ImVexed |
@shBLOCK is the source available for these fixes somewhere? I try to make it a habit to not download pre-compiled binaries. |
@ImVexed Yes, that is a good habit. |
@shBLOCK appreciate it, haven't had any crashes yet doing the same activity anymore. |
Can confirm that this fix worked for me. I was starting to see this on the latest version (at time of writing, 0.2.51) on my dedicated server whenever a player logged in. |
Going to bump this issue, appears the fix provided works! Thanks for that @shBLOCK! Going to leave my logs here in case that helps someone find the underlying issue: Last server logs: https://mclo.gs/857DZaN |
Pretty weird bug... Thank you so much @shBLOCK! This seems to have resolved the issue for me as well. |
How does one install it on a dedicated server, does every player need to install the jar? |
Just the server needs it, copy the .jar file into the |
Thanks for the quick reply, will try :) |
Hi, I'm not sure if I can ask here, but I'm having the exact same issue on 1.18.2, is there any way I could get this fix for that version? |
You can give the following a try. I've just taken the files provided by @shBLOCK and recompiled them for 1.18.2. Built No guarantees but I think this will work. |
Thank you so much! The mod seems to load properly, I'll let you know if it works :) |
Yeah, definitely let me know. If it works I might create a repository, with @shBLOCK's permission, to hold the code for the various different versions of this patch. Especially since this seems to be a greater issue than just with ATM9. |
Yup, it works great, thank you again! :) |
Yes, I do approve that. |
Repository is up at https://github.com/glektarssza/minecraft-distance-manager-concurrent-fix. Currently in the process of setting up builds for 1.18.x but the 1.20.x branch should be live. I'll upload to Modrinth and CurseForge later today. |
the repository is gone, im having this issue in my own modpack in the end, can this be ported to 1.19.2? same exact error and crash on loading a chunk, even after deleting the dim |
When updating from 0.1.2 to 0.1.3 suddenly the otherwise stable running server now crashes on every chunk saving.
crash-2023-09-19_01.19.24-server.txt
crash-2023-09-19_01.29.23-server.txt
The text was updated successfully, but these errors were encountered: