CommandHelper

CommandHelper

46.5k Downloads

Spigot woes.

LadyCailinBot opened this issue ยท 8 comments

commented

CMDHELPER-2751 - Reported by EntityReborn

At the risk of getting laughed at, I keep getting this when starting up a spigot server with latest CHs. This will rapidly consume any memory given it using -Xmx, and will hang the server itself. I'm speculating that the new command stuff jb-aero added might be not playing well with whatever tweaks the spigot staff have done, so I will also try to link spigot to this issue.

17:04:52 [INFO] Loading properties
17:04:52 [INFO] Default game type: CREATIVE
17:04:53 [INFO] This server is running CraftBukkit version git-Spigot-1019 (MC: 1.6.2) (Implementing API version 1.6.2-R0.1-SNAPSHOT)
17:04:53 [INFO] Generating keypair
17:04:53 [INFO] Starting Minecraft server on *:25565
17:04:54 [INFO] [CommandHelper] Loading CommandHelper v3.3.1-SNAPSHOT
17:04:54 [INFO] Preparing level "world"
17:04:54 [INFO] -------- World Settings For [world] --------
17:04:54 [INFO] View Distance: 10
17:04:54 [INFO] Experience Merge Radius: 3.0
17:04:54 [INFO] Chunks to Grow per Tick: 650
17:04:54 [INFO] Item Merge Radius: 2.5
17:04:54 [INFO] Mob Spawn Range: 4
17:04:54 [INFO] Cactus Growth Modifier: 100%
17:04:54 [INFO] Cane Growth Modifier: 100%
17:04:54 [INFO] Melon Growth Modifier: 100%
17:04:54 [INFO] Mushroom Growth Modifier: 100%
17:04:54 [INFO] Pumpkin Growth Modifier: 100%
17:04:54 [INFO] Sapling Growth Modifier: 100%
17:04:54 [INFO] Wheat Growth Modifier: 100%
17:04:54 [INFO] Entity Activation Range: An 32 / Mo 32 / Mi 16
17:04:54 [INFO] Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
17:04:54 [INFO] Anti X-Ray: true
17:04:54 [INFO]         Engine Mode: 1
17:04:54 [INFO]         Blocks: [1, 5, 14, 15, 16, 21, 48, 49, 54, 56, 73, 74, 82, 129, 130]
17:04:54 [INFO] Hopper Transfer: 8 Hopper Check: 8
17:04:54 [INFO] Random Lighting Updates: false
17:04:55 [INFO] -------- World Settings For [world_nether] --------
17:04:55 [INFO] View Distance: 10
17:04:55 [INFO] Experience Merge Radius: 3.0
17:04:55 [INFO] Chunks to Grow per Tick: 650
17:04:55 [INFO] Item Merge Radius: 2.5
17:04:55 [INFO] Mob Spawn Range: 4
17:04:55 [INFO] Cactus Growth Modifier: 100%
17:04:55 [INFO] Cane Growth Modifier: 100%
17:04:55 [INFO] Melon Growth Modifier: 100%
17:04:55 [INFO] Mushroom Growth Modifier: 100%
17:04:55 [INFO] Pumpkin Growth Modifier: 100%
17:04:55 [INFO] Sapling Growth Modifier: 100%
17:04:55 [INFO] Wheat Growth Modifier: 100%
17:04:55 [INFO] Entity Activation Range: An 32 / Mo 32 / Mi 16
17:04:55 [INFO] Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
17:04:55 [INFO] Anti X-Ray: true
17:04:55 [INFO]         Engine Mode: 1
17:04:55 [INFO]         Blocks: [1, 5, 14, 15, 16, 21, 48, 49, 54, 56, 73, 74, 82, 129, 130]
17:04:55 [INFO] Hopper Transfer: 8 Hopper Check: 8
17:04:55 [INFO] Random Lighting Updates: false
17:04:55 [INFO] -------- World Settings For [world_the_end] --------
17:04:55 [INFO] View Distance: 10
17:04:55 [INFO] Experience Merge Radius: 3.0
17:04:55 [INFO] Chunks to Grow per Tick: 650
17:04:55 [INFO] Item Merge Radius: 2.5
17:04:55 [INFO] Mob Spawn Range: 4
17:04:55 [INFO] Cactus Growth Modifier: 100%
17:04:55 [INFO] Cane Growth Modifier: 100%
17:04:55 [INFO] Melon Growth Modifier: 100%
17:04:55 [INFO] Mushroom Growth Modifier: 100%
17:04:55 [INFO] Pumpkin Growth Modifier: 100%
17:04:55 [INFO] Sapling Growth Modifier: 100%
17:04:55 [INFO] Wheat Growth Modifier: 100%
17:04:55 [INFO] Entity Activation Range: An 32 / Mo 32 / Mi 16
17:04:55 [INFO] Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
17:04:55 [INFO] Anti X-Ray: true
17:04:55 [INFO]         Engine Mode: 1
17:04:55 [INFO]         Blocks: [1, 5, 14, 15, 16, 21, 48, 49, 54, 56, 73, 74, 82, 129, 130]
17:04:55 [INFO] Hopper Transfer: 8 Hopper Check: 8
17:04:55 [INFO] Random Lighting Updates: false
17:04:55 [INFO] Preparing start region for level 0 (Seed: 8140667007766245376)
17:04:56 [INFO] Preparing spawn area: 23%
17:04:57 [INFO] Preparing spawn area: 92%
17:04:57 [INFO] Preparing start region for level 1 (Seed: 8140667007766245376)
17:04:58 [INFO] Preparing start region for level 2 (Seed: 8140667007766245376)
17:04:58 [INFO] [CommandHelper] Enabling CommandHelper v3.3.1-SNAPSHOT
17:04:59 [INFO] CommandHelper/CommandHelper 3.3.1-SNAPSHOT enabled
17:04:59 [INFO] WEPIF: Using the Bukkit Permissions API.
17:05:15 [SEVERE] Exception in thread "Command Reader"
>
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Command Reader"
commented

Comment by jb_aero

That appears to be after CommandHelper has already loaded. None of the stuff I added is even called :/

commented

Comment by EntityReborn

I'm not so sure. Clearing my config gives me this:

19:22:30 [INFO] Starting minecraft server version 1.6.2
19:22:30 [INFO] Loading properties
19:22:30 [INFO] Default game type: CREATIVE
19:22:31 [INFO] This server is running CraftBukkit version git-Spigot-1031 (MC: 1.6.2) (Implementing API version 1.6.2-R0.1-SNAPSHOT)
19:22:31 [INFO] Generating keypair
19:22:31 [INFO] Starting Minecraft server on *:25565
19:22:32 [INFO] [CommandHelper] Loading CommandHelper v1573-9525e28
19:22:32 [INFO] Preparing level "world"
19:22:32 [INFO] -------- World Settings For [world] --------
19:22:32 [INFO] View Distance: 10
19:22:32 [INFO] Experience Merge Radius: 3.0
19:22:32 [INFO] Chunks to Grow per Tick: 650
19:22:32 [INFO] Item Merge Radius: 2.5
19:22:32 [INFO] Mob Spawn Range: 4
19:22:32 [INFO] Cactus Growth Modifier: 100%
19:22:32 [INFO] Cane Growth Modifier: 100%
19:22:32 [INFO] Melon Growth Modifier: 100%
19:22:32 [INFO] Mushroom Growth Modifier: 100%
19:22:32 [INFO] Pumpkin Growth Modifier: 100%
19:22:32 [INFO] Sapling Growth Modifier: 100%
19:22:32 [INFO] Wheat Growth Modifier: 100%
19:22:32 [INFO] Entity Activation Range: An 32 / Mo 32 / Mi 16
19:22:32 [INFO] Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
19:22:32 [INFO] Anti X-Ray: true
19:22:32 [INFO]         Engine Mode: 1
19:22:32 [INFO]         Blocks: [14, 15, 16, 21, 48, 49, 54, 56, 73, 74, 82, 129, 130]
19:22:32 [INFO] Hopper Transfer: 8 Hopper Check: 8
19:22:32 [INFO] Random Lighting Updates: false
19:22:33 [INFO] -------- World Settings For [world_nether] --------
19:22:33 [INFO] View Distance: 10
19:22:33 [INFO] Experience Merge Radius: 3.0
19:22:33 [INFO] Chunks to Grow per Tick: 650
19:22:33 [INFO] Item Merge Radius: 2.5
19:22:33 [INFO] Mob Spawn Range: 4
19:22:33 [INFO] Cactus Growth Modifier: 100%
19:22:33 [INFO] Cane Growth Modifier: 100%
19:22:33 [INFO] Melon Growth Modifier: 100%
19:22:33 [INFO] Mushroom Growth Modifier: 100%
19:22:33 [INFO] Pumpkin Growth Modifier: 100%
19:22:33 [INFO] Sapling Growth Modifier: 100%
19:22:33 [INFO] Wheat Growth Modifier: 100%
19:22:33 [INFO] Entity Activation Range: An 32 / Mo 32 / Mi 16
19:22:33 [INFO] Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
19:22:33 [INFO] Anti X-Ray: true
19:22:33 [INFO]         Engine Mode: 1
19:22:33 [INFO]         Blocks: [14, 15, 16, 21, 48, 49, 54, 56, 73, 74, 82, 129, 130]
19:22:33 [INFO] Hopper Transfer: 8 Hopper Check: 8
19:22:33 [INFO] Random Lighting Updates: false
19:22:33 [INFO] -------- World Settings For [world_the_end] --------
19:22:33 [INFO] View Distance: 10
19:22:33 [INFO] Experience Merge Radius: 3.0
19:22:33 [INFO] Chunks to Grow per Tick: 650
19:22:33 [INFO] Item Merge Radius: 2.5
19:22:33 [INFO] Mob Spawn Range: 4
19:22:33 [INFO] Cactus Growth Modifier: 100%
19:22:33 [INFO] Cane Growth Modifier: 100%
19:22:33 [INFO] Melon Growth Modifier: 100%
19:22:33 [INFO] Mushroom Growth Modifier: 100%
19:22:33 [INFO] Pumpkin Growth Modifier: 100%
19:22:33 [INFO] Sapling Growth Modifier: 100%
19:22:33 [INFO] Wheat Growth Modifier: 100%
19:22:33 [INFO] Entity Activation Range: An 32 / Mo 32 / Mi 16
19:22:33 [INFO] Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
19:22:33 [INFO] Anti X-Ray: true
19:22:33 [INFO]         Engine Mode: 1
19:22:33 [INFO]         Blocks: [14, 15, 16, 21, 48, 49, 54, 56, 73, 74, 82, 129, 130]
19:22:33 [INFO] Hopper Transfer: 8 Hopper Check: 8
19:22:33 [INFO] Random Lighting Updates: false
19:22:33 [INFO] Preparing start region for level 0 (Seed: 8140667007766245376)
19:22:34 [INFO] Preparing spawn area: 27%
19:22:35 [INFO] Preparing spawn area: 92%
19:22:35 [INFO] Preparing start region for level 1 (Seed: 8140667007766245376)
19:22:36 [INFO] Preparing start region for level 2 (Seed: 8140667007766245376)
19:22:36 [INFO] [CommandHelper] Enabling CommandHelper v1573-9525e28
19:22:36 [INFO] CommandHelper/CommandHelper 1573-9525e28 enabled
19:22:36 [INFO] WEPIF: Using the Bukkit Permissions API.
19:22:36 [INFO]


     _/_/_/                                                                _/
  _/        _/_/   _/_/_/  _/_/   _/_/_/  _/_/     _/_/_/ _/_/_/     _/_/_/
 _/      _/    _/ _/    _/    _/ _/    _/    _/ _/    _/ _/    _/ _/    _/
_/      _/    _/ _/    _/    _/ _/    _/    _/ _/    _/ _/    _/ _/    _/
 _/_/_/  _/_/   _/    _/    _/ _/    _/    _/   _/_/_/ _/    _/   _/_/_/



                      _/    _/            _/
                     _/    _/    _/_/    _/  _/_/_/      _/_/    _/  _/_/
                    _/_/_/_/  _/_/_/_/  _/  _/    _/  _/_/_/_/  _/_/
                   _/    _/  _/        _/  _/    _/  _/        _/
                  _/    _/    _/_/_/  _/  _/_/_/      _/_/_/  _/
                                         _/
                                        _/

<long long wait>

19:24:45 [SEVERE] Exception in thread "Command Reader"
>
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Command Reader"

md_5 was successfully able to start a server using latest CH and spigot, so I'm quite pissed off because this will not get any attention from him, "not reproducable".

commented

Comment by PseudoKnight

Just gonna throw this out there, but what's your permsize?

commented

Comment by EntityReborn

This was exactly the issue. So, while spigot itself uses about 20MB of permgen, CH dwarfs it with a whopping 70MB. Having discussed this with md_5 as well as looking at some profiling results, this is absolutely rediculous, and is due to how LC re-deps things and relocates them, amongst other issues. Having discussed some of this with LC, I'm at a loss on what else to do. Thanks.

commented

Comment by LadyCailin

I'm going to see if I can get some of the runtime stuff that I'm doing into compile time, which is what I was working on with this class: https://github.com/sk89q/commandhelper/blob/master/src/main/java/com/laytonsmith/annotations/processors/CheckOverrides.java Basically, what I'm going to try to do is to get rid of the ClassDiscovery stuff. That's required currently for two things, one, for the fuzzy name class stuff, and two, for the @api reflection stuff. With this change, I can get rid of the requirement to use it for the @api stuff. To get rid of the need for it for the fuzzy name stuff is a bit trickier, but still possible, and I've started working on that too: https://github.com/sk89q/commandhelper/blob/master/src/main/java/com/laytonsmith/PureUtilities/ClassReader.java Basically, what I need to be able to do is to get information out of the class file, without actually loading it into Permgen, which is what happens when you do Class.forName. I can do this by analyzing the class file itself. Once I get those two things done, I can get rid of the need for the ClassDiscovery stuff altogether (well, at least at runtime), which is what is causing the PermGen problems.

commented

Comment by EntityReborn

If the @api classloading mechanism is for extensions, switch to an embedded config file instead of loading every file.

commented

Comment by LadyCailin

I've given this a more thorough writeup here: http://forum.sk89q.com/threads/out-of-memory-errors.9568/

commented

Comment by LadyCailin

The permgen issues are now fixed. Closing! :D