In overworld, I have setup with thrusters and CC computer reading stats from them. When I go into nether, and go back - server thread blocks and I cannot continue playing in overworld.
It could be a bug in CC itself (seems like cc-tweaked/CC-Tweaked#2450 have same root case). But maybe if setControlMode is deferred to server thread, deadlock will be resolved.
Relevant stack-trace:
"ComputerCraft-Computer-Worker-0" #218 [152917] daemon prio=3 os_prio=0 cpu=570,37ms elapsed=104,71s tid=0x00007f7884764a20 nid=152917 waiting on condition [0x00007f78dedfc000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
- parking to wait for <0x00000012bcd30720> (a java.util.concurrent.CompletableFuture$Signaller)
at java.util.concurrent.locks.LockSupport.park([email protected]/LockSupport.java:221)
at java.util.concurrent.CompletableFuture$Signaller.block([email protected]/CompletableFuture.java:1864)
at java.util.concurrent.ForkJoinPool.unmanagedBlock([email protected]/ForkJoinPool.java:3780)
at java.util.concurrent.ForkJoinPool.managedBlock([email protected]/ForkJoinPool.java:3725)
at java.util.concurrent.CompletableFuture.waitingGet([email protected]/CompletableFuture.java:1898)
at java.util.concurrent.CompletableFuture.join([email protected]/CompletableFuture.java:2117)
at net.minecraft.server.level.ServerChunkCache.getChunk([email protected]/ServerChunkCache.java:138)
at net.minecraft.world.level.Level.getChunk([email protected]/Level.java:202)
at net.minecraft.world.level.LevelReader.getChunk([email protected]/LevelReader.java:130)
at net.minecraft.world.level.Level.getChunk([email protected]/Level.java:196)
at net.minecraft.world.level.Level.getChunkAt([email protected]/Level.java:192)
at net.minecraft.world.level.Level.blockEntityChanged([email protected]/Level.java:943)
at net.minecraft.world.level.block.entity.BlockEntity.setChanged([email protected]/BlockEntity.java:198)
at net.minecraft.world.level.block.entity.BlockEntity.setChanged([email protected]/BlockEntity.java:193)
at com.simibubi.create.foundation.blockEntity.SyncedBlockEntity.notifyUpdate([email protected]/SyncedBlockEntity.java:65)
at dev.propulsionteam.propulsionsimulated.content.thruster.AbstractThrusterBlockEntity.setControlMode([email protected]/AbstractThrusterBlockEntity.java:141)
at dev.propulsionteam.propulsionsimulated.compat.computercraft.ThrusterPeripheral.attach([email protected]/ThrusterPeripheral.java:128)
at dan200.computercraft.shared.peripheral.modem.wired.WiredModemPeripheral$RemotePeripheralWrapper.attach([email protected]/WiredModemPeripheral.java:336)
at dan200.computercraft.shared.peripheral.modem.wired.WiredModemPeripheral.attachPeripheralImpl([email protected]/WiredModemPeripheral.java:293)
at dan200.computercraft.shared.peripheral.modem.wired.WiredModemPeripheral.attach([email protected]/WiredModemPeripheral.java:235)
- locked <0x00000012bdd30720> (a java.util.HashMap)
at dan200.computercraft.core.apis.PeripheralAPI$PeripheralWrapper.attach([email protected]/PeripheralAPI.java:74)
- locked <0x00000012bcd30938> (a dan200.computercraft.core.apis.PeripheralAPI$PeripheralWrapper)
at dan200.computercraft.core.apis.PeripheralAPI.startup([email protected]/PeripheralAPI.java:241)
- locked <0x00000012bcd30a38> (a [Ldan200.computercraft.core.apis.PeripheralAPI$PeripheralWrapper;)
at dan200.computercraft.core.computer.ApiWrapper.startup([email protected]/ApiWrapper.java:19)
at dan200.computercraft.core.computer.ComputerExecutor.turnOn([email protected]/ComputerExecutor.java:401)
at dan200.computercraft.core.computer.ComputerExecutor.workImpl([email protected]/ComputerExecutor.java:491)
at dan200.computercraft.core.computer.ComputerExecutor.work([email protected]/ComputerExecutor.java:460)
at dan200.computercraft.core.computer.computerthread.ComputerThread$WorkerThread.runImpl([email protected]/ComputerThread.java:639)
at dan200.computercraft.core.computer.computerthread.ComputerThread$WorkerThread.run([email protected]/ComputerThread.java:593)
at java.lang.Thread.runWith([email protected]/Thread.java:1596)
at java.lang.Thread.run([email protected]/Thread.java:1583)
"Server thread" #202 [152806] prio=8 os_prio=0 cpu=30628,72ms elapsed=128,03s tid=0x00007f793dfb57a0 nid=152806 waiting for monitor entry [0x00007f78d0d7d000]
java.lang.Thread.State: BLOCKED (on object monitor)
at dan200.computercraft.shared.peripheral.modem.wired.WiredModemElement.networkChanged([email protected]/WiredModemElement.java:33)
- waiting to lock <0x00000012bdd30720> (a java.util.HashMap)
at dan200.computercraft.impl.network.wired.WiredNetworkChangeImpl.broadcast([email protected]/WiredNetworkChangeImpl.java:85)
at dan200.computercraft.impl.network.wired.WiredNetworkImpl.updatePeripherals([email protected]/WiredNetworkImpl.java:335)
at dan200.computercraft.impl.network.wired.WiredNodeImpl.updatePeripherals([email protected]/WiredNodeImpl.java:60)
at dan200.computercraft.shared.peripheral.modem.wired.CableBlockEntity.updateConnectedPeripherals([email protected]/CableBlockEntity.java:229)
at dan200.computercraft.shared.peripheral.modem.wired.CableBlockEntity.attachPeripheral([email protected]/CableBlockEntity.java:219)
at dan200.computercraft.shared.peripheral.modem.wired.CableBlockEntity.blockTick([email protected]/CableBlockEntity.java:176)
at dan200.computercraft.shared.peripheral.modem.wired.CableBlock.tick([email protected]/CableBlock.java:257)
at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.tick([email protected]/BlockBehaviour.java:732)
at net.minecraft.server.level.ServerLevel.tickBlock([email protected]/ServerLevel.java:762)
at net.minecraft.server.level.ServerLevel$$Lambda/0x0000000085d24e98.accept([email protected]/Unknown Source)
at net.minecraft.world.ticks.LevelTicks.runCollectedTicks([email protected]/LevelTicks.java:215)
at net.minecraft.world.ticks.LevelTicks.tick([email protected]/LevelTicks.java:98)
at net.minecraft.server.level.ServerLevel.tick([email protected]/ServerLevel.java:367)
at net.minecraft.server.MinecraftServer.tickChildren([email protected]/MinecraftServer.java:1037)
at net.minecraft.server.MinecraftServer.tickServer([email protected]/MinecraftServer.java:917)
at net.minecraft.client.server.IntegratedServer.tickServer([email protected]/IntegratedServer.java:110)
at net.minecraft.server.MinecraftServer.runServer([email protected]/MinecraftServer.java:707)
at net.minecraft.server.MinecraftServer.lambda$spin$2([email protected]/MinecraftServer.java:267)
at net.minecraft.server.MinecraftServer$$Lambda/0x0000000085b59588.run([email protected]/Unknown Source)
at java.lang.Thread.runWith([email protected]/Thread.java:1596)
at java.lang.Thread.run([email protected]/Thread.java:1583)
In overworld, I have setup with thrusters and CC computer reading stats from them. When I go into nether, and go back - server thread blocks and I cannot continue playing in overworld.
It could be a bug in CC itself (seems like cc-tweaked/CC-Tweaked#2450 have same root case). But maybe if
setControlModeis deferred to server thread, deadlock will be resolved.Relevant stack-trace: