Crash on server start-up
SlimeDog opened this issue ยท 10 comments
WorldEdit Version
See below for full platform/environment
Platform Version
See below for full platform/environment
Bug Description
Server start-up fails with hard crash. The environment and smallest plugin subset to produce the crash is described below. Issue is identified in log as some other plugin (depending on the plugin mix, I can make it identify with many plugins -- in this case, Multiverse-Core) but the cause is interaction with the latest WorldEdit builds (since 5707). WE builds 5705 (and previous) do not exhibit this behavior.
In same environment, except Paper, server starts successfully.
Expected Behavior
No crash.
Reproduction Steps
- Reduce plugin load to smallest subset to produce the crash, on Spigot
- Update to WorldEdit 7.3.0-SNAPSHOT+5707-3479f16
- Start server
Take 1
Environment
CentOS Linux release 7.9.2009 (Core)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.10+8-LTS-162, mixed mode)
Spigot 3019-Spigot-bff5261-ee5006d (MC: 1.16.5)
Skript version 2.5.3
Multiverse-Core version 4.2.3-SNAPSHOT-b835
WorldEdit 7.3.0-SNAPSHOT+5705-5b2c4fd
Start-up invocation
screen -dmS mc-server java -Xms8G -Xmx8G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -Dfile-encoding=UTF-8 -jar server.jar nogui --universe ./UNIVERSE
Result
Server start-up is successful.
Take 2
Environment
Same environment and process, except replace Spigot with
git-Paper-545 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
Result
Server start-up is successful.
Take 3
Environment
Original Spigot environment and process, except update to
WorldEdit 7.3.0-SNAPSHOT+5707-3479f16
Result
Server start-up fails with hard crash.
Logs
Server log: [URL ELIDED]
Crash log: [URL ELIDED]
After some investigation, I discovered the root cause to be Spigot semi-starting the watchdog prior to plugins enabling, and our call to tick the watchdog full starts it and causes it to timeout. Unfortunately the fix on our end isn't super easy, but I don't know if Spigot would accept an upstream PR to fully disable the watchdog regardless of calls to tick it as that's implementation details.
Thanks for the review. I will be patient for a solution. Until then WE is stuck at 5705 on Spigot, at least with fairly standard plugin mix. Obviously, the watchdog-tick behavior changed at WE 5707. I assume the reason for that change makes reversion to the previous behavior unwelcome. :(
Yes, it was a fix for #1624
There must be a way to fix #1624 without crashing the server from another direction.
If Spigot uses the same mechanism as Paper, then yes :)
Otherwise we need some reflection hacks for Spigot, which are prone to breaking in the future.
I would have to surmise that it doesn't, since the process isn't broken on Paper. Remember, "Paper retains compatibility with plugins written for Spigot and Bukkit." The reverse clearly is not true (I appreciate that WE prefers Paper).
Worked around in 3d95a48
yes, that would be because we haven't merged the branch in again yet, see https://github.com/EngineHub/WorldEdit/compare/version/7.2.x