Skip to content
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

Frequent ConcurrentModificationException potentially breaks capabilities of other mods #177

Closed
andriihorpenko opened this issue Aug 3, 2023 · 6 comments

Comments

@andriihorpenko
Copy link

Issue type:

  • 🐛 Bug

Short description:

There is an ongoing issue with Mekanism (mekanism/Mekanism#7831) and after some investigation we located an exception thrown to the log on server boot. More specifically, a ConcurrentModificationException exception with stacktrace pointing to CyclopsCore.
Little background: I run 5 servers and sometimes after a server reboot some Mekanism structure stop accepting liquid. I checked out logs of 5 servers and 3 out of 5 had a ConcurrentModificationException thrown. Interestingly, servers with that exception had problems with Mekanism, while the rest of them had no issues. This suggests that that might be the actual root cause.

Steps to reproduce the problem:

Unfortunately, there are no specific reproduction steps and this happens inconsistently. This happens 1 out of 3 server boots.

Expected behaviour:

Not potentially breaking capabilities of other mods on server load.


Versions:

  • This mod: 1.18.6
  • Minecraft: 1.19.2
  • Forge: 43.2.17

Log file:

Exceptions thrown on lines: 308, 400, 492
https://bytebin.lucko.me/zuCWjPaT0I

@rubensworks
Copy link
Member

Thanks for reporting!

@rubensworks
Copy link
Member

Hmm, something is definitely going wrong there indeed.

Note to self: bake is being called multiple times in parallel. Fix locking: https://github.com/CyclopsMC/CyclopsCore/blob/721b3af7a807d01226f034b039d92d3882c2ea7e/src/main/java/org/cyclops/cyclopscore/modcompat/capabilities/CapabilityConstructorRegistry.java#L339C5-L339C25

@rubensworks
Copy link
Member

@andriihorpenko The issue should be fixed in the last commit. Before I publish this release, could you try out the latest dev build to confirm that it fixes the problem on your end?

@andriihorpenko
Copy link
Author

Sure, I will install it on all servers and let you know how it goes. It may take some time to test it out, hopefully not more than a day.
Thanks for a rapid response!

@andriihorpenko
Copy link
Author

@rubensworks you can safely publish this build. There is no ConcurrentModificationException exception present on any of my production servers.

@rubensworks
Copy link
Member

Excellent, thanks for checking!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants