Closed brickmonster closed 4 months ago
The "Called safeShutdown" throwable isn't present in paper, that's just for me.
You effectively give us nothing really to work with besides a StackOverflow. Usually the Exception gives you a hint where to start looking at. But it's pretty hard for us to figure stuff out without plugins. Besides that you are running on a fork. So you are generally on your own. Try to reproduce with paper and binary search the plugins. Lastly you are most likely running in offline mode. I give you the benefit of the doubt that you are running offline mode for testing. The fact that the error occurred when disabling Protocol lib indicates that it might have something to do with that.
@electronicboy Yeah that's the upstream commit I'm referencing, it's the only thing I have to go on at the moment.
@Leguan16 I've just tested in online mode with no third-party plugins or proxy, and I still get the error. I think you mistook placeholderapi for protocollib? I don't have protocollib and only mess with packets when it comes to the tablist. I'm working rn to cut out some more internals.
Ig this issue is partly wishful thinking that somebody just hadn't noticed yet.
I think you mistook placeholderapi for protocollib?
Oops yeah I misread that. And I think electronicboy already answered your question with the link. I wasn't aware of that issue :)
Lesson learned; don't be lazy, use a thread for long-running daemon tasks instead of the task scheduler with a fake plugin. Not a clue how that caused it to get stuck in a packet handler though, that's completely opaque to me.
I'm no longer sleepy and I have confirmed this on the latest paper (This server is running Paper version git-Paper-478 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 5436d44)) with default config and no plugins.
There must be at least one player online. That player must be moving. It's easiest to trigger if you run /stop while falling but it's not 100% reliable.
Here's a paper stacktrace: https://paste.gg/p/anonymous/8c31d84c7ba84b4eb182e70639244fae Below is another stacktrace with some additional logging I added.
[m[33;1m[13:22:46.527 WARN]: [bricko/PacketLogging] RECV: ServerboundMovePlayerPacket$Pos (-345550969)
[m[33;1m[13:22:46.528 WARN]: [log-bukkit-events-noisy] Fire event: PlayerMoveEvent
[m[33;1m[13:22:46.542 WARN]: [log-bukkit-events-noisy] Fire event: ServerTickStartEvent
[m[33;1m[13:22:46.543 WARN]: [log-bukkit-events-noisy] Fire event: PlayerNaturallySpawnCreaturesEvent
[m[33;1m[13:22:46.543 WARN]: [log-bricko-events-noisy] Fire event: WorldTickStopEventImpl{tick=142,world=WorldImpl{name=startup_world,uuid=9881c91b-3a82-4367-9103-9464e9da4f61,id=minecraft:overworld}}
[m[33;1m[13:22:46.545 WARN]: [log-bukkit-events] Fire event: ChunkLoadEvent
[m[33;1m[13:22:46.545 WARN]: [log-bukkit-events-noisy] Fire event: EntitiesLoadEvent
[m[33;1m[13:22:46.545 WARN]: [log-bukkit-events] Fire event: ChunkLoadEvent
[m[33;1m[13:22:46.545 WARN]: [log-bukkit-events-noisy] Fire event: EntitiesLoadEvent
[m[33;1m[13:22:46.545 WARN]: [log-bukkit-events-noisy] Fire event: ServerTickEndEvent
[m[13:22:46.554 INFO]: [org.bukkit.craftbukkit.v1_20_R3.util.ServerShutdownThread] Received shutdown signal
[33;1m[13:22:46.562 WARN]: Called safeShutdown(wait=false)
java.lang.Throwable: Called safeShutdown
at net.minecraft.server.MinecraftServer.safeShutdown(MinecraftServer.java:1067) ~[paper-1.20.4.jar:git-Paper-"32bba4b"]
at org.bukkit.craftbukkit.v1_20_R3.util.ServerShutdownThread.run(ServerShutdownThread.java:17) ~[paper-1.20.4.jar:git-Paper-"32bba4b"]
[m[13:22:46.592 INFO]: Stopping server
[m[33;1m[13:22:46.594 WARN]: [bricko/PacketLogging] RECV: ServerboundMovePlayerPacket$Pos (-345550969)
[m[31;1m[13:22:46.594 ERROR]: [bricko/PlayerConnection] 10 deep
java.lang.Throwable: 10 deep
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleMovePlayer(ServerGamePacketListenerImpl.java:1331) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.handle(ServerboundMovePlayerPacket.java:29) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.handle(ServerboundMovePlayerPacket.java:66) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:54) ~[bricko.mc.Main:?]
at net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:100) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:47) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:42) ~[bricko.mc.Main:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleMovePlayer(ServerGamePacketListenerImpl.java:1335) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.handle(ServerboundMovePlayerPacket.java:29) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.handle(ServerboundMovePlayerPacket.java:66) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:54) ~[bricko.mc.Main:?]
at net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:100) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:47) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:42) ~[bricko.mc.Main:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleMovePlayer(ServerGamePacketListenerImpl.java:1335) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.handle(ServerboundMovePlayerPacket.java:29) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.handle(ServerboundMovePlayerPacket.java:66) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:54) ~[bricko.mc.Main:?]
at net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:100) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:47) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:42) ~[bricko.mc.Main:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleMovePlayer(ServerGamePacketListenerImpl.java:1335) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.handle(ServerboundMovePlayerPacket.java:29) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.handle(ServerboundMovePlayerPacket.java:66) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:54) ~[bricko.mc.Main:?]
at net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:100) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:47) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:42) ~[bricko.mc.Main:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleMovePlayer(ServerGamePacketListenerImpl.java:1335) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.handle(ServerboundMovePlayerPacket.java:29) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.handle(ServerboundMovePlayerPacket.java:66) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:54) ~[bricko.mc.Main:?]
at net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:100) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:47) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:42) ~[bricko.mc.Main:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleMovePlayer(ServerGamePacketListenerImpl.java:1335) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.handle(ServerboundMovePlayerPacket.java:29) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.handle(ServerboundMovePlayerPacket.java:66) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:54) ~[bricko.mc.Main:?]
at net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:100) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:47) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:42) ~[bricko.mc.Main:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleMovePlayer(ServerGamePacketListenerImpl.java:1335) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.handle(ServerboundMovePlayerPacket.java:29) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.handle(ServerboundMovePlayerPacket.java:66) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:54) ~[bricko.mc.Main:?]
at net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:100) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:47) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:42) ~[bricko.mc.Main:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleMovePlayer(ServerGamePacketListenerImpl.java:1335) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.handle(ServerboundMovePlayerPacket.java:29) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.handle(ServerboundMovePlayerPacket.java:66) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:54) ~[bricko.mc.Main:?]
at net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:100) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:47) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:42) ~[bricko.mc.Main:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleMovePlayer(ServerGamePacketListenerImpl.java:1335) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.handle(ServerboundMovePlayerPacket.java:29) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.handle(ServerboundMovePlayerPacket.java:66) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:54) ~[bricko.mc.Main:?]
at net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:100) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:47) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:42) ~[bricko.mc.Main:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleMovePlayer(ServerGamePacketListenerImpl.java:1335) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.handle(ServerboundMovePlayerPacket.java:29) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.handle(ServerboundMovePlayerPacket.java:66) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:54) ~[bricko.mc.Main:?]
at net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:100) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:47) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:42) ~[bricko.mc.Main:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleMovePlayer(ServerGamePacketListenerImpl.java:1335) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.handle(ServerboundMovePlayerPacket.java:29) ~[bricko.mc.Main:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.handle(ServerboundMovePlayerPacket.java:66) ~[bricko.mc.Main:?]
at net.minecraft.network.Connection.genericsFtw(Connection.java:314) ~[bricko.mc.Main:?]
at net.minecraft.network.Connection.channelRead0(Connection.java:294) ~[bricko.mc.Main:?]
at net.minecraft.network.Connection.channelRead0(Connection.java:61) ~[bricko.mc.Main:?]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.handler.flow.FlowControlHandler.dequeue(FlowControlHandler.java:202) ~[netty-handler-4.1.97.Final.jar:4.1.97.Final]
at io.netty.handler.flow.FlowControlHandler.channelRead(FlowControlHandler.java:164) ~[netty-handler-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) ~[netty-handler-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.handler.flush.FlushConsolidationHandler.channelRead(FlushConsolidationHandler.java:152) ~[netty-handler-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:800) ~[netty-transport-classes-epoll-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:509) ~[netty-transport-classes-epoll-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:407) ~[netty-transport-classes-epoll-4.1.97.Final.jar:4.1.97.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
at java.lang.Thread.run(Unknown Source) ~[?:?]
[m[13:22:46.597 INFO]: Saving players
[13:22:46.598 INFO]: brickmonster lost connection: Server is restarting. Rejoin in 2 minutes.
[33;1m[13:22:46.598 WARN]: [log-bukkit-events] Fire event: PlayerStatisticIncrementEvent
[m[33;1m[13:22:46.599 WARN]: [log-bukkit-events] Fire event: PlayerQuitEvent
[m[33;1m[13:22:46.602 WARN]: [log-bukkit-events] Fire event: InventoryCloseEvent
[m[33;1m[13:22:46.605 WARN]: [log-bukkit-events] Fire event: EntityRemoveFromWorldEvent
[m[13:22:46.606 INFO]: brickmonster left the game
[33;1m[13:22:46.610 WARN]: java.lang.StackOverflowError
[m[33;1m[13:22:46.610 WARN]: at java.base/java.lang.invoke.DirectMethodHandle.allocateInstance(Unknown Source)
[m[33;1m[13:22:46.610 WARN]: at bricko.mc.Main//net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:47)
[m[33;1m[13:22:46.610 WARN]: at bricko.mc.Main//net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:42)
[m[33;1m[13:22:46.610 WARN]: at bricko.mc.Main//net.minecraft.server.network.ServerGamePacketListenerImpl.handleMovePlayer(ServerGamePacketListenerImpl.java:1335)
[m[33;1m[13:22:46.610 WARN]: at bricko.mc.Main//net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.handle(ServerboundMovePlayerPacket.java:29)
[m[33;1m[13:22:46.610 WARN]: at bricko.mc.Main//net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.handle(ServerboundMovePlayerPacket.java:66)
[m[33;1m[13:22:46.610 WARN]: at bricko.mc.Main//net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:54)
[m[33;1m[13:22:46.610 WARN]: at bricko.mc.Main//net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:100)
[m[33;1m[13:22:46.610 WARN]: at bricko.mc.Main//net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:47)
[m[33;1m[13:22:46.610 WARN]: at bricko.mc.Main//net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(PacketUtils.java:42)
[m[33;1m[13:22:46.610 WARN]: at bricko.mc.Main//net.minecraft.server.network.ServerGamePacketListenerImpl.handleMovePlayer(ServerGamePacketListenerImpl.java:1335)
[m[33;1m[13:22:46.610 WARN]: at bricko.mc.Main//net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.handle(ServerboundMovePlayerPacket.java:29)
[m[33;1m[13:22:46.610 WARN]: at bricko.mc.Main//net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.handle(ServerboundMovePlayerPacket.java:66)
[m[33;1m[13:22:46.610 WARN]: at bricko.mc.Main//net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:54)
<snip> it's a very long recursive stack trace
[m[13:22:46.706 INFO]: Saving worlds
[m[13:22:46.713 INFO]: Saving chunks for level 'ServerLevel[startup_world]'/minecraft:overworld
[m[13:22:46.750 INFO]: [ChunkHolderManager] Waiting 60s for chunk system to halt for world 'startup_world'
[m[13:22:46.758 INFO]: [ChunkHolderManager] Halted chunk system for world 'startup_world'
[m[13:22:46.771 INFO]: [ChunkHolderManager] Saving all chunkholders for world 'startup_world'
[m[13:22:47.314 INFO]: ThreadedAnvilChunkStorage (startup_world): All chunks are saved
[m[13:22:47.319 INFO]: ThreadedAnvilChunkStorage: All dimensions are saved
[m[13:22:47.325 INFO]: Saving usercache.json
[m[13:22:47.330 INFO]: Flushing Chunk IO
[m[13:22:47.335 INFO]: Closing Thread Pool
[m[13:22:47.340 INFO]: Closing Server
https://github.com/PaperMC/Paper/pull/10408 - should solve this issue. The patch on our side basically causes an issue as it tries to immediately execute the callback due to the server stopping, which runs off the main thread, which then causes issues because, we're off the main thread, so the packet handler tries to reschedule a callback onto the main thread, which immediately executes because we're stopping...
removing that patch fixes the issue, but, I also implemented an alternative solution to what that patch was trying to solve
Thanks :)
Stack trace
Plugin and Datapack List
Lots of private plugins
Actions to reproduce (if known)
Run /stop with at least one player online
Paper version
Private fork of Paper-467 - Updated Upstream (Bukkit/CraftBukkit) (https://github.com/PaperMC/Paper/pull/10379)
Other
The version above is the first paper commit where the issue appears. The commit is a re-base of upstream that, among other things, removes a mitigation for MC-142590 with the exact same symptoms as this issue.
The line numbers in the stack trace are probably wrong because it's a fork, but the fork does not contain any changes in the offending functions.
I'm open to it being an issue with my fork (nobody else has reported it that I saw) but the mitigation removal seems far more likely to be the cause and I'm just triggering it more frequently than others somehow.
The server is behind Waterfall but I doubt that's relevant.