Double0negative / Survival-Games

Survival Games plugin for Bukkit
62 stars 133 forks source link

Freeze on crash instead of restart. #17

Open columb opened 11 years ago

columb commented 11 years ago

SurvivalGames prevents server from restart on crash. 12:52:09 [INFO] [SurvivalGames] Disabling SurvivalGames v0.5.8

DerpgonCz commented 11 years ago

Make sure you are running the right Bukkit, Vault, WorldEdit version, also use http://pastebin.com/ to send us the whole 'server.log'. When does this happen? What other plugins are you using?

columb commented 11 years ago

Bukkit(spigot) is 1.5.2, WorldEdit with 1.5.2 support and Vault isn't outdated yet. Server log size is about ~100mb and there is no need to share it. It's looks like it's keep crashing because HungerPlusPlus but it's happens about 0-1 times a day. This isn't a issue at all for me because server restart positive effect server perfomance. I even have to restart server like every ~16 hours in order to keep it lag free. The issue is that SurvivalGames can't shutdown itself properly on crash.

DerpgonCz commented 11 years ago

Basically, when server crashes, SG fails to properly disable?

Double0negative commented 11 years ago

This isn't really a issue with SG, if the servers crashed its not like I have control any more over whats happening. My guess is its not able to rollback the blocks since the main thread is dead.

columb commented 11 years ago

@DragonCzz Yeap! @Double0negative After force stop (ctrl+c) maps isn't damaged.

Double0negative commented 11 years ago

So the maps are resetting correctly? Would it be possible to get a thread dump?

columb commented 11 years ago

@Double0negative Here we go. http://paste.ubuntu.com/5657545/

Double0negative commented 11 years ago

What version are you running? Your line numbers don’t match up with the current code.

columb commented 11 years ago

@Double0negative Can't remember, sorry. What was the latest version for 6 May 6.28 PM UTC+4? http://ci.drtshock.com/job/SurvivalGames/changes You should also add build number from jenkins into your version. Or shoul I update SG to latest build and wait for crash again?

Double0negative commented 11 years ago

It would help, the line number is occurring outside of any current methods so its not much help.

columb commented 11 years ago

@Double0negative Build 24 http://paste.ubuntu.com/5660649/

Double0negative commented 11 years ago

Ok so its deadlocking on

p.teleport(SettingsManager.getInstance().getLobbySpawn());

which im assuming its because the player can't be teleported since the main thread is dead. Not sure what I can do about that.

columb commented 11 years ago

Detect that main thread is dead and cancel anything to allow server restart properly? What happens when server force stops?

Double0negative commented 11 years ago

Its not as simple as just detecting that the main thread is dead, besides, the server has already crashed, the behaviour afterwords is unpredictable to begin with. if you really want to shut the server down on crash, use this https://gist.github.com/Double0negative/5594808

columb commented 11 years ago

http://pastebin.com/YUs6GvK5