ProtocolLib

3M Downloads

ProtocolLib 5.0 - Deadlocks & Server Crashes

SkyLicks opened this issue ยท 6 comments

commented
  • This issue is not solved in a development build

Describe the bug
The latest development build is causing deadlocks for me on my 1.12.2 paperspigot server.

To Reproduce
Steps to reproduce the behavior:
You can reproduce this effect with this code: https://pastebin.com/Sph1uMxc
(Will need to make minor changes to get this to work on your test plugin)

Expected behavior
No deadlocks.

Screenshots
image

Version Info
https://pastebin.com/z16vJxJM

Additional context
I will mention that the deadlock stops as soon as I get timed out or something. Also, maybe this spark report helps: https://spark.lucko.me/t72ja3Y1Y4

commented

This is not caused by ProtocolLib, seems like the underlying executor had some sort of issue. However, I can take a look what the method does in 1.12 and see if there is something that we can do to prevent the issue from happening.

commented

This is not caused by ProtocolLib, seems like the underlying executor had some sort of issue. However, I can take a look what the method does in 1.12 and see if there is something that we can do to prevent the issue from happening.

Ok great! Please let me know if there is anything I can do to help replicate this issue or something.

commented

Captured the deadlock with spark
https://spark.lucko.me/xlWZyW9Fg1

commented

In further testing, I found literally registering ANY listener in v1.12.2 causes a deadlock. Just put SuperVansh and ProtocolLib 5.0 together on a PaperSpigot 1.12.2 server to reproduce.

commented

After trying a couple of things, it looks like my paper jar was outdated. After I updated my paperspigot to the latest version I can now run protocol lib just fine. But this is what gave me the false impression that this was a 1.12.2 issue.

I'm really sorry for wasting your time. There must have been something in paper spigot itself and how paperspigot interacts with protocol lib in this particular version that was broken in the build I was using.

commented

I just looked into the paper code and cannot find the call to .submit(...) in the network manager class, which (as your stacktrace) suggesst is causing the issue. Furthermore I just tested adding packet listeners on 1.12 and there were no issues at all for me.