FastCraft

FastCraft

138k Downloads

Fastcraft is performing a blocking action on the main thread and Exception in thread "Craft Scheduler Thread - 230"

Inysal opened this issue ยท 3 comments

commented

Description

Fastcraft is performing a blocking action on the main thread, LagMonitor is reporting this issue.
[Craft Scheduler Thread - 230/WARN]: Exception in thread "Craft Scheduler Thread - 230"

Debug Output

Show /fcadmin debug output

========== FastCraft+ Debug Info ==========
Versions:
  FastCraft+ v0.25
  git-Spigot-570526c-6af9f5b (MC: 1.10.2)
  1.10.2-R0.1-SNAPSHOT
  Java 1.8.0_92
Other Plugins (32):
  bChatManager 3.1.5
  BottledExp 2.2.2.2
  ChatColor2 1.6.8
  ClearLag 2.9.3
  CoreProtect 2.13.1
  CustomEnderChest 1.2.1
  EnchantGUI 1.3.2
  HealthBar 1.8.3
  LagMonitor 1.11
  LockettePro 2.4.1
  Orebfuscator4 4.1.4
  PermissionsEx 1.23.4
  ProtocolLib 4.1.0
  RPGMobMoney 1.5
  SaneEconomy 0.7.1
  SeePlayerInventory 1.8
  SignEdit 3.3.2
  SignShop 2.11.0Dev
  SimpleElevator 1.1.3
  SimpleHomes 2.0.3
  SimpleSort 1.4
  SurvivalFly 1.0
  SwornRPG 3.3
  TeleportSigns 1.1.5
  TreeAssist 5.10.17
  TrophyHeads 1.12.7-46
  UberEnchant 4.0
  Vault 1.5.6-b49
  Vote 1.903
  WelcomeMessages 1.0.2
  WorldEdit 6.1.3;7a097ca
  WorldGuard 6.1.2;e38d98d
===========================================
# Stack Trace

Show stack trace

[21:23:53] [Server thread/WARN]: [LagMonitor] Plugin unknown is performing a blocking action on the main thread This could be a performance hit.Report it to the plugin author
[21:23:53] [Server thread/WARN]: [LagMonitor]
java.lang.Exception
    at com.github.games647.lagmonitor.listeners.BlockingConnectionSelector.select(BlockingConnectionSelector.java:36) [LagMonitor.jar:?]
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384) [?:1.8.0_92]
    at java.net.Socket.connect(Socket.java:589) [?:1.8.0_92]
    at java.net.Socket.connect(Socket.java:538) [?:1.8.0_92]
    at sun.net.NetworkClient.doConnect(NetworkClient.java:180) [?:1.8.0_92]
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) [?:1.8.0_92]
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) [?:1.8.0_92]
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:211) [?:1.8.0_92]
    at sun.net.www.http.HttpClient.New(HttpClient.java:308) [?:1.8.0_92]
    at sun.net.www.http.HttpClient.New(HttpClient.java:326) [?:1.8.0_92]
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1169) [?:1.8.0_92]
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1105) [?:1.8.0_92]
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:999) [?:1.8.0_92]
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:933) [?:1.8.0_92]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1513) [?:1.8.0_92]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441) [?:1.8.0_92]
    at java.net.URL.openStream(URL.java:1045) [?:1.8.0_92]
    at co.kepler.fastcraftplus.updater.Release.fetchReleases(Release.java:125) [FastCraftPlus.jar:?]
    at co.kepler.fastcraftplus.updater.Updater$UpdateChecker.run(Updater.java:37) [FastCraftPlus.jar:?]
    at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftTask.run(CraftTask.java:71) [spigot-1.10.2.jar:git-Spigot-570526c-6af9f5b]
    at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:353) [spigot-1.10.2.jar:git-Spigot-570526c-6af9f5b]
    at net.minecraft.server.v1_10_R1.MinecraftServer.D(MinecraftServer.java:723) [spigot-1.10.2.jar:git-Spigot-570526c-6af9f5b]
    at net.minecraft.server.v1_10_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot-1.10.2.jar:git-Spigot-570526c-6af9f5b]
    at net.minecraft.server.v1_10_R1.MinecraftServer.C(MinecraftServer.java:668) [spigot-1.10.2.jar:git-Spigot-570526c-6af9f5b]
    at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:567) [spigot-1.10.2.jar:git-Spigot-570526c-6af9f5b]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_92]
[21:23:53] [Craft Scheduler Thread - 0/WARN]: Exception in thread "Craft Scheduler Thread - 0"
commented

Oooh, nice to know that there's another plugin out there that monitors http requests on the main thread. Will be picking that one up.

commented

It looks like this is the issue:
https://github.com/BenWoodworth/FastCraftPlus/blob/master/src/main/java/co/kepler/fastcraftplus/updater/Updater.java#L29

It's checking for updates synchronously on the main thread.

commented

Fixed in v0.26