Improve VM crash dumping#1637
Merged
slipher merged 4 commits intoDaemonEngine:masterfrom Apr 13, 2025
Merged
Conversation
It turns out that using SetUnhandledExceptionFilter clobbers the standard library's mechanism for calling std::terminate on unhandled exceptions.
Now we can both produce a crash dump, and report the exception message with SendMsg<ErrorMsg> (which sets the text in the UI error message). 6ebd858 was supposed to do that, but I messed up the final version of the commit and called SendMsg<ErrorMsg> too early, so the crash dump was not produced.
So server owners who want to get Unix core dumps for native exe gamelogic could set sgame.nativeExeCrashHandler to 0. Doing this stops the crash handler from being installed. In case of a fatal C++ exception we still install the terminate handler so we can log the exception message, but afterward, if the cvar is off, we call abort() instead of shutting down with the ErrorMsg IPC.
Member
Author
|
I guess I will merge this in honor of merging without review day. |
Member
|
Yes, we better merge that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sgame.nativeExeCrashHandler(likewise for cgame) which can be used to disable the crash handler in order to produce traditional core dumps for native exe gamelogic.Note: to test NaCl crash handling on amd64 Linux, you need the fixed
nacl_loaderfrom #1504 (comment).