Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server crash causes a segfault on the client #15703

Open
a-tour-ist opened this issue Jan 22, 2025 · 0 comments
Open

server crash causes a segfault on the client #15703

a-tour-ist opened this issue Jan 22, 2025 · 0 comments
Labels
@ Server / Client / Env. Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible

Comments

@a-tour-ist
Copy link

Luanti version

Luanti 5.11.0-dev-debug-af3f69642 (Linux)
Using LuaJIT 2.1.1731601260
Built by GCC 14.2
Running on Linux/6.11.11 x86_64
BUILD_TYPE=Debug
RUN_IN_PLACE=1
USE_CURL=1
USE_GETTEXT=1
USE_SOUND=1
STATIC_SHAREDIR="."
STATIC_LOCALEDIR="locale"

Operating system and version

Manjaro Linux

CPU model

Intel© Core™ i7-7600U CPU @ 2.80GHz × 2

GPU model

Intel Corporation HD Graphics 620

Active renderer

4.6/opengl3/SDL

Summary

If the server crashes from a faulty allow_metadata_inventory_* / on_metadata_inventory_, the client that performed the action leading to the server crash will experience a segmentation fault.

Thread 1 "luanti" received signal SIGSEGV, Segmentation fault.
0x0000555557876200 in ?? ()
#0  0x0000555557876200 in ?? ()
#1  0x0000555555996437 in GUIInventoryList::getItemIndexAtPos (this=0x555559275e00, p=...) at /home/tour/Dokumente/yl/minetest/src/gui/guiInventoryList.cpp:217
#2  0x0000555555996229 in GUIInventoryList::OnEvent (this=0x555559275e00, event=...) at /home/tour/Dokumente/yl/minetest/src/gui/guiInventoryList.cpp:182
#3  0x0000555555f4f7f0 in irr::gui::CGUIEnvironment::postEventFromUser (this=0x555557689080, event=...) at /home/tour/Dokumente/yl/minetest/irr/src/CGUIEnvironment.cpp:529
#4  0x0000555555f4be84 in irr::CIrrDeviceStub::postEventFromUser (this=0x5555565b9590, event=...) at /home/tour/Dokumente/yl/minetest/irr/src/CIrrDeviceStub.cpp:205
#5  0x0000555555f3fe92 in irr::CIrrDeviceSDL::run (this=0x5555565b9590) at /home/tour/Dokumente/yl/minetest/irr/src/CIrrDeviceSDL.cpp:790
#6  0x000055555577d5c1 in RenderingEngine::run (this=0x5555565d4ad0) at /home/tour/Dokumente/yl/minetest/src/client/renderingengine.h:141
#7  0x000055555582094c in Game::shutdown (this=0x7fffffffd1f0) at /home/tour/Dokumente/yl/minetest/src/client/game.cpp:1086
#8  0x0000555555834b1b in the_game (kill=0x55555654e360 <porting::g_killed>, input=0x55555768b830, rendering_engine=0x5555565d4ad0, start_data=..., error_message="AsyncErr: Lua: Runtime error from mod 'default' in callback nodemeta_inventory_AllowPut(): .../yl/minetest/games/minetest_game/mods/default/chests.lua:126: attempt to compare number with nil\nstack tra"..., chat_backend=..., reconnect_requested=0x7fffffffd564) at /home/tour/Dokumente/yl/minetest/src/client/game.cpp:4165
#9  0x00005555557af563 in ClientLauncher::run (this=0x7fffffffd920, start_data=..., cmd_args=...) at /home/tour/Dokumente/yl/minetest/src/client/clientlauncher.cpp:203
#10 0x0000555555ca43d2 in main (argc=2, argv=0x7fffffffdde8) at /home/tour/Dokumente/yl/minetest/src/main.cpp:265

Steps to reproduce

  • start a server (version does not matter) with a faulty inventory callback (I added a local t = nil > 3 in default:chest's allow_metadata_inventory_put)
  • join and perform the inventory action that will lead to the servercrash

Singleplayer segfault too, but it sometimes returns normally to the main menu...

@a-tour-ist a-tour-ist added the Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Server / Client / Env. Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible
Projects
None yet
Development

No branches or pull requests

2 participants