RandomPatches (Forge)

RandomPatches (Forge)

56M Downloads

error loop when someone gets disconnected

msglm opened this issue ยท 15 comments

commented

if someone gets disconnected for one reason or another this error happens on loop, taking up a lot of the ram.

[18:10:31] [Netty Server IO #3/ERROR] [FML]: NetworkDispatcher exception
java.io.IOException: An existing connection was forcibly closed by the remote host
        at sun.nio.ch.SocketDispatcher.writev0(Native Method) ~[?:1.8.0_171]
        at sun.nio.ch.SocketDispatcher.writev(Unknown Source) ~[?:1.8.0_171]
        at sun.nio.ch.IOUtil.write(Unknown Source) ~[?:1.8.0_171]
        at sun.nio.ch.SocketChannelImpl.write(Unknown Source) ~[?:1.8.0_171]
        at io.netty.channel.socket.nio.NioSocketChannel.doWrite(NioSocketChannel.java:432) ~[NioSocketChannel.class:?]
        at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:856) [AbstractChannel$AbstractUnsafe.class:?]
        at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.forceFlush(AbstractNioChannel.java:368) [AbstractNioChannel$AbstractNioUnsafe.class:?]
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:618) [NioEventLoop.class:?]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:559) [NioEventLoop.class:?]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:476) [NioEventLoop.class:?]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438) [NioEventLoop.class:?]
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [SingleThreadEventExecutor$5.class:?]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_171]
commented

I have discovered if someone gets disconnected via crashing, time out, etc it will start spamming the error.

commented

Does this occur without RandomPatches? Because I've had this problem too, and I think it was to do with another mod.

commented

it does not occur with the mod removed, but this is also a major fix to my server because otherwise we get different errors. Sometimes the error loop gets so bad that I wont be able to type in the server console or input anything at all.

commented

Alright, I'll have a look.

commented

Can I have some more details? How much RAM have you allocated to the server?

commented

will send start.bat and modlist

@echo off
java -jar forge-1.12.2-14.23.4.2705-universal.jar nogui -Xmx2048M -Xms5048M -XX:NewSize=512M -XX:MaxNewSize=1G -XX:SurvivorRatio=2 -XX:+DisableExplicitGC -d64 -XX:+UseConcMarkSweepGC -XX:+AggressiveOpts -XX:SurvivorRatio=2 -XX:+DisableExplicitGC -d64 -XX:+UseConcMarkSweepGC -XX+AggressiveOpts
pause

my mod list is all of these
aether_legacy-1.12.2-v3.0
buildcraft-7.99.17
ChestTransporter-1.12.2-2.8.8
FlatBedrock-1.4.0_1.12
gravestone-1.10.1
industrialcraft-2-2.8.73-ex112
ironchest-1.12.2-7.0.42.827
jei_1.12.2-4.9.1.172
Mantle-1.12-1.3.2.24
ProjectE-1.12-PE1.3.0
Tinkers-Construct-Mod-1.12.2
Vein-Miner-Mod-1.12

Links to each mod for testing:
https://minecraft.curseforge.com/projects/buildcraft/files/2560476
http://www.9minecraft.net/tinkers-construct-mod/
https://minecraft.curseforge.com/projects/gravestone-mod/files/2524880
https://minecraft.curseforge.com/projects/mantle/files/2550550
http://www.9minecraft.net/vein-miner-mod/
https://minecraft.curseforge.com/projects/jei/files/2556235
https://minecraft.curseforge.com/projects/aether-legacy/files/2553665
https://minecraft.curseforge.com/projects/industrial-craft/files/2547175
https://minecraft.curseforge.com/projects/chest-transporter/files/2524058
https://minecraft.curseforge.com/projects/projecte/files/2557247
https://minecraft.curseforge.com/projects/iron-chests/files/2550378
https://minecraft.curseforge.com/projects/flatbedrockx/files/2440978
https://minecraft.curseforge.com/projects/hammer-core/files/2569991
https://minecraft.curseforge.com/projects/expanded-equivalence/files/2570042

commented

Your Xmx is smaller than your Xms and you have a couple duplicate arguments. Your max RAM is 2048MB, but your minimum RAM is 5048MB. Also, I recommend not using 9Minecraft since they reupload mods without the authors' permission. Tinkers' Construct and Vein Miner can both be found on CurseForge.
Could you fix these issues and see if the problem still occurs?

commented

okay, I know 9minecraft is a re upload site and I used it in the beginning as I did not know much about modding. Exchanged vein miner with ore excavation (https://minecraft.curseforge.com/projects/ore-excavation/files/2552367) and tinkers with this versoin (https://minecraft.curseforge.com/projects/tinkers-construct/files/2568000).
swapped the values of the min and max of ram. About to launch and test.

commented

Exception in thread "Server Watchdog" Jun 10, 2018 10:42:26 PM io.netty.util.ResourceLeakDetector reportUntracedLeak
SEVERE: LEAK: ByteBuf.release() was not called before it's garbage-collected. Enable advanced leak reporting to find out where the leak occurred. To enable advanced leak reporting, specify the JVM option '-Dio.netty.leakDetection.level=advanced' or call ResourceLeakDetector.setLevel() See http://netty.io/wiki/reference-counted-objects.html for more information.

This error has happended with your mod, I think the error loop was my fault.

commented

If you're still having this problem, could you try 1.12.2-1.2.0.0?

commented

thanks man, going to try it out today. I hope it works.

commented

Jun 14, 2018 11:12:58 PM io.netty.util.ResourceLeakDetector reportUntracedLeak
SEVERE: LEAK: ByteBuf.release() was not called before it's garbage-collected. Enable advanced leak reporting to find out where the leak occurred. To enable advanced leak reporting, specify the JVM option '-Dio.netty.leakDetection.level=advanced' or call ResourceLeakDetector.setLevel() See http://netty.io/wiki/reference-counted-objects.html for more information.

This is still a leak that is happening.

commented

also the error happens but it does not loop.

commented

and this error seems to be happening, it is different
[23:19:42] [Netty Server IO #3/ERROR] [FML]: There was a critical exception handling a packet on channel buildcraftlib
java.lang.RuntimeException: PLAYER target expects a Player arg
at net.minecraftforge.fml.common.network.FMLOutboundHandler$OutboundTarget$4.validateArgs(FMLOutboundHandler.java:136) ~[FMLOutboundHandler$OutboundTarget$4.class:?]
at net.minecraftforge.fml.common.network.FMLOutboundHandler.write(FMLOutboundHandler.java:367) ~[FMLOutboundHandler.class:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) ~[AbstractChannelHandlerContext.class:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730) ~[AbstractChannelHandlerContext.class:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816) ~[AbstractChannelHandlerContext.class:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723) ~[AbstractChannelHandlerContext.class:?]
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:111) ~[MessageToMessageEncoder.class:?]
at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116) ~[MessageToMessageCodec.class:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) ~[AbstractChannelHandlerContext.class:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:801) ~[AbstractChannelHandlerContext.class:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814) ~[AbstractChannelHandlerContext.class:?]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794) ~[AbstractChannelHandlerContext.class:?]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831) ~[AbstractChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1032) ~[DefaultChannelPipeline.class:?]
at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:296) ~[AbstractChannel.class:?]
at net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper.sendTo(SimpleNetworkWrapper.java:250) ~[SimpleNetworkWrapper.class:?]
at buildcraft.lib.net.MessageManager.sendTo(MessageManager.java:221) ~[MessageManager.class:?]
at buildcraft.lib.misc.MessageUtil.lambda$sendToAllWatching$0(MessageUtil.java:71) ~[MessageUtil.class:?]
at net.minecraft.server.management.PlayerChunkMapEntry.func_187271_a(PlayerChunkMapEntry.java:315) ~[ot.class:?]
at buildcraft.lib.misc.MessageUtil.sendToAllWatching(MessageUtil.java:70) ~[MessageUtil.class:?]
at buildcraft.lib.tile.TileBC_Neptune.createAndSendMessage(TileBC_Neptune.java:422) ~[TileBC_Neptune.class:?]
at buildcraft.transport.tile.TilePipeHolder.sendMessage(TilePipeHolder.java:509) ~[TilePipeHolder.class:?]
at buildcraft.api.transport.pipe.PipeFlow.sendCustomPayload(PipeFlow.java:57) ~[PipeFlow.class:?]
at buildcraft.transport.pipe.flow.PipeFlowItems.sendItemDataToClient(PipeFlowItems.java:121) ~[PipeFlowItems.class:?]
at buildcraft.transport.pipe.flow.PipeFlowItems.addItemTryMerge(PipeFlowItems.java:569) ~[PipeFlowItems.class:?]
at buildcraft.transport.pipe.flow.PipeFlowItems.insertItemEvents(PipeFlowItems.java:557) ~[PipeFlowItems.class:?]
at buildcraft.transport.pipe.flow.PipeFlowItems.injectItem(PipeFlowItems.java:502) ~[PipeFlowItems.class:?]
at buildcraft.transport.pipe.flow.PipeFlowItems.onItemReachEnd(PipeFlowItems.java:392) ~[PipeFlowItems.class:?]
at buildcraft.transport.pipe.flow.PipeFlowItems.onTick(PipeFlowItems.java:273) ~[PipeFlowItems.class:?]
at buildcraft.transport.pipe.Pipe.onTick(Pipe.java:250) ~[Pipe.class:?]
at buildcraft.transport.tile.TilePipeHolder.func_73660_a(TilePipeHolder.java:261) ~[TilePipeHolder.class:?]
at net.minecraft.world.World.func_72939_s(World.java:1832) ~[amu.class:?]
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:613) ~[oo.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:767) ~[MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:396) ~[nz.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) ~[MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) ~[MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_171]
[23:19:42] [Netty Server IO #3/ERROR] [FML]: Network Disconnect: A fatal error has occurred, this connection is terminated

commented

I don't think RandomPatches is causing these errors. BuildCraft is still in alpha, so you could make a copy of your server without BuildCraft and try running that instead to see if that fixes the problem.