TBMCPlugins / Chroma-Discord

A plugin that controls the ChromaBot Discord bot and provides Minecraft chat functionality and other features.
GNU General Public License v3.0
1 stars 0 forks source link

Discord error causes lockup on shutdown #100

Closed NorbiPeti closed 1 year ago

NorbiPeti commented 5 years ago

Description: The plugin prevents proper shutdown after failing to perform certain actions.

Steps to Reproduce:

  1. Have a Discord outage / prevent connecting to it
  2. Restart the server

Result: Many exceptions about failing to connect, then not proceeding with the shutdown.

Expected Result: The plugin disables in a couple seconds at most.

65

Full 1015-line error log: https://pastebin.com/szGnVWia

Related to the plugin code (1, multiple times):

     |_  Mono.flatMap ⇢ buttondevteam.discordplugin.mcchat.MCChatUtils.lambda$send$7(MCChatUtils.java:183)
NorbiPeti commented 4 years ago

This hasn't happened the same way but now it tried to reconnect right as the server stopped responding. Conincidence? I think not.

[05:55:05] [Spigot Watchdog Thread/ERROR]: The server has stopped responding!
[05:55:05] [elastic-2/WARN]: Missing heartbeat ACK for PT1M38.539321619S
[05:55:05] [Spigot Watchdog Thread/ERROR]: Please report this to http://www.spigotmc.org/
[05:55:05] [Spigot Watchdog Thread/ERROR]: Be sure to include ALL relevant console errors and Minecraft crash reports
[05:55:05] [Spigot Watchdog Thread/ERROR]: Spigot version: git-Spigot-dcd1643-e60fc34 (MC: 1.12.2)
[05:55:05] [Spigot Watchdog Thread/ERROR]: ------------------------------
[05:55:05] [Spigot Watchdog Thread/ERROR]: Server thread dump (Look for plugins here before reporting to Spigot!):
[05:55:05] [elastic-2/WARN]: Triggering error sequence (java.lang.RuntimeException: Reconnecting due to zombie or failed connection)
[05:55:05] [HikariPool-1 housekeeper/WARN]: 1m26s870ms756μs408ns - Thread starvation or clock leap detected (housekeeper delta=HikariPool-1).
[05:55:05] [reactor-http-nio-4/INFO]: Receiver completed on shard 0
[05:55:05] [reactor-http-nio-4/INFO]: Forwarding close reason: 1000
[05:55:05] [Spigot Watchdog Thread/ERROR]: ------------------------------
[05:55:05] [Spigot Watchdog Thread/ERROR]: Current Thread: Server thread
[05:55:05] [Spigot Watchdog Thread/ERROR]:  PID: 17 | Suspended: false | Native: false | State: RUNNABLE
[05:55:05] [Spigot Watchdog Thread/ERROR]:  Stack:
[05:55:05] [Spigot Watchdog Thread/ERROR]:      org.bukkit.craftbukkit.v1_12_R1.entity.CraftEntity.getUniqueId(CraftEntity.java:429)
[...]
[05:55:05] [Spigot Watchdog Thread/ERROR]:      com.plotsquared.bukkit.listeners.EntityPortal_1_7_9.test(EntityPortal_1_7_9.java:71)
[05:55:05] [Spigot Watchdog Thread/ERROR]:      com.plotsquared.bukkit.listeners.EntityPortal_1_7_9.onVehicle(EntityPortal_1_7_9.java:26)
[...]
[05:55:06] [Spigot Watchdog Thread/INFO]: Attempting to restart with ./start.sh
[05:55:06] [Spigot Watchdog Thread/INFO]: Stopping server
[05:55:06] [Spigot Watchdog Thread/INFO]: [Chroma-Discord] Disabling Chroma-Discord v1.0
[05:55:06] [Spigot Watchdog Thread/INFO]: [Chroma-Discord] Finished unhooking the player list!
[05:55:08] [reactor-http-nio-2/INFO]: Attempting to RESUME from 9401
[05:55:08] [reactor-http-nio-2/INFO]: Reconnected to Gateway

It blocked the watchdog thread but then the runner restarted it as usual on the main thread.

NorbiPeti commented 4 years ago

It has tried to resume now during shutdown, hanging the server in that state.

NorbiPeti commented 1 year ago

Hasn't been an issue for a while