Crash ConcurrentModification
123Kappa opened this issue · 6 comments
Describe the bug
Server Randomly crashes.
To Reproduce
We have no idea how to reproduce it, it's something about ae2's energy.
Additional context
https://pastebin.com/nw3Lpzjf
Before the crash this was in logs:
https://pastebin.com/LaJxkqSZ
Environment
MP server, we are using sponge but i do not think that it is involved.
Project Ozone 3 modpack
- Minecraft Version: 1.12.2
- AE2 Version: rv6-stable-6
- Forge Version: 12.23.5.2838
It looks like sponge tried to optimize performance by multithreading a server tick, causing 2 grid updates at the same time, which normal Forge does not. So yes it is probably a Sponge issue.
Imagine 2 people trying to drive the same car at same time ... Doesn't work very well. Sometimes you're lucky, but more often than not you crash that car.
Well this crash report has been all over this github and people have reported it without sponge, so i am not quite sure.
I've done some testing and i have managed to replicate this.
The player who caused the crash had ae2 bridge. The first on was connected to his main base, and the other was connected somewhere else. The end outside of his base was connected to a dense cell.
When the player logged out and the chunkloaders that were chunkloading his base turned off the server crashed.
After further testing, when he removed the dense power cell from the other end the issue stopped.
Here's how the bridge looked like: https://pasteboard.co/Iv9XV5R.png
Yes, reported this same setup. Although, neither were chunk loaded. Without Sponge and in SP. No chunk loaders in use.
Duplicate of #3800
It looks like sponge tried to optimize performance by multithreading a server tick, causing 2 grid updates at the same time, which normal Forge does not. So yes it is probably a Sponge issue.
Imagine 2 people trying to drive the same car at same time ... Doesn't work very well. Sometimes you're lucky, but more often than not you crash that car.
It's pretty easy to blame sponge for every issue. People like you push the community back and leave bugs and crashes unsolved.
It looks like sponge tried to optimize performance by multithreading a server tick
Please don’t spread hypothetical assumptions as fact. Sponge never and will never try to multithread a game tick or any logic thereof (except async lighting, but that’s a separate case here). It’s shameful to just toss up a concurrent modification as “oh, it’s multithreading issues”, you can achieve the same in the same thread by accessing a Collection and modifying it downstream while a source is iterating over said collection. Example:
For each entity in list -> entity check if can breed -> an entity can breed and spawns a new entity adding to the list -> concurrent modification occurs because you’re iterating over the list already and someone downstream is modifying the list in the same thread.
I’m sorry to just run in like this, but it’s necessary to try and stop a spread of misinformation.