pandorabox-io / pandorabox.io

Pandorabox infrastructure code
https://pandorabox.io
31 stars 4 forks source link

Various crashes #444

Closed thomasrudin closed 4 years ago

thomasrudin commented 4 years ago
minetest_1        | 2020-02-12 10:16:42: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'mob_horse' in callback luaentity_Step(): /data/world//worldmods/mobs/api.lua:252: attempt to index local 'v' (a nil value)
minetest_1        | 2020-02-12 10:16:42: ERROR[Main]: stack traceback:
minetest_1        | 2020-02-12 10:16:42: ERROR[Main]:   /data/world//worldmods/mobs/api.lua:252: in function 'get_velocity'
minetest_1        | 2020-02-12 10:16:42: ERROR[Main]:   /data/world//worldmods/mobs/api.lua:990: in function 'do_jump'
minetest_1        | 2020-02-12 10:16:42: ERROR[Main]:   /data/world//worldmods/mobs/api.lua:2083: in function 'do_states'
minetest_1        | 2020-02-12 10:16:42: ERROR[Main]:   /data/world//worldmods/mobs/api.lua:3253: in function 'func'
minetest_1        | 2020-02-12 10:16:42: ERROR[Main]:   ...ocal/share/minetest/builtin/profiler/instrumentation.lua:106: in function <...ocal/share/minetest/builtin/profiler/instrumentation.lua:100>
minetest_1        | 2020-02-12 10:34:22: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod '3d_armor' in callback environment_Step(): /data/world//worldmods/skinsdb/api.lua:5: attempt to index local 'player' (a nil value)
minetest_1        | 2020-02-12 10:34:22: ERROR[Main]: stack traceback:
minetest_1        | 2020-02-12 10:34:22: ERROR[Main]:   /data/world//worldmods/skinsdb/api.lua:5: in function 'get_player_skin'
minetest_1        | 2020-02-12 10:34:22: ERROR[Main]:   /data/world//worldmods/skinsdb/init.lua:37: in function 'get_player_skin'
minetest_1        | 2020-02-12 10:34:22: ERROR[Main]:   /data/world//worldmods/3d_armor/3d_armor/init.lua:249: in function 'init_player_armor'
minetest_1        | 2020-02-12 10:34:22: ERROR[Main]:   /data/world//worldmods/3d_armor/3d_armor/init.lua:308: in function 'func'
minetest_1        | 2020-02-12 10:34:22: ERROR[Main]:   /usr/local/share/minetest/builtin/common/after.lua:20: in function 'globalstep'
minetest_1        | 2020-02-12 10:34:22: ERROR[Main]:   ...//worldmods/monitoring/monitoring/builtin/globalstep.lua:29: in function <...//worldmods/monitoring/monitoring/builtin/globalstep.lua:20>
minetest_1        | 2020-02-12 10:34:22: ERROR[Main]:   /usr/local/share/minetest/builtin/game/register.lua:429: in function </usr/local/share/minetest/builtin/game/register.lua:413>
minetest_1        | 2020-02-12 10:37:25: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'default' in callback luaentity_Step(): /data/world//worldmods/mobs/api.lua:1013: bad argument #1 to 'sin' (number expected, got nil)
minetest_1        | 2020-02-12 10:37:25: ERROR[Main]: stack traceback:
minetest_1        | 2020-02-12 10:37:25: ERROR[Main]:   [C]: in function 'sin'
minetest_1        | 2020-02-12 10:37:25: ERROR[Main]:   /data/world//worldmods/mobs/api.lua:1013: in function 'do_jump'
minetest_1        | 2020-02-12 10:37:25: ERROR[Main]:   /data/world//worldmods/mobs/api.lua:2086: in function 'do_states'
minetest_1        | 2020-02-12 10:37:25: ERROR[Main]:   /data/world//worldmods/mobs/api.lua:3256: in function 'func'
minetest_1        | 2020-02-12 10:37:25: ERROR[Main]:   ...ocal/share/minetest/builtin/profiler/instrumentation.lua:106: in function <...ocal/share/minetest/builtin/profiler/instrumentation.lua:100>

Links

Potential causes

sfan5 commented 4 years ago
ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod '3d_armor' in callback environment_Step(): /data/world//worldmods/skinsdb/api.lua:5: attempt to index local 'player' (a nil value)
ERROR[Main]: stack traceback:
ERROR[Main]:    /data/world//worldmods/skinsdb/api.lua:5: in function 'get_player_skin'
ERROR[Main]:    /data/world//worldmods/skinsdb/init.lua:37: in function 'get_player_skin'
ERROR[Main]:    /data/world//worldmods/3d_armor/3d_armor/init.lua:249: in function 'init_player_armor'
ERROR[Main]:    /data/world//worldmods/3d_armor/3d_armor/init.lua:308: in function 'func'
ERROR[Main]:    /usr/local/share/minetest/builtin/common/after.lua:20: in function 'globalstep'
ERROR[Main]:    ...//worldmods/monitoring/monitoring/builtin/globalstep.lua:29: in function <...//worldmods/monitoring/monitoring/builtin/globalstep.lua:20>
ERROR[Main]:    /usr/local/share/minetest/builtin/game/register.lua:429: in function 

I don't think this is related to any change actually, just a plain mod bug.

sfan5 commented 4 years ago

The crashes in mobs_redo are more interesting, it seems on_step gets called despite the object being "gone" (as the engine calls it).

A simple workaround would be to do this, however this sounds like an engine bug and should be fixed there. i

Edit: Just checked the engine code, on_step is only called if the object still exists (since 5.0) so the actual issue here lies elsewhere.

thomasrudin commented 4 years ago

Thanks for investigating :+1:, i see if i can reproduce/fix that on the test-server the next few days...

Edit: Just checked the engine code, on_step is only called if the object still exists (since 5.0) so the actual issue here lies elsewhere.

Those bugs would justify a revert, right? The current state on the master branch won't work with most of the worlds out there... :disappointed:

sfan5 commented 4 years ago

Those bugs would justify a revert, right?

Hard to answer. The patch should not have broken any well behaving mods. Without having the mobs_redo crashes narrowed down, you don't know who's in the wrong, how many mods this would affect and whether the engine should be less strict.

sfan5 commented 4 years ago

Ok, figured out the mobs_redo issue: Inside on_step > do_env_damage > check_for_death the code might delete the entity. But the the rest of on_step (including the do_states seen in the backtrace) continues running and crashes when the (deleted) entity does not return useful values.

In short: Not an engine bug.

lhofhansl commented 4 years ago

Commented on minetest/minetest#9390. I noticed this too (with mobs_redo)

thomasrudin commented 4 years ago

patched with https://github.com/pandorabox-io/minetest_docker/commit/30b23262a9f56a28093ab3d88f3739cccc3c81d2, closing the issue...