-
-
Notifications
You must be signed in to change notification settings - Fork 77
Description
Fill out general information
OS (windows, linux, ...): Linux, Debian 12
BeamMP-Server Version: v3.8.5, v3.9.0
Describe the bug
This bug occurred in CaRP.
I debugged the core dump, and essentially the bug is that the stack is in an unexpected state (either due to a threading-related data race, or because it's empty), and then some call across the C++-Lua boundary somewhere panics. This causes the LuaAPI::PanicHandler to be called, which in turn tries to access the stack. This panics Lua, calling the PanicHandler, and so on.
This eventually exhausts the (real) stack of the machine and crashes the server.
The same crash is reproducible with the reproduction steps below, but the CaRP codebase does NOT contain that code. The error is likely different, even though this reproduction might help fix the symptom.
I would carefully suggest running the server with some sanitizers like TSAN or valgrind in production.
To Reproduce
Steps to reproduce similar behavior:
- Make a Lua plugin with the content
error(nil) - Run the server
Expected behavior
A panic log and the server continues to run as usual, just without the errored plugin.