Server thread db access causes server to stop responding after sand starts falling #1

Closed
opened 2018-06-25 17:11:24 +00:00 by NorbiPeti · 2 comments
NorbiPeti commented 2018-06-25 17:11:24 +00:00 (Migrated from github.com)

https://github.com/TBMCPlugins/LimitedCreative/blame/spigot-1.9/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/BlockListener.java#L97

It's noted in the code as 'not optimal' but it seems to hang (shut down) the server sometimes when a sand is destroyed under another sand in creative.

[14:05:35] [Spigot Watchdog Thread/ERROR]: Current Thread: Server thread
[14:05:35] [Spigot Watchdog Thread/ERROR]:     PID: 17 | Suspended: false | Native: false | State: WAITING
[14:05:35] [Spigot Watchdog Thread/ERROR]:     Stack:
[14:05:35] [Spigot Watchdog Thread/ERROR]:         java.lang.Object.wait(Native Method)
[14:05:35] [Spigot Watchdog Thread/ERROR]:         java.lang.Object.wait(Object.java:502)
[14:05:35] [Spigot Watchdog Thread/ERROR]:         de.jaschastarke.minecraft.limitedcreative.blockstate.thread.CallableAction.getValue(CallableAction.java:11)
[14:05:35] [Spigot Watchdog Thread/ERROR]:         de.jaschastarke.minecraft.limitedcreative.blockstate.thread.ThreadLink.callUpdate(ThreadLink.java:140)
[14:05:35] [Spigot Watchdog Thread/ERROR]:         de.jaschastarke.minecraft.limitedcreative.blockstate.ThreadedModel.getState(ThreadedModel.java:133)
[14:05:35] [Spigot Watchdog Thread/ERROR]:         de.jaschastarke.minecraft.limitedcreative.blockstate.BlockListener.onEntityChangeBlock(BlockListener.java:98)
https://github.com/TBMCPlugins/LimitedCreative/blame/spigot-1.9/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/BlockListener.java#L97 It's noted in the code as 'not optimal' but it seems to hang (shut down) the server sometimes when a sand is destroyed under another sand in creative. ``` [14:05:35] [Spigot Watchdog Thread/ERROR]: Current Thread: Server thread [14:05:35] [Spigot Watchdog Thread/ERROR]: PID: 17 | Suspended: false | Native: false | State: WAITING [14:05:35] [Spigot Watchdog Thread/ERROR]: Stack: [14:05:35] [Spigot Watchdog Thread/ERROR]: java.lang.Object.wait(Native Method) [14:05:35] [Spigot Watchdog Thread/ERROR]: java.lang.Object.wait(Object.java:502) [14:05:35] [Spigot Watchdog Thread/ERROR]: de.jaschastarke.minecraft.limitedcreative.blockstate.thread.CallableAction.getValue(CallableAction.java:11) [14:05:35] [Spigot Watchdog Thread/ERROR]: de.jaschastarke.minecraft.limitedcreative.blockstate.thread.ThreadLink.callUpdate(ThreadLink.java:140) [14:05:35] [Spigot Watchdog Thread/ERROR]: de.jaschastarke.minecraft.limitedcreative.blockstate.ThreadedModel.getState(ThreadedModel.java:133) [14:05:35] [Spigot Watchdog Thread/ERROR]: de.jaschastarke.minecraft.limitedcreative.blockstate.BlockListener.onEntityChangeBlock(BlockListener.java:98) ```
NorbiPeti commented 2018-06-26 20:03:41 +00:00 (Migrated from github.com)

LC hang because there was an uncaught exception in the DB thread:

12:54:34] [LC BlockState DB-Thread/WARN]: java.lang.ArrayIndexOutOfBoundsException: 500
[12:54:34] [LC BlockState DB-Thread/WARN]:     at org.bukkit.craftbukkit.libs.it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap.containsKey(Long2ObjectOpenHashMap.java:464)
[12:54:34] [LC BlockState DB-Thread/WARN]:     at net.minecraft.server.v1_12_R1.ChunkProviderServer.isLoaded(ChunkProviderServer.java:350)
[12:54:34] [LC BlockState DB-Thread/WARN]:     at org.bukkit.craftbukkit.v1_12_R1.CraftWorld.isChunkLoaded(CraftWorld.java:146)
[12:54:34] [LC BlockState DB-Thread/WARN]:     at org.bukkit.craftbukkit.v1_12_R1.CraftWorld.isChunkLoaded(CraftWorld.java:278)
[12:54:34] [LC BlockState DB-Thread/WARN]:     at org.bukkit.craftbukkit.v1_12_R1.CraftChunk.isLoaded(CraftChunk.java:118)
[12:54:34] [LC BlockState DB-Thread/WARN]:     at de.jaschastarke.minecraft.limitedcreative.blockstate.thread.CacheChunkAction.process(CacheChunkAction.java:31)
[12:54:34] [LC BlockState DB-Thread/WARN]:     at de.jaschastarke.minecraft.limitedcreative.blockstate.thread.ThreadLink$DBThread.run(ThreadLink.java:99)
[12:54:34] [LC BlockState DB-Thread/ERROR]: [LimitedCreative] <BlockState> Thread LC BlockState DB-Thread encoutered an uncaught Exception: 500

this caused the thread to stop immediately, which left all further requests unfinished, causing the server thread to wait indefinitely

LC hang because there was an uncaught exception in the DB thread: ``` 12:54:34] [LC BlockState DB-Thread/WARN]: java.lang.ArrayIndexOutOfBoundsException: 500 [12:54:34] [LC BlockState DB-Thread/WARN]: at org.bukkit.craftbukkit.libs.it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap.containsKey(Long2ObjectOpenHashMap.java:464) [12:54:34] [LC BlockState DB-Thread/WARN]: at net.minecraft.server.v1_12_R1.ChunkProviderServer.isLoaded(ChunkProviderServer.java:350) [12:54:34] [LC BlockState DB-Thread/WARN]: at org.bukkit.craftbukkit.v1_12_R1.CraftWorld.isChunkLoaded(CraftWorld.java:146) [12:54:34] [LC BlockState DB-Thread/WARN]: at org.bukkit.craftbukkit.v1_12_R1.CraftWorld.isChunkLoaded(CraftWorld.java:278) [12:54:34] [LC BlockState DB-Thread/WARN]: at org.bukkit.craftbukkit.v1_12_R1.CraftChunk.isLoaded(CraftChunk.java:118) [12:54:34] [LC BlockState DB-Thread/WARN]: at de.jaschastarke.minecraft.limitedcreative.blockstate.thread.CacheChunkAction.process(CacheChunkAction.java:31) [12:54:34] [LC BlockState DB-Thread/WARN]: at de.jaschastarke.minecraft.limitedcreative.blockstate.thread.ThreadLink$DBThread.run(ThreadLink.java:99) [12:54:34] [LC BlockState DB-Thread/ERROR]: [LimitedCreative] <BlockState> Thread LC BlockState DB-Thread encoutered an uncaught Exception: 500 ``` this caused the thread to stop immediately, which left all further requests unfinished, causing the server thread to wait indefinitely
NorbiPeti commented 2018-06-27 16:28:58 +00:00 (Migrated from github.com)

Thread stop fixed in d7e4eaf which should fix this problem as well.

Thread stop fixed in d7e4eaf which should fix this problem as well.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ChromaGaming/LimitedCreative#1
No description provided.