Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-5032

Loading another chunk inside the ChunkLoadEvent deadlocks the server

XMLWordPrintable

    • This server is running CraftBukkit version git-Spigot-baafee9-043d31d (MC: 1.14.2) (Implementing API version 1.14.2-R0.1-SNAPSHOT)
    • See embed
    • Yes

      Hope this issue was not already reported. It was similar to another issue, except this one is more bukkit/plugin-related. This issue is occurring since the 1.14+ versions.

      Loading another chunk (that is not already loaded) inside the Bukkit ChunkLoadEvent causes the server to deadlock.

      For example, this simple test reproduces the issue. Note the swapped x/z so it loads mirrored chunks (avoids a load loop). I register the listener some ticks delayed so it doesn't deadlock during startup instantly.

          @EventHandler
          public void onChunkLoad(ChunkLoadEvent event) {
              event.getWorld().getChunkAt(event.getChunk().getZ(), event.getChunk().getX());
          }

       

      Once registered and a chunk loads, the server deadlocks, with thread stack traces as follows:

      ------------------------------
      The server has stopped responding! This is (probably) not a Spigot bug.
      If you see a plugin in the Server thread dump below, then please report it to that author
          *Especially* if it looks like HTTP or MySQL operations are occurring
      If you see a world save or edit, then it means you did far more than your server can handle at once
          If this is the case, consider increasing timeout-time in spigot.yml but note that this will replace the crash with LARGE lag spikes
      If you are unsure or still think this is a Spigot bug, please report to https://www.spigotmc.org/
      Be sure to include ALL relevant console errors and Minecraft crash reports
      Spigot version: git-Spigot-baafee9-043d31d (MC: 1.14.2)
      ------------------------------
      Server thread dump (Look for plugins here before reporting to Spigot!):
      ------------------------------
      Current Thread: Server thread
          PID: 24 | Suspended: false | Native: false | State: TIMED_WAITING
          Stack:
              java.base@12/jdk.internal.misc.Unsafe.park(Native Method)
              java.base@12/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:235)
              app//net.minecraft.server.v1_14_R1.IAsyncTaskHandler.awaitTasks(SourceFile:125)
              app//net.minecraft.server.v1_14_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:93)
              app//net.minecraft.server.v1_14_R1.IChunkProvider.getChunkAt(SourceFile:16)
              app//org.bukkit.craftbukkit.v1_14_R1.CraftWorld.getChunkAt(CraftWorld.java:322)
              com.bergerkiller.bukkit.chunkaccessbug.Main.onChunkLoad(Main.java:27)
              java.base@12/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              java.base@12/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              java.base@12/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              java.base@12/java.lang.reflect.Method.invoke(Method.java:567)
              app//org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:316)
              app//org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
              app//org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:520)
              app//org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:505)
              app//net.minecraft.server.v1_14_R1.Chunk.loadCallback(Chunk.java:522)
              app//net.minecraft.server.v1_14_R1.PlayerChunk.lambda$11(PlayerChunk.java:353)
              app//net.minecraft.server.v1_14_R1.PlayerChunk$$Lambda$2556/0x0000000801b4c440.accept(Unknown Source)
              app//com.mojang.datafixers.util.Either$Left.ifLeft(Either.java:43)
              app//net.minecraft.server.v1_14_R1.PlayerChunk.lambda$10(PlayerChunk.java:351)
              app//net.minecraft.server.v1_14_R1.PlayerChunk$$Lambda$2474/0x0000000801b2c440.accept(Unknown Source)
              java.base@12/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714)
              java.base@12/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
              java.base@12/java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:610)
              java.base@12/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649)
              java.base@12/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
              app//net.minecraft.server.v1_14_R1.ChunkTaskQueueSorter.b(SourceFile:57)
              app//net.minecraft.server.v1_14_R1.ChunkTaskQueueSorter$$Lambda$2495/0x0000000801b34440.run(Unknown Source)
              app//net.minecraft.server.v1_14_R1.ThreadedMailbox.e(SourceFile:83)
              app//net.minecraft.server.v1_14_R1.ThreadedMailbox.a(SourceFile:123)
              app//net.minecraft.server.v1_14_R1.ThreadedMailbox.run(SourceFile:91)
              app//net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeTask(SourceFile:135)
              app//net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeNext(SourceFile:114)
              app//net.minecraft.server.v1_14_R1.ChunkProviderServer$a.executeNext(ChunkProviderServer.java:509)
              app//net.minecraft.server.v1_14_R1.IAsyncTaskHandler.awaitTasks(SourceFile:123)
              app//net.minecraft.server.v1_14_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:93)
              app//net.minecraft.server.v1_14_R1.World.getChunkAt(World.java:212)
              app//net.minecraft.server.v1_14_R1.IWorldReader.getChunkAt(SourceFile:105)
              app//net.minecraft.server.v1_14_R1.World.getChunkAt(World.java:207)
              app//net.minecraft.server.v1_14_R1.Entity.setLocation(Entity.java:1272)
              app//net.minecraft.server.v1_14_R1.PlayerConnection.internalTeleport(PlayerConnection.java:1105)
              app//net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:1067)
              app//net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:1040)
              app//net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:1031)
              app//net.minecraft.server.v1_14_R1.PlayerList.a(PlayerList.java:165)
              app//net.minecraft.server.v1_14_R1.LoginListener.c(LoginListener.java:149)
              app//net.minecraft.server.v1_14_R1.LoginListener.tick(LoginListener.java:53)
              app//net.minecraft.server.v1_14_R1.NetworkManager.a(NetworkManager.java:230)
              app//net.minecraft.server.v1_14_R1.ServerConnection.c(ServerConnection.java:119)
              app//net.minecraft.server.v1_14_R1.MinecraftServer.b(MinecraftServer.java:1080)
              app//net.minecraft.server.v1_14_R1.DedicatedServer.b(DedicatedServer.java:396)
              app//net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:956)
              app//net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:801)
              java.base@12/java.lang.Thread.run(Thread.java:835)
      ------------------------------
      Entire Thread Dump:
      ------------------------------
      Current Thread: Reference Handler
          PID: 2 | Suspended: false | Native: false | State: RUNNABLE
          Stack:
              java.base@12/java.lang.ref.Reference.waitForReferencePendingList(Native Method)
              java.base@12/java.lang.ref.Reference.processPendingReferences(Reference.java:241)
              java.base@12/java.lang.ref.Reference$ReferenceHandler.run(Reference.java:213)
      ------------------------------
      Current Thread: Finalizer
          PID: 3 | Suspended: false | Native: false | State: WAITING
          Stack:
              java.base@12/java.lang.Object.wait(Native Method)
              java.base@12/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:155)
              java.base@12/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:176)
              java.base@12/java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:170)
      ------------------------------
      Current Thread: Signal Dispatcher
          PID: 4 | Suspended: false | Native: false | State: RUNNABLE
          Stack:
      ------------------------------
      Current Thread: Attach Listener
          PID: 5 | Suspended: false | Native: false | State: RUNNABLE
          Stack:
      ------------------------------
      Current Thread: Common-Cleaner
          PID: 12 | Suspended: false | Native: false | State: TIMED_WAITING
          Stack:
              java.base@12/java.lang.Object.wait(Native Method)
              java.base@12/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:155)
              java.base@12/jdk.internal.ref.CleanerImpl.run(CleanerImpl.java:148)
              java.base@12/java.lang.Thread.run(Thread.java:835)
              java.base@12/jdk.internal.misc.InnocuousThread.run(InnocuousThread.java:134)
      ------------------------------
      Current Thread: Server-Worker-1
          PID: 16 | Suspended: false | Native: false | State: TIMED_WAITING
          Stack:
              java.base@12/jdk.internal.misc.Unsafe.park(Native Method)
              java.base@12/java.util.concurrent.locks.LockSupport.parkUntil(LockSupport.java:276)
              java.base@12/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1619)
              java.base@12/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
      ------------------------------
      Current Thread: Server-Worker-2
          PID: 17 | Suspended: false | Native: false | State: WAITING
          Stack:
              java.base@12/jdk.internal.misc.Unsafe.park(Native Method)
              java.base@12/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
              java.base@12/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1628)
              java.base@12/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
      ------------------------------
      Current Thread: Server-Worker-3
          PID: 18 | Suspended: false | Native: false | State: WAITING
          Stack:
              java.base@12/jdk.internal.misc.Unsafe.park(Native Method)
              java.base@12/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
              java.base@12/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1628)
              java.base@12/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
      ------------------------------
      Current Thread: Server-Worker-4
          PID: 20 | Suspended: false | Native: false | State: WAITING
          Stack:
              java.base@12/jdk.internal.misc.Unsafe.park(Native Method)
              java.base@12/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
              java.base@12/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1628)
              java.base@12/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
      ------------------------------
      Current Thread: Server-Worker-5
          PID: 19 | Suspended: false | Native: false | State: WAITING
          Stack:
              java.base@12/jdk.internal.misc.Unsafe.park(Native Method)
              java.base@12/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
              java.base@12/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1628)
              java.base@12/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
      ------------------------------
      Current Thread: Server-Worker-6
          PID: 21 | Suspended: false | Native: false | State: WAITING
          Stack:
              java.base@12/jdk.internal.misc.Unsafe.park(Native Method)
              java.base@12/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
              java.base@12/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1628)
              java.base@12/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
      ------------------------------
      Current Thread: Snooper Timer
          PID: 23 | Suspended: false | Native: false | State: WAITING
          Stack:
              java.base@12/java.lang.Object.wait(Native Method)
              java.base@12/java.lang.Object.wait(Object.java:326)
              java.base@12/java.util.TimerThread.mainLoop(Timer.java:527)
              java.base@12/java.util.TimerThread.run(Timer.java:506)
      ------------------------------
      Current Thread: Server Infinisleeper
          PID: 27 | Suspended: false | Native: false | State: TIMED_WAITING
          Stack:
              java.base@12/java.lang.Thread.sleep(Native Method)
              app//net.minecraft.server.v1_14_R1.DedicatedServer$1.run(DedicatedServer.java:69)
      ------------------------------
      Current Thread: Server thread
          PID: 24 | Suspended: false | Native: false | State: TIMED_WAITING
          Thread is waiting on monitor(s):
              Locked on:app//org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:505)
              Locked on:app//net.minecraft.server.v1_14_R1.ServerConnection.c(ServerConnection.java:119)
          Stack:
              java.base@12/jdk.internal.misc.Unsafe.park(Native Method)
              java.base@12/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:235)
              app//net.minecraft.server.v1_14_R1.IAsyncTaskHandler.awaitTasks(SourceFile:125)
              app//net.minecraft.server.v1_14_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:93)
              app//net.minecraft.server.v1_14_R1.IChunkProvider.getChunkAt(SourceFile:16)
              app//org.bukkit.craftbukkit.v1_14_R1.CraftWorld.getChunkAt(CraftWorld.java:322)
              com.bergerkiller.bukkit.chunkaccessbug.Main.onChunkLoad(Main.java:27)
              java.base@12/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              java.base@12/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              java.base@12/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              java.base@12/java.lang.reflect.Method.invoke(Method.java:567)
              app//org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:316)
              app//org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
              app//org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:520)
              app//org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:505)
              app//net.minecraft.server.v1_14_R1.Chunk.loadCallback(Chunk.java:522)
              app//net.minecraft.server.v1_14_R1.PlayerChunk.lambda$11(PlayerChunk.java:353)
              app//net.minecraft.server.v1_14_R1.PlayerChunk$$Lambda$2556/0x0000000801b4c440.accept(Unknown Source)
              app//com.mojang.datafixers.util.Either$Left.ifLeft(Either.java:43)
              app//net.minecraft.server.v1_14_R1.PlayerChunk.lambda$10(PlayerChunk.java:351)
              app//net.minecraft.server.v1_14_R1.PlayerChunk$$Lambda$2474/0x0000000801b2c440.accept(Unknown Source)
              java.base@12/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714)
              java.base@12/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
              java.base@12/java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:610)
              java.base@12/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649)
              java.base@12/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
              app//net.minecraft.server.v1_14_R1.ChunkTaskQueueSorter.b(SourceFile:57)
              app//net.minecraft.server.v1_14_R1.ChunkTaskQueueSorter$$Lambda$2495/0x0000000801b34440.run(Unknown Source)
              app//net.minecraft.server.v1_14_R1.ThreadedMailbox.e(SourceFile:83)
              app//net.minecraft.server.v1_14_R1.ThreadedMailbox.a(SourceFile:123)
              app//net.minecraft.server.v1_14_R1.ThreadedMailbox.run(SourceFile:91)
              app//net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeTask(SourceFile:135)
              app//net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeNext(SourceFile:114)
              app//net.minecraft.server.v1_14_R1.ChunkProviderServer$a.executeNext(ChunkProviderServer.java:509)
              app//net.minecraft.server.v1_14_R1.IAsyncTaskHandler.awaitTasks(SourceFile:123)
              app//net.minecraft.server.v1_14_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:93)
              app//net.minecraft.server.v1_14_R1.World.getChunkAt(World.java:212)
              app//net.minecraft.server.v1_14_R1.IWorldReader.getChunkAt(SourceFile:105)
              app//net.minecraft.server.v1_14_R1.World.getChunkAt(World.java:207)
              app//net.minecraft.server.v1_14_R1.Entity.setLocation(Entity.java:1272)
              app//net.minecraft.server.v1_14_R1.PlayerConnection.internalTeleport(PlayerConnection.java:1105)
              app//net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:1067)
              app//net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:1040)
              app//net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:1031)
              app//net.minecraft.server.v1_14_R1.PlayerList.a(PlayerList.java:165)
              app//net.minecraft.server.v1_14_R1.LoginListener.c(LoginListener.java:149)
              app//net.minecraft.server.v1_14_R1.LoginListener.tick(LoginListener.java:53)
              app//net.minecraft.server.v1_14_R1.NetworkManager.a(NetworkManager.java:230)
              app//net.minecraft.server.v1_14_R1.ServerConnection.c(ServerConnection.java:119)
              app//net.minecraft.server.v1_14_R1.MinecraftServer.b(MinecraftServer.java:1080)
              app//net.minecraft.server.v1_14_R1.DedicatedServer.b(DedicatedServer.java:396)
              app//net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:956)
              app//net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:801)
              java.base@12/java.lang.Thread.run(Thread.java:835)
      ------------------------------
      Current Thread: DestroyJavaVM
          PID: 29 | Suspended: false | Native: false | State: RUNNABLE
          Stack:
      ------------------------------
      Current Thread: Thread-2
          PID: 30 | Suspended: false | Native: false | State: WAITING
          Stack:
              java.base@12/jdk.internal.misc.Unsafe.park(Native Method)
              java.base@12/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
              java.base@12/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
              java.base@12/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433)
              app//com.mojang.util.QueueLogAppender.getNextLogEvent(QueueLogAppender.java:77)
              app//org.bukkit.craftbukkit.v1_14_R1.util.TerminalConsoleWriterThread.run(TerminalConsoleWriterThread.java:30)
      ------------------------------
      Current Thread: Server console handler
          PID: 28 | Suspended: false | Native: true | State: RUNNABLE
          Thread is waiting on monitor(s):
              Locked on:java.base@12/java.io.BufferedInputStream.read(BufferedInputStream.java:271)
              Locked on:app//org.bukkit.craftbukkit.libs.jline.internal.InputStreamReader.read(InputStreamReader.java:261)
              Locked on:app//org.bukkit.craftbukkit.libs.jline.internal.InputStreamReader.read(InputStreamReader.java:198)
          Stack:
              java.base@12/java.io.FileInputStream.readBytes(Native Method)
              java.base@12/java.io.FileInputStream.read(FileInputStream.java:273)
              java.base@12/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
              java.base@12/java.io.BufferedInputStream.read(BufferedInputStream.java:271)
              app//org.bukkit.craftbukkit.libs.jline.internal.NonBlockingInputStream.read(NonBlockingInputStream.java:248)
              app//org.bukkit.craftbukkit.libs.jline.internal.InputStreamReader.read(InputStreamReader.java:261)
              app//org.bukkit.craftbukkit.libs.jline.internal.InputStreamReader.read(InputStreamReader.java:198)
              app//org.bukkit.craftbukkit.libs.jline.console.ConsoleReader.readCharacter(ConsoleReader.java:2145)
              app//org.bukkit.craftbukkit.libs.jline.console.ConsoleReader.readLineSimple(ConsoleReader.java:3183)
              app//org.bukkit.craftbukkit.libs.jline.console.ConsoleReader.readLine(ConsoleReader.java:2333)
              app//org.bukkit.craftbukkit.libs.jline.console.ConsoleReader.readLine(ConsoleReader.java:2269)
              app//org.bukkit.craftbukkit.libs.jline.console.ConsoleReader.readLine(ConsoleReader.java:2257)
              app//net.minecraft.server.v1_14_R1.DedicatedServer$2.run(DedicatedServer.java:97)
      ------------------------------
      Current Thread: Spigot Watchdog Thread
          PID: 31 | Suspended: false | Native: false | State: RUNNABLE
          Stack:
              java.management@12/sun.management.ThreadImpl.dumpThreads0(Native Method)
              java.management@12/sun.management.ThreadImpl.dumpAllThreads(ThreadImpl.java:502)
              java.management@12/sun.management.ThreadImpl.dumpAllThreads(ThreadImpl.java:490)
              app//org.spigotmc.WatchdogThread.run(WatchdogThread.java:86)
      ------------------------------
      Current Thread: Spigot Metrics Thread
          PID: 32 | Suspended: false | Native: false | State: TIMED_WAITING
          Stack:
              java.base@12/java.lang.Object.wait(Native Method)
              java.base@12/java.util.TimerThread.mainLoop(Timer.java:553)
              java.base@12/java.util.TimerThread.run(Timer.java:506)
      ------------------------------
      Current Thread: ObjectCleanerThread
          PID: 33 | Suspended: false | Native: false | State: TIMED_WAITING
          Stack:
              java.base@12/java.lang.Object.wait(Native Method)
              java.base@12/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:155)
              app//io.netty.util.internal.ObjectCleaner$1.run(ObjectCleaner.java:54)
              app//io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
              java.base@12/java.lang.Thread.run(Thread.java:835)
      ------------------------------
      Current Thread: Netty Server IO #0
          PID: 34 | Suspended: false | Native: false | State: RUNNABLE
          Thread is waiting on monitor(s):
              Locked on:java.base@12/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:124)
              Locked on:java.base@12/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:124)
          Stack:
              java.base@12/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
              java.base@12/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:339)
              java.base@12/sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:167)
              java.base@12/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:124)
              java.base@12/sun.nio.ch.SelectorImpl.select(SelectorImpl.java:136)
              app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:756)
              app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:411)
              app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
              java.base@12/java.lang.Thread.run(Thread.java:835)
      ------------------------------
      Current Thread: Metrics updating thread of My_Worlds
          PID: 35 | Suspended: false | Native: false | State: TIMED_WAITING
          Stack:
              java.base@12/java.lang.Thread.sleep(Native Method)
              com.bergerkiller.bukkit.common.metrics.Metrics$1.run(Metrics.java:277)
      ------------------------------
      Current Thread: Metrics updating thread of Maplands
          PID: 36 | Suspended: false | Native: false | State: TIMED_WAITING
          Stack:
              java.base@12/java.lang.Thread.sleep(Native Method)
              com.bergerkiller.bukkit.common.metrics.Metrics$1.run(Metrics.java:277)
      ------------------------------
      Current Thread: Netty Server IO #1
          PID: 37 | Suspended: false | Native: false | State: RUNNABLE
          Thread is waiting on monitor(s):
              Locked on:java.base@12/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:124)
              Locked on:java.base@12/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:124)
          Stack:
              java.base@12/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
              java.base@12/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:339)
              java.base@12/sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:167)
              java.base@12/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:124)
              java.base@12/sun.nio.ch.SelectorImpl.select(SelectorImpl.java:136)
              app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:756)
              app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:411)
              app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
              java.base@12/java.lang.Thread.run(Thread.java:835)
      ------------------------------
      Startup script './start.sh' does not exist! Stopping server.
      Stopping server
      

      Obviously the test code is not what happens in practice. What happens in practice is that some logic runs during a chunk load that accidentally triggers loading a neighbouring chunk that is not yet loaded. For example, to detect structures.

      In 1.13.2 and before this sort of thing was still possible, but since 1.14 it is not. If loading new chunks inside a ChunkLoadEvent is no longer permitted (or never was to begin with), you can mark this issue as dontfix, but then me and others at least know about it.

      Ive included ChunkAccessBugTest-1.0.jara small plugin jar to showcase this bug that uses the aforementioned snippet.

      Sidenote: Same happens in ChunkUnloadEvent, though loading new chunks in that event is a bug in of itself.

            Unassigned Unassigned
            bergerkiller Irmo van den Berge
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: