ProtocolLib

3M Downloads

ProtocolLib Issue Overnight (server console freezes)

cheesebobi opened this issue ยท 4 comments

commented

Describe the bug
I run a Modded Faction Server, inherently unstable as you'd expect, however, this newest issue has me beyond confused. The server has been running quite smoothly with no crashes and restarting without any issues. However, last night the server restarted and when booting back up froze on "[ProtocolLib] Started structure compiler thread." this sometimes would happen anyway but a simple restart often fixed it. I have tried restarting the server multiple times and every time it gets stuck on this issue. What makes matters worse is my online test server and home test server (both untouched since before the issue) have also both experienced the exact same issue. I have tried updating the plugin, and the server Jar (Magma) both to no solution.

From my testing it appears to be something to do with the plugin loading in around other plugins. For instance, on its own, launches without a hitch, however with luckPerms and Buycraft will freeze the console.

To Reproduce
Steps to reproduce the behavior:

  1. Go to "https://magmafoundation.org/" and install a 1.12.2 server JAR, from my experience any varient but most recent testing has been with Version: v32e7e1a-DEV Date: 2022-03-23T00:47:38Z
  2. Once installed add protocolLib (version 4.7.0 was originally on the server but with 4.8.0 the issue is still around)
  3. Server at this point should start with no issues, however when I added Buycraft and LuckPerms it would no longer load
    (Also other plugins seems to have this effect, these are just 2 I have narrowed down as repeating the problem the fastest, Worldedit, Worldguard and others seems to also reproduce the freeze but I had other plugins present)
  4. You will see the console run as normal, but after the "[ProtocolLib] Started structure compiler thread." the server freezes, cannot type in console or even press enter to refresh on my home test setup.

Expected behavior
The server starts, I've been running the modded faction server for a month with very few plugin changes/additions. In the time from the last successful restart to the newest there have been no plugin changes, config or JAR to the best of my knowledge. And on the online test server and home server there were 100% no changes since the last successful launch.

Screenshots
Home Server Showcase

Version Info
Provide your ProtocolLib install info with /protocol dump through pastebin.
Cannot be provided due to server console freeze, Protocol versions tested: 4.7.0 (initially when the issue first occurred) and 4.8.0 (after issue originally occurred)

Additional context
No additional context to give, feel free to contact me on discord and I will provide and help as much as I can, I'd appreciate the issue being looked into as the faction server has been rather successful and I don't want to lose my player base just yet.

commented

I have managed to fix the issue, for both ProtocolLib and Vault.

How to Fix:
Step 1: Install Magma 1.12.2 Version: vad7ca54-CUSTOM Date: 2021-07-08T19:40:39Z
Step 2: Use ProtocolLib v4.5.1
Step 3: Keep vault the same, vault is not a problem with the version changes.
Step 4: in ProtocolLib config change "background compiler: false" (This step might not be necessary for some)
Step 5: Start the server and relax as life breezes past, have a cup of tea, enjoy a walk outside.
Step 6: Go subscribe to cheesebobi on YouTube and watch his videos because you owe him for the fix ;p

Explanation of the problem to my understanding
Magma issued an update overnight, on the 23/03/2022 to various instances for the Magma Jar. Some servers and platform also automatically updated. During this latest update round some dependencies became missing for ProtocolLib and Vault making them freeze on load. Going back to the specific versions above has seemingly fixed the issue as the dependency is no longer missing / incorrect or maybe even required. So the Magma team needs to fix the dependency issue and update their latest Jar.

commented

Magma is not supported by ProtocolLib. However by looking at the source code there is no stuff executed after the "started structure compiler thread" which could potentially freeze the server. You can try creating a thread dump and see at which operation the server thread freezes.

commented

> Magma is not supported by ProtocolLib. However by looking at the source code there is no stuff executed after the "started structure compiler thread" which could potentially freeze the server. You can try creating a thread dump and see at which operation the server thread freezes.

I know sadly a lot of plugin devs overlook the platform, but based on my testing I assume its some sort of external dependency which might be easily enough fixed. However I do believe the issue might stem from a change in Magma as my other GitHub issue has been commented on by others having a similar issue with protocol lib and vault. But I am not sure.

Magma issue report for people looking:
https://github.com/magmafoundation/Magma/issues/530

commented

I know sadly a lot of plugin devs overlook the platform

Just to make this clear: ProtocolLib does a lot of stuff based on reflection internally which is very agile. A lot of these external forks do change a lot of stuff and try to "improve" things. Magma (and all other forge-hybrid platforms) are no exception. To make it easier to maintain and update to new minecraft versions without the need to check if these forks are breaking stuff they are marked as unsupported. (If they work that's nice, if they don't that's not a ProtocolLib issue)