1.17.x Spigot server hangs after generating new worlds

Discussion in 'Spigot Plugin Development' started by sloth321q, Jun 15, 2021.

  1. I have a plugin that boots and generates a few chunks from new worlds (Loading spawn area is prevented, talking 9 chunks per world), and then deletes each world when it is done. It's all quite self contained and works well, until maybe the 12th or so world at which point (after deleting the world, and before moving onto the next one) the server hangs and I get a message (below).

    I'm looking at the stack traces and they are remarkably, plain and not about my plugin.

    Is this likely to be some internal problem with the server?

    [17:23:53] [Spigot Watchdog Thread/ERROR]: ------------------------------
    [17:23:53] [Spigot Watchdog Thread/ERROR]: The server has stopped responding! This is (probably) not a Spigot bug.
    [17:23:53] [Spigot Watchdog Thread/ERROR]: If you see a plugin in the Server thread dump below, then please report it to that author
    [17:23:53] [Spigot Watchdog Thread/ERROR]: *Especially* if it looks like HTTP or MySQL operations are occurring
    [17:23:53] [Spigot Watchdog Thread/ERROR]: If you see a world save or edit, then it means you did far more than your server can handle at once
    [17:23:53] [Spigot Watchdog Thread/ERROR]: If this is the case, consider increasing timeout-time in spigot.yml but note that this will replace the crash with LARGE lag spikes
    [17:23:53] [Spigot Watchdog Thread/ERROR]: If you are unsure or still think this is a Spigot bug, please report to https://www.spigotmc.org/
    [17:23:53] [Spigot Watchdog Thread/ERROR]: Be sure to include ALL relevant console errors and Minecraft crash reports
    [17:23:53] [Spigot Watchdog Thread/ERROR]: Spigot version: 3138-Spigot-66f9d3c-77058c7 (MC: 1.17)
    [17:23:53] [Spigot Watchdog Thread/ERROR]: ------------------------------
    [17:23:53] [Spigot Watchdog Thread/ERROR]: Server thread dump (Look for plugins here before reporting to Spigot!):
    [17:23:53] [Spigot Watchdog Thread/ERROR]: ------------------------------
    [17:23:53] [Spigot Watchdog Thread/ERROR]: Current Thread: Server thread
    [17:23:53] [Spigot Watchdog Thread/ERROR]: PID: 34 | Suspended: false | Native: false | State: WAITING
    [17:23:53] [Spigot Watchdog Thread/ERROR]: Stack:
    [17:23:53] [Spigot Watchdog Thread/ERROR]: app//org.bukkit.craftbukkit.libs.jline.internal.NonBlockingInputStream.read(NonBlockingInputStream.java:246)
    [17:23:53] [Spigot Watchdog Thread/ERROR]: app//org.bukkit.craftbukkit.libs.jline.internal.InputStreamReader.read(InputStreamReader.java:261)
    [17:23:53] [Spigot Watchdog Thread/ERROR]: app//org.bukkit.craftbukkit.libs.jline.internal.InputStreamReader.read(InputStreamReader.java:198)
    [17:23:53] [Spigot Watchdog Thread/ERROR]: app//org.bukkit.craftbukkit.libs.jline.console.ConsoleReader.readCharacter(ConsoleReader.java:2145)
    [17:23:53] [Spigot Watchdog Thread/ERROR]: app//org.bukkit.craftbukkit.libs.jline.console.ConsoleReader.readLine(ConsoleReader.java:2349)
    [17:23:53] [Spigot Watchdog Thread/ERROR]: app//net.minecraft.server.dedicated.DedicatedServer$1.run(DedicatedServer.java:129)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1614)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:435)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1056)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1116)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.lang.Thread.run(Thread.java:831)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: ------------------------------
    [17:23:54] [Spigot Watchdog Thread/ERROR]: PID: 83 | Suspended: false | Native: false | State: WAITING
    [17:23:54] [Spigot Watchdog Thread/ERROR]: Stack:
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/jdk.internal.misc.Unsafe.park(Native Method)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.util.concurrent.locks.LockSupport.park(LockSupport.java:341)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(AbstractQueuedSynchronizer.java:505)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3137)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1614)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:435)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1056)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1116)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.lang.Thread.run(Thread.java:831)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: ------------------------------
    [17:23:54] [Spigot Watchdog Thread/ERROR]: Current Thread: pool-8-thread-16
    [17:23:54] [Spigot Watchdog Thread/ERROR]: PID: 84 | Suspended: false | Native: false | State: WAITING
    [17:23:54] [Spigot Watchdog Thread/ERROR]: Stack:
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/jdk.internal.misc.Unsafe.park(Native Method)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.util.concurrent.locks.LockSupport.park(LockSupport.java:341)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(AbstractQueuedSynchronizer.java:505)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3137)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1614)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:435)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1056)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1116)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: [email protected]/java.lang.Thread.run(Thread.java:831)
    [17:23:54] [Spigot Watchdog Thread/ERROR]: ------------------------------
    [17:23:54] [Spigot Watchdog Thread/INFO]: Startup script './start.sh' does not exist! Stopping server.
    [17:23:54] [Spigot Watchdog Thread/INFO]: Stopping server
    [17:23:54] [Spigot Watchdog Thread/INFO]: [mcWrPlugin] Disabling mcWrPlugin v0.1
    [17:23:54] [Spigot Watchdog Thread/INFO]: [mcWrPlugin] Shutting down finder plugin
    [17:23:54] [Spigot Watchdog Thread/INFO]: Saving players
    [17:23:54] [Spigot Watchdog Thread/INFO]: Saving worlds
    [17:23:54] [Spigot Watchdog Thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:eek:verworld
    [17:23:54] [Spigot Watchdog Thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
    [17:23:54] [Spigot Watchdog Thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
     
  2.  
    • Winner Winner x 1
  3. Since this is an issue that comes up after deleting the 12th world I would suggest against increasing that variable.
    The problem still exists but you just remove the symptom.
     
  4. @codeboy Not relevant unfortunately, the worlds (supposedly) never touch the disk as I pass false to the save parameters and skip spawn gen. I can't see anywhere in the stack either that says it's to do with world manipulation? Nor would it be the suspect because I'm only operating with 9 chunks.

    It's not a variable, it's an approximate number. I'm sure on a different system it would change, it's just for reference.