Jump to content

[1.12] Server crashes while debugging


Draco18s

Recommended Posts

Trying to debug some of my code, I was in the debugging perspective after hitting a breakpoint which paused the server thread.

 

After about a minute, the dedicated server terminal window closed with the following message:

[22:24:14] [Server Watchdog/FATAL]: A single server tick took 60.12 seconds (should be max 0.05)
[22:24:14] [Server Watchdog/FATAL]: Considering it to be crashed, server will forcibly shutdown.

 

Great, thanks guys. :|

 

And the crash log it generated:

 

---- Minecraft Crash Report ----
// Hey, that tickles! Hehehe!

Time: 8/27/17 10:24 PM
Description: Watching Server

java.lang.Error
    at com.draco18s.flowers.FlowerEventHandler.onBonemeal(FlowerEventHandler.java:71)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_18_FlowerEventHandler_onBonemeal_BonemealEvent.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
    at net.minecraftforge.event.ForgeEventFactory.onApplyBonemeal(ForgeEventFactory.java:373)
    at net.minecraft.item.ItemDye.applyBonemeal(ItemDye.java:118)
    at net.minecraft.item.ItemDye.onItemUse(ItemDye.java:62)
    at net.minecraftforge.common.ForgeHooks.onPlaceItemIntoWorld(ForgeHooks.java:845)
    at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:200)
    at net.minecraft.server.management.PlayerInteractionManager.processRightClickBlock(PlayerInteractionManager.java:504)
    at net.minecraft.network.NetHandlerPlayServer.processTryUseItemOnBlock(NetHandlerPlayServer.java:759)
    at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:68)
    at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:13)
    at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:21)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at net.minecraft.util.Util.runTask(Util.java:53)
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:796)
    at net.minecraft.server.dedicated.DedicatedServer.updateTimeLightAndEntities(DedicatedServer.java:414)
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:741)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590)
    at java.lang.Thread.run(Thread.java:745)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Server Watchdog
Stacktrace:
    at com.draco18s.flowers.FlowerEventHandler.onBonemeal(FlowerEventHandler.java:71)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_18_FlowerEventHandler_onBonemeal_BonemealEvent.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
    at net.minecraftforge.event.ForgeEventFactory.onApplyBonemeal(ForgeEventFactory.java:373)
    at net.minecraft.item.ItemDye.applyBonemeal(ItemDye.java:118)
    at net.minecraft.item.ItemDye.onItemUse(ItemDye.java:62)
    at net.minecraftforge.common.ForgeHooks.onPlaceItemIntoWorld(ForgeHooks.java:845)
    at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:200)
    at net.minecraft.server.management.PlayerInteractionManager.processRightClickBlock(PlayerInteractionManager.java:504)
    at net.minecraft.network.NetHandlerPlayServer.processTryUseItemOnBlock(NetHandlerPlayServer.java:759)
    at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:68)
    at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:13)
    at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:21)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at net.minecraft.util.Util.runTask(Util.java:53)
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:796)
    at net.minecraft.server.dedicated.DedicatedServer.updateTimeLightAndEntities(DedicatedServer.java:414)
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:741)

-- Thread Dump --
Details:
    Threads: "File IO Thread" Id=40 TIMED_WAITING
    at java.lang.Thread.sleep(Native Method)
    at net.minecraft.world.storage.ThreadedFileIOBase.processQueue(ThreadedFileIOBase.java:70)
    at net.minecraft.world.storage.ThreadedFileIOBase.run(ThreadedFileIOBase.java:36)
    at java.lang.Thread.run(Thread.java:745)


"Chunk I/O Executor Thread-1" Id=39 WAITING on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@4d118a71
    at sun.misc.Unsafe.park(Native Method)
    -  waiting on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@4d118a71
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
    at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)


"threadDeathWatcher-2-1" Id=38 TIMED_WAITING
    at java.lang.Thread.sleep(Native Method)
    at io.netty.util.ThreadDeathWatcher$Watcher.run(ThreadDeathWatcher.java:152)
    at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
    at java.lang.Thread.run(Thread.java:745)


"Netty Server IO #1" Id=37 BLOCKED on java.util.ArrayDeque@43d66da3 owned by "Server thread" Id=28
    at net.minecraft.server.MinecraftServer.callFromMainThread(MinecraftServer.java:1526)
    -  blocked on java.util.ArrayDeque@43d66da3
    at net.minecraft.server.MinecraftServer.addScheduledTask(MinecraftServer.java:1548)
    at net.minecraft.world.WorldServer.addScheduledTask(WorldServer.java:1429)
    at net.minecraft.network.PacketThreadUtil.checkThreadAndEnqueue(PacketThreadUtil.java:17)
    at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:466)
    at net.minecraft.network.play.client.CPacketPlayer.processPacket(CPacketPlayer.java:36)
    at net.minecraft.network.play.client.CPacketPlayer$Position.processPacket(CPacketPlayer.java:85)
    at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:155)
    ...


"Server Watchdog" Id=35 RUNNABLE
    at sun.management.ThreadImpl.dumpThreads0(Native Method)
    at sun.management.ThreadImpl.dumpAllThreads(ThreadImpl.java:454)
    at net.minecraft.server.dedicated.ServerHangWatchdog.run(ServerHangWatchdog.java:46)
    at java.lang.Thread.run(Thread.java:745)


"Netty Server IO #0" Id=34 RUNNABLE (in native)
    at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
    at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:296)
    at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelectorImpl.java:278)
    at sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:159)
    at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
    -  locked io.netty.channel.nio.SelectedSelectionKeySet@47e9e101
    -  locked java.util.Collections$UnmodifiableSet@2eb6798
    -  locked sun.nio.ch.WindowsSelectorImpl@43e827b6
    at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
    at io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
    at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:732)
    ...


"Server console handler" Id=31 RUNNABLE (in native)
    at java.io.FileInputStream.readBytes(Native Method)
    at java.io.FileInputStream.read(FileInputStream.java:255)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:284)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
    -  locked java.io.BufferedInputStream@33a3e11d
    at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
    at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
    -  locked java.io.InputStreamReader@3b4aff81
    at java.io.InputStreamReader.read(InputStreamReader.java:184)
    ...


"DestroyJavaVM" Id=30 RUNNABLE


"Server thread" Id=28 RUNNABLE (suspended)
    at com.draco18s.flowers.FlowerEventHandler.onBonemeal(FlowerEventHandler.java:71)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_18_FlowerEventHandler_onBonemeal_BonemealEvent.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
    at net.minecraftforge.event.ForgeEventFactory.onApplyBonemeal(ForgeEventFactory.java:373)
    at net.minecraft.item.ItemDye.applyBonemeal(ItemDye.java:118)
    at net.minecraft.item.ItemDye.onItemUse(ItemDye.java:62)
    at net.minecraftforge.common.ForgeHooks.onPlaceItemIntoWorld(ForgeHooks.java:845)
    ...


"D3D Screen Updater" Id=27 RUNNABLE (in native)
    at sun.java2d.d3d.D3DRenderQueue.flushBuffer(Native Method)
    at sun.java2d.d3d.D3DRenderQueue.flushBuffer(D3DRenderQueue.java:152)
    at sun.java2d.d3d.D3DRenderQueue.flushNow(D3DRenderQueue.java:137)
    at sun.java2d.d3d.D3DSurfaceData.swapBuffers(D3DSurfaceData.java:765)
    at sun.java2d.d3d.D3DScreenUpdateManager.run(D3DScreenUpdateManager.java:447)
    at java.lang.Thread.run(Thread.java:745)

    Number of locked synchronizers = 1
    - java.util.concurrent.locks.ReentrantLock$NonfairSync@62c498d7


"TimerQueue" Id=25 TIMED_WAITING on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@4c1478b8
    at sun.misc.Unsafe.park(Native Method)
    -  waiting on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@4c1478b8
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
    at java.util.concurrent.DelayQueue.take(DelayQueue.java:223)
    at javax.swing.TimerQueue.run(TimerQueue.java:174)
    at java.lang.Thread.run(Thread.java:745)

    Number of locked synchronizers = 1
    - java.util.concurrent.locks.ReentrantLock$NonfairSync@6013c6ae


"Thread-3" Id=24 WAITING on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@204e304c
    at sun.misc.Unsafe.park(Native Method)
    -  waiting on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@204e304c
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
    at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
    at com.mojang.util.QueueLogAppender.getNextLogEvent(QueueLogAppender.java:77)
    at net.minecraft.server.gui.MinecraftServerGui$4.run(MinecraftServerGui.java:163)
    at java.lang.Thread.run(Thread.java:745)


"AWT-EventQueue-0" Id=23 WAITING on java.lang.Object@668a06b2
    at java.lang.Object.wait(Native Method)
    -  waiting on java.lang.Object@668a06b2
    at java.lang.Object.wait(Object.java:502)
    at sun.java2d.d3d.D3DScreenUpdateManager.runUpdateNow(D3DScreenUpdateManager.java:406)
    at sun.java2d.d3d.D3DBlitLoops.IsoBlit(D3DBlitLoops.java:356)
    at sun.java2d.d3d.D3DRTTSurfaceToSurfaceBlit.Blit(D3DBlitLoops.java:443)
    at sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:959)
    at sun.java2d.pipe.DrawImage.renderImageCopy(DrawImage.java:577)
    at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:67)
    ...


"AWT-Windows" Id=21 RUNNABLE
    at sun.awt.windows.WToolkit.eventLoop(Native Method)
    at sun.awt.windows.WToolkit.run(WToolkit.java:306)
    at java.lang.Thread.run(Thread.java:745)


"AWT-Shutdown" Id=20 WAITING on java.lang.Object@18d29a7b
    at java.lang.Object.wait(Native Method)
    -  waiting on java.lang.Object@18d29a7b
    at java.lang.Object.wait(Object.java:502)
    at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:295)
    at java.lang.Thread.run(Thread.java:745)


"Java2D Disposer" Id=19 WAITING on java.lang.ref.ReferenceQueue$Lock@77ecf061
    at java.lang.Object.wait(Native Method)
    -  waiting on java.lang.ref.ReferenceQueue$Lock@77ecf061
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
    at sun.java2d.Disposer.run(Disposer.java:148)
    at java.lang.Thread.run(Thread.java:745)


"Server Infinisleeper" Id=18 TIMED_WAITING
    at java.lang.Thread.sleep(Native Method)
    at net.minecraft.server.dedicated.DedicatedServer$1.run(DedicatedServer.java:82)


"Snooper Timer" Id=17 TIMED_WAITING on java.util.TaskQueue@26f17280
    at java.lang.Object.wait(Native Method)
    -  waiting on java.util.TaskQueue@26f17280
    at java.util.TimerThread.mainLoop(Timer.java:552)
    at java.util.TimerThread.run(Timer.java:505)


"JDWP Command Reader" Id=9 RUNNABLE (in native)


"JDWP Event Helper Thread" Id=8 RUNNABLE


"JDWP Transport Listener: dt_socket" Id=7 RUNNABLE


"Attach Listener" Id=6 RUNNABLE


"Signal Dispatcher" Id=5 RUNNABLE


"Finalizer" Id=3 WAITING on java.lang.ref.ReferenceQueue$Lock@10785f7a
    at java.lang.Object.wait(Native Method)
    -  waiting on java.lang.ref.ReferenceQueue$Lock@10785f7a
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)


"Reference Handler" Id=2 WAITING on java.lang.ref.Reference$Lock@1cf51e4c
    at java.lang.Object.wait(Native Method)
    -  waiting on java.lang.ref.Reference$Lock@1cf51e4c
    at java.lang.Object.wait(Object.java:502)
    at java.lang.ref.Reference.tryHandlePending(Reference.java:191)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)

 

Stacktrace:
    at net.minecraft.server.dedicated.ServerHangWatchdog.run(ServerHangWatchdog.java:63)
    at java.lang.Thread.run(Thread.java:745)

-- System Details --
Details:
    Minecraft Version: 1.12.1
    Operating System: Windows 7 (amd64) version 6.1
    Java Version: 1.8.0_101, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 880018040 bytes (839 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
    FML: MCP 9.41 Powered by Forge 14.22.0.2462 8 mods loaded, 8 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

    | State     | ID           | Version            | Source                           | Signature |
    |:--------- |:------------ |:------------------ |:-------------------------------- |:--------- |
    | UCHIJAAAA | minecraft    | 1.12.1             | minecraft.jar                    | None      |
    | UCHIJAAAA | mcp          | 9.19               | minecraft.jar                    | None      |
    | UCHIJAAAA | FML          | 8.0.99.99          | forgeSrc-1.12.1-14.22.0.2462.jar | None      |
    | UCHIJAAAA | forge        | 14.22.0.2462       | forgeSrc-1.12.1-14.22.0.2462.jar | None      |
    | UCHIJAAAA | hardlib      | {@version:lib}     | bin                              | None      |
    | UCHIJAAAA | customoregen | @VERSION@          | bin                              | None      |
    | UCHIJAAAA | oreflowers   | {@version:flowers} | bin                              | None      |
    | UCHIJAAAA | harderores   | {@version:ore}     | bin                              | None      |

    Loaded coremods (and transformers):
    Profiler Position: N/A (disabled)
    Player Count: 1 / 20; [EntityPlayerMP['Player707'/361, l='world', x=-89.88, y=65.00, z=251.42]]
    Is Modded: Definitely; Server brand changed to 'fml,forge'
    Type: Dedicated Server (map_server.txt)

 

My code is not at fault, I was merely examining the stack at a particular point in my code, which necessitated having the tread paused which only makes it look like the code has hung.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

  • 11 months later...

This is a pretty old post but I'm responding since it might be useful for others. Also I'm not sure what your question is, but I'm assuming you want to know how to handle this.

 

In the server.properties file in the run directory of your server there's a line which controls the maximum amount of time a tick can take before the server shuts down. The line is max-tick-time (near the top of the file at the time of writing). Increase it's value to something more reasonable for debugging.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.