Server Crash loading nether
#1
Hi, before I take this to github i would like to present it here, so I know if it is a general issue, or just has to be with my configuration.

The problem is that once I've created a nether portal, and the player jumps in , the server starts to load the chunks to prepare the spawn in the nether and before it ends loading the server crash.


[14:36:27] --- Started Log ---
[14:36:27] Cuberite Jenkins gcc armhf Release (master) build id: #298
[14:36:27] from commit id: 1395ff3ca4baf554f8b47a73ebd7bbf7635f59cb built at: Thu 17 Dec 11:37:13 CET 2015
[14:36:27] Creating new server instance...
[14:36:27] Reading server config...
[14:36:27] Starting server...
Info [14:36:27] Compatible clients: 1.7.x, 1.8.x
Info [14:36:27] Compatible protocol versions 4, 5, 47
Warn [14:36:28] WebServer: The server is running in unsecured HTTP mode.
Info [14:36:28] Put a valid HTTPS certificate in file 'webadmin/httpscert.crt' and its corresponding private key to 'webadmin/httpskey.pem' (without any password) to enable HTTPS support
[14:36:28] Loaded 448 crafting recipes
[14:36:28] Loaded 20 furnace recipes and 56 fuels
[14:36:28] Loaded 88 brewing recipes
[14:36:28] -- Loading Plugins --
[14:36:28] Initialized ChatLog v.3
[14:36:29] Initialised Core v.15
[14:36:29] Initialised Essentials v.0
[14:36:29] [EssentialsSpawn] Plugin v1 Enabled!
[14:36:29] Login is initialized
[14:36:29] Initialized TransAPI v.1
[14:36:29] Initialised Permissions v.5
[14:36:29] -- Loaded 7 Plugins --
[14:36:31] Preparing spawn (survival): 15.52% (97/625; 96.42 chunks / sec)
[14:36:32] Preparing spawn (survival): 40.16% (251/625; 151.43 chunks / sec)
[14:36:33] Preparing spawn (survival): 64.48% (403/625; 151.24 chunks / sec)
[14:36:34] Preparing spawn (survival): 89.76% (561/625; 156.75 chunks / sec)
[14:36:34] Startup complete, took 6884ms!
Info [14:38:31] Player RekuenLX has joined the game
Info [14:43:20] Player RekuenLX has left the game
Info [14:45:48] Player RekuenLX has joined the game
Warn [14:46:46] Unknown Finisher in the [Generator] section: "PieceStructures". Ignoring.
[14:46:47] Preparing spawn (survival_nether): 3.00% (12/400; 11.57 chunks / sec)
[14:46:48] Preparing spawn (survival_nether): 6.25% (25/400; 12.62 chunks / sec)
[14:46:49] Preparing spawn (survival_nether): 9.75% (39/400; 13.59 chunks / sec)
[14:46:50] Preparing spawn (survival_nether): 13.75% (55/400; 15.66 chunks / sec)
[14:46:51] Preparing spawn (survival_nether): 17.75% (71/400; 15.40 chunks / sec)
[14:46:52] Preparing spawn (survival_nether): 21.75% (87/400; 15.79 chunks / sec)
[14:46:53] Preparing spawn (survival_nether): 25.50% (102/400; 14.51 chunks / sec)
[14:46:54] Preparing spawn (survival_nether): 29.25% (117/400; 14.82 chunks / sec)
[14:46:55] Preparing spawn (survival_nether): 32.75% (131/400; 13.99 chunks / sec)
[14:46:56] Preparing spawn (survival_nether): 37.25% (149/400; 17.11 chunks / sec)
[14:46:57] Preparing spawn (survival_nether): 40.75% (163/400; 13.92 chunks / sec)
[14:46:58] Preparing spawn (survival_nether): 45.25% (181/400; 17.49 chunks / sec)
[14:46:59] Preparing spawn (survival_nether): 50.00% (200/400; 17.89 chunks / sec)
[14:47:00] Preparing spawn (survival_nether): 54.75% (219/400; 18.65 chunks / sec)
[14:47:01] Preparing spawn (survival_nether): 59.75% (239/400; 19.14 chunks / sec)
[14:47:02] Preparing spawn (survival_nether): 64.50% (258/400; 18.30 chunks / sec)
[14:47:03] Preparing spawn (survival_nether): 69.25% (277/400; 18.43 chunks / sec)
[14:47:04] Preparing spawn (survival_nether): 73.75% (295/400; 17.70 chunks / sec)
[14:47:05] Preparing spawn (survival_nether): 78.00% (312/400; 16.72 chunks / sec)
Err [14:47:06] Deadlock detected, aborting the server
Err [14:47:06] D: | Cuberite has encountered an error and needs to close
Err [14:47:06] Details | SIGABRT: Server self-terminated due to an internal fault
Err [14:47:06] Cuberite Jenkins gcc armhf Release (master) build id: #298
Err [14:47:06] from commit id: 1395ff3ca4baf554f8b47a73ebd7bbf7635f59cb built at: Thu 17 Dec 11:37:13 CET 2015


That's the log, I'm running the server on a Raspberry Pi 2, minimal raspbian netinstall image, and just the Cuberite Server, latest build from today.

Hope you can help me, I'm going to debug more in depth to get more info.

Thanks.
Reply
Thanks given by:
#2
The problem is, the deadlock detector aborts the server if a tick takes about 20 seconds. I would suggest changing the value of IntervalSec in settings.ini to 120 seconds.
Reply
Thanks given by:
#3
(12-18-2015, 02:14 AM)Seadragon91 Wrote: The problem is, the deadlock detector aborts the server if a tick takes about 20 seconds. I would suggest changing the value of IntervalSec in settings.ini to 120 seconds.

Thanks , that solves the problem, now i have another one, is not a big one as it not crash the server , has something to do with the EssetialsSpawn plugin, so I will open a bug in the plugin github repo.

[16:25:11] Error in plugin EssentialsSpawn calling function <callback>()
[16:25:11] LUA: Plugins/EssentialsSpawn/main.lua:60: attempt to compare number with nil
[16:25:11] Stack trace:
[16:25:11] Plugins/EssentialsSpawn/main.lua(60): IsInSpawn
[16:25:11] Plugins/EssentialsSpawn/hooks.lua(55): (no name)
[16:25:11] Stack trace end
[16:25:11] Error in plugin EssentialsSpawn calling function <callback>()
[16:25:11] LUA: Plugins/EssentialsSpawn/main.lua:60: attempt to compare number with nil
[16:25:11] Stack trace:
[16:25:11] Plugins/EssentialsSpawn/main.lua(60): IsInSpawn
[16:25:11] Plugins/EssentialsSpawn/hooks.lua(55): (no name)
[16:25:11] Stack trace end
[16:25:11] Error in plugin EssentialsSpawn calling function <callback>()
[16:25:11] Lua engine: attempting to push a plain pointer, pushing nil instead.
[16:25:11] This indicates an unimplemented part of MCS bindings
[16:25:11] Stack trace:
[16:25:11] Stack trace end
[16:25:11] LUA: Plugins/EssentialsSpawn/main.lua:60: attempt to compare number with nil
[16:25:11] Stack trace:
[16:25:11] Plugins/EssentialsSpawn/main.lua(60): IsInSpawn
[16:25:11] Plugins/EssentialsSpawn/hooks.lua(45): (no name)
[16:25:11] Stack trace end
[16:25:11] Error in plugin EssentialsSpawn calling function <callback>()
[16:25:11] LUA: Plugins/EssentialsSpawn/main.lua:60: attempt to compare number with nil
[16:25:11] Stack trace:
[16:25:11] Plugins/EssentialsSpawn/main.lua(60): IsInSpawn
[16:25:11] Plugins/EssentialsSpawn/hooks.lua(79): (no name)
[16:25:11] Stack trace end
[16:25:11] Error in plugin EssentialsSpawn calling function <callback>()
[16:25:11] LUA: Plugins/EssentialsSpawn/main.lua:60: attempt to compare number with nil
[16:25:11] Stack trace:
[16:25:11] Plugins/EssentialsSpawn/main.lua(60): IsInSpawn
[16:25:11] Plugins/EssentialsSpawn/hooks.lua(95): (no name)
[16:25:11] Stack trace end
[16:25:11] Error in plugin EssentialsSpawn calling function <callback>()
[16:25:12] LUA: Plugins/EssentialsSpawn/main.lua:60: attempt to compare number with nil
[16:25:12] Stack trace:
[16:25:12] Plugins/EssentialsSpawn/main.lua(60): IsInSpawn
[16:25:12] Plugins/EssentialsSpawn/hooks.lua(79): (no name)
[16:25:12] Stack trace end
[16:25:12] Error in plugin EssentialsSpawn calling function <callback>()
[16:25:13] LUA: Plugins/EssentialsSpawn/main.lua:60: attempt to compare number with nil
[16:25:13] Stack trace:
[16:25:13] Plugins/EssentialsSpawn/main.lua(60): IsInSpawn
[16:25:13] Plugins/EssentialsSpawn/hooks.lua(79): (no name)
[16:25:13] Stack trace end
[16:25:13] Error in plugin EssentialsSpawn calling function <callback>()
[16:25:14] Lua engine: attempting to push a plain pointer, pushing nil instead.
[16:25:14] This indicates an unimplemented part of MCS bindings
[16:25:14] Stack trace:
[16:25:14] Stack trace end
[16:25:14] LUA: Plugins/EssentialsSpawn/main.lua:60: attempt to compare number with nil
[16:25:14] Stack trace:
[16:25:14] Plugins/EssentialsSpawn/main.lua(60): IsInSpawn
[16:25:14] Plugins/EssentialsSpawn/hooks.lua(45): (no name)
[16:25:14] Stack trace end
[16:25:14] Error in plugin EssentialsSpawn calling function <callback>()
[16:25:14] LUA: Plugins/EssentialsSpawn/main.lua:60: attempt to compare number with nil
[16:25:14] Stack trace:
[16:25:14] Plugins/EssentialsSpawn/main.lua(60): IsInSpawn
[16:25:14] Plugins/EssentialsSpawn/hooks.lua(79): (no name)
[16:25:14] Stack trace end
[16:25:14] Error in plugin EssentialsSpawn calling function <callback>()
[16:25:15] LUA: Plugins/EssentialsSpawn/main.lua:60: attempt to compare number with nil
Reply
Thanks given by:
#4
Created a pull request, that changes the interval of the deadlock detector to 120 seconds. This should be enough time for the world to be generated.

https://github.com/cuberite/cuberite/pull/2765
Reply
Thanks given by: Rekuen
#5
I still think this is a bug in the server, the Nether world shouldn't suddenly start being accessible in the middle of the game. Either declare all the worlds, or suffer their nonexistence.
Reply
Thanks given by:
#6
(12-18-2015, 02:41 AM)xoft Wrote: I still think this is a bug in the server, the Nether world shouldn't suddenly start being accessible in the middle of the game. Either declare all the worlds, or suffer their nonexistence.

Why don't precharge the world as the others? it would take a little longer to start the server, better that than waiting in the portal like 20 secs or more depending on the hardware, the first time you enter.
Reply
Thanks given by:
#7
Exactly! But for that the world needs to be initialized at startup (by adding it to settings.ini), and not at portal activation. Which has the unfortunate side-effect that if you don't specify all the worlds properly in settings.ini, portals would appear as not-working. And many people would report that as a bug.
Reply
Thanks given by:
#8
I was thinking of redesigning the world creation to generate an overworld/end/nether on startup, and put them into folders, like Vanilla does.

If plugins want to create new worlds, well... Windows has restarted for tens of years to install updates, why can't our humble server do the same to generate a world?
Reply
Thanks given by:
#9
One thing I've never understood is why the spawn initialization happens on the creating thread, and not the first act of the tick thread.

I suggest we get rid of CreateAndInitalizeWorld, and replace it with a method that inits the spawn asynchronously. We'll have to deal with interactions with uninitialized worlds, but thats probably the best way to fix this.
Reply
Thanks given by:
#10
Ok so, I think plugins SHOULD be allowed to create new worlds, BUT, it would likely have the same problem as spigot plugins that do it: they can time out the server. Yes, the plugins generate outside of the world tick thread, but if the generation takes up too much processing power or memory, the server can crash (I'm speaking from experience here, it's not hard to crash a server with world gen. Try loading a Citiworld world on a server with <2 gigs ram using Multiverse. It either takes 1-4 minutes or takes everything down with it).

So long as a plugin can load an exact copy of the overworld by using the same speed without crashing the server, it should be fine. Doesn't matter if a custom gen crashes it, that's the server owner's problem.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)