ViaVersion icon indicating copy to clipboard operation
ViaVersion copied to clipboard

Server restart is being frozen

Open WataLaker37821 opened this issue 1 year ago • 7 comments

/viaversion dump Output

https://dump.viaversion.com/6324355df9d3267baaab11822c167b6008dbdab85a2bf1d513ddb8e1b4e2d4c7

Console Error

https://mclo.gs/C7Sx3TO

Bug Description

When server restarts via console command, or its own power functions (using auto-restart feature of my hosting), it sometimes freezes on message: [ViaVersion] Disabling ViaVersion v5.0.0 [13:00:20] [Server thread/INFO]: [ViaVersion] ViaVersion is disabling, if this is a reload and you experience issues consider rebooting. and after this i have to start it manually

Steps to Reproduce

  1. Set auto-restart feature to send commands: restart, or stop and then start, or internal starting and stopping server hosting features

  2. Sometimes it freezes on its own, but in common works well

Expected Behavior

Viaversion should not stop a process of server's disabling and do not stop restarting process in total

Additional Server Info

Purpur 1.20.4 (build 2176) ViaBackwards and ViaVersion 5.0.0 (releases from Spigot)

When i tried 5.0.0 it was the latest release at the time, but still didnt fix this bug

Checklist

  • [X] Via plugins are only running on EITHER the backend servers (e.g. Paper) OR the proxy (e.g. Velocity), not on both.
  • [X] I have included a ViaVersion dump.
  • [X] If applicable, I have included a paste (not a screenshot) of the error.
  • [X] I have tried the latest build(s) from https://ci.viaversion.com/ and the issue still persists.

WataLaker37821 avatar Jun 23 '24 11:06 WataLaker37821

Platform: git--Purpur--2176%20%28MC%3A%201.20.4%29 ViaVersion: Outdated ViaBackwards: Outdated

Please update all Via* plugins from https://ci.viaversion.com/.In case the issue still persists send the new dump and the issue will be reopened

Barvalg avatar Jun 23 '24 11:06 Barvalg

https://dump.viaversion.com/9c5a42c9eafe9b042ad910641a44555f98dca9fb849e58839ad915eb5e5462b5

WataLaker37821 avatar Jun 23 '24 11:06 WataLaker37821

Platform: git--Purpur--2176%20%28MC%3A%201.20.4%29 ViaVersion (5.0.1): Even with master ViaBackwards(5.0.1): Even with master

Barvalg avatar Jun 23 '24 11:06 Barvalg

This seems to be caused by a bizarre race condition in the shutdown logic.

Kichura avatar Jun 23 '24 11:06 Kichura

This seems to be caused by a bizarre race condition in the shutdown logic.

What could be done to prevent this? Is it a hosting's problem or not?

WataLaker37821 avatar Jun 26 '24 10:06 WataLaker37821

UPD: it happened today, just now, 15 mins ago, used last builds i sent here

WataLaker37821 avatar Jun 26 '24 10:06 WataLaker37821

This seems to be caused by a bizarre race condition in the shutdown logic.

What could be done to prevent this? Is it a hosting's problem or not?

this has nothing to do with the server host itself.

Kichura avatar Jun 26 '24 17:06 Kichura

same

mxlt02 avatar Jul 06 '24 01:07 mxlt02

If I had kicked out all the players before shutting down the server, this problem would not have occurred

mxlt02 avatar Jul 09 '24 11:07 mxlt02

Please try taking a thread dump when it's halted https://www.baeldung.com/java-thread-dump

kennytv avatar Jul 09 '24 11:07 kennytv

Howdy, here's a thread dump when my server was halted due to this issue.

thread dump - https://pastebin.com/RXebC0G2

viaversion dump - https://dump.viaversion.com/564ed8d27c4d892c3e94c1d0d45dc29e50e631605f3f3d8db073b80cae953f39

Projecki avatar Jul 15 '24 16:07 Projecki

Platform: git--UniverseSpigot--%223fce19c%22%20%28MC%3A%201.20.4%29 ViaVersion (5.0.2-SNAPSHOT): Even with master ViaBackwards(5.0.2-SNAPSHOT): Even with master

Barvalg avatar Jul 15 '24 16:07 Barvalg

This seems to be an itemsadder issue

kennytv avatar Jul 16 '24 17:07 kennytv

ViaVersion saying ItemsAdder's fault. ItemsAdder saying not their fault. Neither developer cares about the problem and it's still happening..

imh3ro avatar Dec 09 '24 18:12 imh3ro

ViaVersion saying ItemsAdder's fault. ItemsAdder saying not their fault. Neither developer cares about the problem and it's still happening..

Even with this commit present?

Kichura avatar Dec 09 '24 18:12 Kichura

That commit doesn't change anything, this is verifiably an ItemsAdder issue with it doing unsafe chunk loads/chunk operations off-main, it's just that ViaVersion begins with a V and is thus last in the plugin logs

kennytv avatar Dec 09 '24 18:12 kennytv

That commit doesn't change anything, this is verifiably an ItemsAdder issue with it doing unsafe chunk loads/chunk operations off-main, it's just that ViaVersion begins with a V and is thus last in the plugin logs

Hey how can I verify this to be an ItemsAdder issue? I want to report it to the ItemsAdder so it can be fixed but I need to show that this actually is an ItemsAdder issue. Which I had no idea until I saw here.

imh3ro avatar Dec 13 '24 22:12 imh3ro

That commit doesn't change anything, this is verifiably an ItemsAdder issue with it doing unsafe chunk loads/chunk operations off-main, it's just that ViaVersion begins with a V and is thus last in the plugin logs

Hey how can I verify this to be an ItemsAdder issue? I want to report it to the ItemsAdder so it can be fixed but I need to show that this actually is an ItemsAdder issue. Which I had no idea until I saw here.

You would want to get a thread-dump when it happens which would likely indicate what is waiting (jstack is your friend) - https://www.baeldung.com/java-thread-dump

FormallyMyles avatar Dec 13 '24 22:12 FormallyMyles