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

PlayerStatisticIncrementEvent called async at shutdown #2379

Closed
Rvby1 opened this issue Jul 27, 2019 · 5 comments
Closed

PlayerStatisticIncrementEvent called async at shutdown #2379

Rvby1 opened this issue Jul 27, 2019 · 5 comments
Labels
version: 1.14 Game version 1.14

Comments

@Rvby1
Copy link

Rvby1 commented Jul 27, 2019

Link/paste of stack trace

You can find the stack trace that occurs after the server times out here.

Plugin list:

AutoRestart, CoreProtect, DiscordSRV, Essentials, EssentialsAntiBuild, EssentialsChat, EssentialsGeoIP, EssentialsProtect, EssentialsSpawn, FastLeafDecay, GriefPrevention, Harbor, HorseTpWithMe, Jobs, LuckPerms, MarriageMaster, PlayerParticles, ProtocolLib, QuickShop, SAML, SuperVanish, Vault, VillagerOptimiser, WorldBorder, WorldEdit, WorldGuard

Actions to reproduce (if known):

Opening sunken chest located inside ship at -1162, 65, 5949 OR -1529, 64, 5891 causes the server to stall. Chat still works, and blocks will break and stay broken. However, broken blocks do not drop entities, and if players drop entities, they can not pick them up again. After 60 seconds of the server stalling, the server crashes per the timeout settings in the config.

Cannot absolutely confirm that the stalls only occur in r.3.11. However, players on my server have opened sunken chests in plenty of other regions without causing the server to stall and crash.

Other chests placed in the region do not cause the server to stall when opened. Have not confirmed this with naturally generated chests in the region.

Have not confirmed if other sunken ships in the region aside from the two listed cause the server to stall and crash.

You can find the region file and level.dat in this 7zip archive.

Paper build number:

git-Paper-135 (MC: 1.14.4)

@Rvby1 Rvby1 changed the title Server Crashes Upon Opening Sunken Chest Server Crashes Upon Opening Sunken Ship Chest Jul 27, 2019
@Rvby1 Rvby1 changed the title Server Crashes Upon Opening Sunken Ship Chest Server Stalls, Then Crashes Upon Opening Sunken Ship Chest Jul 27, 2019
@electronicboy
Copy link
Member

Duplicate of #2312

@electronicboy electronicboy marked this as a duplicate of #2312 Jul 27, 2019
@electronicboy electronicboy added the resolution: duplicate Issue or Request is a copy of an existing ticket. label Jul 27, 2019
@zachbr zachbr removed the resolution: duplicate Issue or Request is a copy of an existing ticket. label Jul 28, 2019
@zachbr
Copy link
Contributor

zachbr commented Jul 28, 2019

Relevant part of this ticket is the event being called from shutdown. That stacktrace is below. The watchdog shutdown cause is being tracked in 2312.

[20:38:36 WARN]: Exception in thread "Thread-2" java.lang.IllegalStateException: PlayerStatisticIncrementEvent may only be triggered synchronously.
[20:38:36 WARN]:        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:533)
[20:38:36 WARN]:        at org.bukkit.craftbukkit.v1_14_R1.event.CraftEventFactory.handleStatisticsIncrease(CraftEventFactory.java:1449)
[20:38:36 WARN]:        at net.minecraft.server.v1_14_R1.StatisticManager.b(StatisticManager.java:17)
[20:38:36 WARN]:        at net.minecraft.server.v1_14_R1.EntityPlayer.a(EntityPlayer.java:1287)
[20:38:36 WARN]:        at net.minecraft.server.v1_14_R1.EntityHuman.b(EntityHuman.java:1430)
[20:38:36 WARN]:        at net.minecraft.server.v1_14_R1.EntityHuman.a(EntityHuman.java:1422)
[20:38:36 WARN]:        at net.minecraft.server.v1_14_R1.PlayerList.disconnect(PlayerList.java:403)
[20:38:36 WARN]:        at net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:1481)
[20:38:36 WARN]:        at net.minecraft.server.v1_14_R1.PlayerConnection.disconnect(PlayerConnection.java:279)
[20:38:36 WARN]:        at net.minecraft.server.v1_14_R1.PlayerList.shutdown(PlayerList.java:1099)
[20:38:36 WARN]:        at net.minecraft.server.v1_14_R1.MinecraftServer.stop(MinecraftServer.java:737)
[20:38:36 WARN]:        at net.minecraft.server.v1_14_R1.DedicatedServer.stop(DedicatedServer.java:742)
[20:38:36 WARN]:        at net.minecraft.server.v1_14_R1.MinecraftServer.close(MinecraftServer.java:703)
[20:38:36 WARN]:        at org.bukkit.craftbukkit.v1_14_R1.util.ServerShutdownThread.run(ServerShutdownThread.java:17)

@zachbr zachbr reopened this Jul 28, 2019
@zachbr zachbr changed the title Server Stalls, Then Crashes Upon Opening Sunken Ship Chest PlayerStatisticIncrementEvent called async at shutdown Jul 28, 2019
@ImPrithibi
Copy link

Link/paste of stack trace

You can find the stack trace that occurs after the server times out here.

Plugin list:

AutoRestart, CoreProtect, DiscordSRV, Essentials, EssentialsAntiBuild, EssentialsChat, EssentialsGeoIP, EssentialsProtect, EssentialsSpawn, FastLeafDecay, GriefPrevention, Harbor, HorseTpWithMe, Jobs, LuckPerms, MarriageMaster, PlayerParticles, ProtocolLib, QuickShop, SAML, SuperVanish, Vault, VillagerOptimiser, WorldBorder, WorldEdit, WorldGuard

Actions to reproduce (if known):

Opening sunken chest located inside ship at -1162, 65, 5949 OR -1529, 64, 5891 causes the server to stall. Chat still works, and blocks will break and stay broken. However, broken blocks do not drop entities, and if players drop entities, they can not pick them up again. After 60 seconds of the server stalling, the server crashes per the timeout settings in the config.

Cannot absolutely confirm that the stalls only occur in r.3.11. However, players on my server have opened sunken chests in plenty of other regions without causing the server to stall and crash.

Other chests placed in the region do not cause the server to stall when opened. Have not confirmed this with naturally generated chests in the region.

Have not confirmed if other sunken ships in the region aside from the two listed cause the server to stall and crash.

You can find the region file and level.dat in this 7zip archive.

Paper build number:

git-Paper-135 (MC: 1.14.4)

Hey im planing to use it on 1.16.1 server. I dont know if it will work.

@aikar
Copy link
Member

aikar commented Jul 27, 2020

Events firing async was mostly handled in 1.15+, as this code is skipped off main thread.

sunken ship issue is still tracked as linked.

@aikar aikar closed this as completed Jul 27, 2020
@ImPrithibi
Copy link

Soo it wont work on 1.16?

@kashike kashike added the version: 1.14 Game version 1.14 label Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version: 1.14 Game version 1.14
Projects
None yet
Development

No branches or pull requests

6 participants