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

Posible memory leak

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • None

      Seems that 1.12 version have some issues with unloading not needed data. 

      Using 

      EntityPlayer entity = new EntityPlayer(server, server.getWorldServer(0), profile, new PlayerInteractManager(server.getWorldServer(0)));
      

      To load offline player data, it's all fine and dandy on previous versions, like 1.11.2 and so on. No issues. But 1.12 tends to load some data and keep it and clogging up memory. 

      Was testing with over 7000 user files. And 4GB ram server. First run usually goes throw with some hiccups and freezes, most of ram is being taken, second crashes server.

      Some crash report

      [14:40:16 ERROR]: Spigot version: git-Spigot-99c2a37-9a82fa7 (MC: 1.12)
      [14:40:16 ERROR]: ------------------------------
      [14:40:16 ERROR]: Server thread dump (Look for plugins here before reporting to Spigot!):
      [14:40:16 ERROR]: ------------------------------
      [14:40:16 ERROR]: Current Thread: Server thread
      [14:40:16 ERROR]: PID: 20 | Suspended: false | Native: false | State: RUNNABLE
      [14:40:16 ERROR]: Stack:
      [14:40:16 ERROR]: java.io.WinNTFileSystem.getBooleanAttributes(Native Method)
      [14:40:16 ERROR]: java.io.File.isFile(Unknown Source)
      [14:40:16 ERROR]: net.minecraft.server.v1_12_R1.WorldNBTStorage.load(WorldNBTStorage.java:181)
      [14:40:16 ERROR]: org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer.loadData(CraftPlayer.java:536)
      [14:40:16 ERROR]: com.Zrips.CMI.NBT.v1_12_R1.getPlayer(v1_12_R1.java:69)
      [14:40:16 ERROR]: com.Zrips.CMI.Containers.CMIUser.getPlayer(CMIUser.java:179)
      [14:40:16 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:446)
      [14:40:16 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:16 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:16 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:16 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:16 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:16 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:16 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:16 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:16 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:16 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:16 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:16 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:16 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:16 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:16 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:16 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:16 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:16 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:16 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:16 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:38 ERROR]: Thread is waiting on monitor(s):
      [14:40:38 ERROR]: Locked on:com.Zrips.CMI.NBT.v1_12_R1.getPlayer(v1_12_R1.java:65)
      [14:40:38 ERROR]: Stack:
      [14:40:38 ERROR]: java.util.HashMap.resize(Unknown Source)
      [14:40:38 ERROR]: java.util.HashMap.putVal(Unknown Source)
      [14:40:38 ERROR]: java.util.HashMap.put(Unknown Source)
      [14:40:38 ERROR]: java.util.HashSet.add(Unknown Source)
      [14:40:38 ERROR]: net.minecraft.server.v1_12_R1.CriterionTriggerBredAnimals$a.a(SourceFile:103)
      [14:40:38 ERROR]: net.minecraft.server.v1_12_R1.CriterionTriggerBredAnimals.a(SourceFile:35)
      [14:40:38 ERROR]: net.minecraft.server.v1_12_R1.AdvancementDataPlayer.c(AdvancementDataPlayer.java:253)
      [14:40:38 ERROR]: net.minecraft.server.v1_12_R1.AdvancementDataPlayer.d(AdvancementDataPlayer.java:85)
      [14:40:38 ERROR]: net.minecraft.server.v1_12_R1.AdvancementDataPlayer.g(AdvancementDataPlayer.java:165)
      [14:40:38 ERROR]: net.minecraft.server.v1_12_R1.AdvancementDataPlayer.<init>(AdvancementDataPlayer.java:50)
      [14:40:38 ERROR]: net.minecraft.server.v1_12_R1.PlayerList.h(PlayerList.java:1387)
      [14:40:38 ERROR]: net.minecraft.server.v1_12_R1.EntityPlayer.<init>(EntityPlayer.java:106)
      [14:40:38 ERROR]: com.Zrips.CMI.NBT.v1_12_R1.getPlayer(v1_12_R1.java:65)
      [14:40:38 ERROR]: com.Zrips.CMI.Containers.CMIUser.getPlayer(CMIUser.java:179)
      [14:40:38 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:446)
      [14:40:38 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:38 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:38 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:38 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:38 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:38 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:38 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:38 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:38 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:38 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:38 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:38 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:38 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:38 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:38 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:38 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:38 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:45 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:45 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:45 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:45 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:45 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:45 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:45 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:45 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:45 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:45 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:45 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:45 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:45 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:45 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:45 ERROR]: com.Zrips.CMI.Modules.Search.Search.perform(Search.java:485)
      [14:40:45 ERROR]: com.Zrips.CMI.Modules.Search.Search.search(Search.java:425)
      [14:40:45 ERROR]: com.Zrips.CMI.commands.list.search.perform(search.java:398)
      [14:40:45 ERROR]: com.Zrips.CMI.commands.CommandsHandler.onCommand(CommandsHandler.java:179)
      [14:40:45 ERROR]: org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
      [14:40:45 ERROR]: org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141)
      [14:40:45 ERROR]: org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:645)
      [14:40:45 ERROR]: net.minecraft.server.v1_12_R1.PlayerConnection.handleCommand(PlayerConnection.java:1385)
      [14:40:45 ERROR]: net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1220)
      [14:40:45 ERROR]: net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:45)
      [14:40:45 ERROR]: net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:1)
      [14:40:45 ERROR]: net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13)
      [14:40:45 ERROR]: java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      [14:40:45 ERROR]: java.util.concurrent.FutureTask.run(Unknown Source)
      [14:40:45 ERROR]: net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46)
      [14:40:45 ERROR]: net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:747)
      [14:40:45 ERROR]: net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:405)
      [14:40:45 ERROR]: net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:678)
      [14:40:45 ERROR]: net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:576)
      [14:40:45 ERROR]: java.lang.Thread.run(Unknown Source)
      [14:40:45 ERROR]: ------------------------------
      [14:40:45 ERROR]: Current Thread: Server Infinisleeper
      [14:40:45 ERROR]: PID: 21 | Suspended: false | Native: false | State: TIMED_WAITING
      [14:40:45 ERROR]: Stack:
      [14:40:45 ERROR]: java.lang.Thread.sleep(Native Method)
      [14:40:45 ERROR]: net.minecraft.server.v1_12_R1.DedicatedServer$1.run(DedicatedServer.java:60)
      [14:40:45 ERROR]: ------------------------------
      [14:40:45 ERROR]: Current Thread: NonBlockingInputStreamThread
      [14:40:45 ERROR]: PID: 18 | Suspended: false | Native: false | State: WAITING
      [14:40:45 ERROR]: Stack:
      [14:40:45 ERROR]: java.lang.Object.wait(Native Method)
      [14:40:45 ERROR]: org.bukkit.craftbukkit.libs.jline.internal.NonBlockingInputStream.run(NonBlockingInputStream.java:278)
      [14:40:45 ERROR]: java.lang.Thread.run(Unknown Source)
      [14:40:45 ERROR]: ------------------------------
      [14:40:45 ERROR]: Current Thread: Snooper Timer
      [14:40:45 ERROR]: PID: 16 | Suspended: false | Native: false | State: WAITING
      [14:40:45 ERROR]: Stack:
      [14:40:45 ERROR]: java.lang.Object.wait(Native Method)
      [14:40:45 ERROR]: java.lang.Object.wait(Unknown Source)
      [14:40:45 ERROR]: java.util.TimerThread.mainLoop(Unknown Source)
      [14:40:45 ERROR]: java.util.TimerThread.run(Unknown Source)
      [14:40:45 ERROR]: ------------------------------
      [14:40:45 ERROR]: Current Thread: JDWP Event Helper Thread
      [14:40:45 ERROR]: PID: 7 | Suspended: false | Native: false | State: RUNNABLE
      [14:40:45 ERROR]: Stack:
      [14:40:45 ERROR]: ------------------------------
      [14:40:45 ERROR]: Current Thread: JDWP Transport Listener: dt_socket
      [14:40:45 ERROR]: PID: 6 | Suspended: false | Native: true | State: RUNNABLE
      [14:40:45 ERROR]: Stack:
      [14:40:45 ERROR]: ------------------------------
      [14:40:45 ERROR]: Current Thread: Attach Listener
      [14:40:45 ERROR]: PID: 5 | Suspended: false | Native: false | State: RUNNABLE
      [14:40:45 ERROR]: Stack:
      [14:40:45 ERROR]: ------------------------------
      [14:40:45 ERROR]: Current Thread: Signal Dispatcher
      [14:40:45 ERROR]: PID: 4 | Suspended: false | Native: false | State: RUNNABLE
      [14:40:45 ERROR]: Stack:
      [14:40:45 ERROR]: ------------------------------
      [14:40:45 ERROR]: Current Thread: Finalizer
      [14:40:45 ERROR]: PID: 3 | Suspended: false | Native: false | State: WAITING
      [14:40:45 ERROR]: Stack:
      [14:40:45 ERROR]: java.lang.Object.wait(Native Method)
      [14:40:45 ERROR]: java.lang.ref.ReferenceQueue.remove(Unknown Source)
      [14:40:45 ERROR]: java.lang.ref.ReferenceQueue.remove(Unknown Source)
      [14:40:45 ERROR]: java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)
      [14:40:45 ERROR]: ------------------------------
      [14:40:45 ERROR]: Current Thread: Reference Handler
      [14:40:45 ERROR]: PID: 2 | Suspended: false | Native: false | State: WAITING
      [14:40:45 ERROR]: Stack:
      [14:40:45 ERROR]: java.lang.Object.wait(Native Method)
      [14:40:45 ERROR]: java.lang.Object.wait(Unknown Source)
      [14:40:45 ERROR]: java.lang.ref.Reference.tryHandlePending(Unknown Source)
      [14:40:45 ERROR]: java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
      [14:40:45 ERROR]: ------------------------------
      

       

       

            Unassigned Unassigned
            Zrips Zrips
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: