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

1.19+ Crash Bug #1686

Open
1 task done
Kowaman opened this issue Sep 21, 2024 · 1 comment
Open
1 task done

1.19+ Crash Bug #1686

Kowaman opened this issue Sep 21, 2024 · 1 comment
Labels

Comments

@Kowaman
Copy link

Kowaman commented Sep 21, 2024

Bug report

  • I have checked other issues to make sure this is not a duplicate.

Describe the bug

MyPet appears to have a server crash bug in 1.20.6 and 1.21 (haven't tested earlier versions, but the code that causes this appears to be a 1.19+ listener): https://mclo.gs/vtzhHcV

It looks like it blocks a netty thread while it asks for the main thread to do some entity related logic on the Clientbound use entity packet, however the main thread may at the same time be blocked while it is waiting on a netty thread to to setup a new player, if this is the same netty thread it creates a deadlock.

Main thread freeze: https://mclo.gs/vtzhHcV#L913
MyPet calling the main thread from the netty thread: https://mclo.gs/vtzhHcV#L3359
MyPet throwing an warning once server initiates shutdown: https://mclo.gs/vtzhHcV#L3844

Problematic line of code (though anything calling ensureMainThread within a packet listener will likely cause this issue): https://github.com/MyPetORG/MyPet/blob/master/modules/Plugin/src/main/java/de/Keyle/MyPet/util/hooks/ProtocolLibHook.java#L139

To Reproduce

  1. Have players log in while entities are being interacted with.
  2. Is a bit random due to the amount of netty threads, the blocked thread needs to be the same thread that the main server thread is waiting on.

Additional context

Bukkit/Spigot/Bungee Build/Version: Purpur 1.21.1-2308-ver/1.21.1@8332fa4

MyPet Build/Version: MyPet-3.12-SNAPSHOT-B1765

@Jakllp
Copy link
Member

Jakllp commented Oct 3, 2024

I included the PR (#1687) in 3.12-SNAPSHOT-B1768 so it can now be tested

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

No branches or pull requests

2 participants