a strange server crash may connect to ProcotolLib DeadLock
290qthfsgghredv opened this issue ยท 0 comments
Describe the bug
Hi,my server just crash.
This phenomenon is very rare. It happened once after we opened it for half a month
This is a main thread crash, and I noticed that the stack of the main thread is particularly strange
As follows:
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: ------------------------------
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: Server thread dump (Look for plugins here before reporting to Mohist!):
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: ------------------------------
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: Current Thread: Server thread
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: PID: 35 | Suspended: false | Native: false | State: RUNNABLE
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: Stack:
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.ChannelOutboundBuffer.addFlush(ChannelOutboundBuffer.java:153)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:900)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.embedded.EmbeddedChannel$EmbeddedUnsafe$1.flush(EmbeddedChannel.java:827)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1396)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:776)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:768)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:749)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.ChannelOutboundHandlerAdapter.flush(ChannelOutboundHandlerAdapter.java:115)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:776)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:768)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:749)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.ChannelDuplexHandler.flush(ChannelDuplexHandler.java:117)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:776)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:768)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:749)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.DefaultChannelPipeline.flush(DefaultChannelPipeline.java:1013)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.AbstractChannel.flush(AbstractChannel.java:248)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.embedded.EmbeddedChannel.flushOutbound0(EmbeddedChannel.java:456)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.embedded.EmbeddedChannel.writeOutbound(EmbeddedChannel.java:395)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: net.minecraftforge.fml.common.network.FMLEmbeddedChannel.generatePacketFrom(FMLEmbeddedChannel.java:69)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.getEntitySpawningPacket(FMLNetworkHandler.java:159)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: net.minecraft.entity.EntityTrackerEntry.func_151260_c(EntityTrackerEntry.java:559)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: net.minecraft.entity.EntityTrackerEntry.func_73117_b(EntityTrackerEntry.java:422)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: net.minecraft.entity.EntityTracker.func_85172_a(EntityTracker.java:398)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: net.minecraft.server.management.PlayerChunkMapEntry.func_187278_c(PlayerChunkMapEntry.java:176)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: net.minecraft.server.management.PlayerChunkMapEntry.func_187276_a(PlayerChunkMapEntry.java:74)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: net.minecraft.server.management.PlayerChunkMap.func_72683_a(PlayerChunkMap.java:314)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: net.minecraft.server.management.PlayerList.func_72375_a(PlayerList.java:370)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: net.minecraft.server.management.PlayerList.playerLoggedIn(PlayerList.java:507)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: net.minecraft.server.management.PlayerList.initializeConnectionToPlayer(PlayerList.java:243)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:259)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.access$100(NetworkDispatcher.java:70)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.func_73660_a(NetworkDispatcher.java:204)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:298)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:196)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:922)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:461)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:778)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: net.minecraft.server.MinecraftServer.run(MinecraftServer.java:624)
[10:19:36] [Mohist Watchdog Thread/ERROR] [Mohist]: java.lang.Thread.run(Thread.java:748)
At the beginning, I tried to check all the plug-ins and mods that may lead to the crash of the server, but I didn't find anything.
And I have a preliminary understanding of the working mechanism of netty, but I still haven't found anything.
However, I found the following in the complete stack output:
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: ------------------------------
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: Current Thread: Netty Epoll Server IO #3
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: PID: 106 | Suspended: false | Native: false | State: BLOCKED
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: Stack:
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: com.comphenix.protocol.injector.netty.ProtocolInjector$1.initChannel(ProtocolInjector.java:155)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:113)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:105)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:637)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:235)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:409)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:396)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: com.comphenix.protocol.injector.netty.ProtocolInjector$2.initChannel(ProtocolInjector.java:175)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:113)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:105)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:637)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.DefaultChannelPipeline.access$000(DefaultChannelPipeline.java:46)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.DefaultChannelPipeline$PendingHandlerAddedTask.execute(DefaultChannelPipeline.java:1487)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.DefaultChannelPipeline.callHandlerAddedForAllHandlers(DefaultChannelPipeline.java:1161)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.DefaultChannelPipeline.invokeHandlerAddedIfNeeded(DefaultChannelPipeline.java:686)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:510)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(AbstractChannel.java:423)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:482)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:309)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
[10:19:37] [Mohist Watchdog Thread/ERROR] [Mohist]: java.lang.Thread.run(Thread.java:748)
And I found a sentence in the 4.8.0 update log of protocollib: "fixed entity Tracker"
So I was wondering if it was possible that the incomplete repair of protocollib caused this problem
To Reproduce
I just entered the server normally, and then I found that the whole server was stuck (the same symptom as the pause of the main thread). About a few minutes later, watchdog triggered and killed the server process.
It cannot be reproduced manually. I have tried to reproduce this problem as much as possible, but it has never been triggered by me
Expected behavior
Don't want this collapse to happen again
Additional context
The complete crash log is as follows:
https://pastebin.com/7YaHadnV
And my ProtocolLib version is: 4.8.0