[release/10.0] [Mono]: Fix stackwalk callbacks calling mono_jit_info_get_method in async signal safe mode.#123792
Merged
steveisok merged 1 commit intorelease/10.0from Feb 7, 2026
Conversation
…nc signal safe mode. As part of d34ef7e a number of additional stack walking scenarios that could run as async signal safe (called from signal handlers), was flag as being async, preventing loading of full MonoJitInfo. An AOT methods MonoJitInfo loaded when a thread runs in async signal safe mode can't be passed to mono_jit_info_get_method or it will trigger the following assert: Assertion jit-info.c:918 (!ji->async) There are some issues reporting this assert for .net10, like: #122797 After looking over the changes done in d34ef7e it appears that two scenarios, get_thread_dump and mono_handle_native_crash could hit scenarios where it would call mono_jit_info_get_method using MonoJitInfo loaded under async signal safe mode. This PR fixes both these scenarios making sure they correctly check the async state of MonoJitInfo before calling mono_jit_info_get_method. For more details, #122797 (comment).
steveisok
approved these changes
Feb 6, 2026
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.
Backport of #123346 to release/10.0
/cc @lateralusX
Customer Impact
Fixes an assert (Assertion jit-info.c:918 (!ji->async)) that can occur when stackwalk callbacks call mono_jit_info_get_method in async signal safe mode. This affects scenarios like get_thread_dump and mono_handle_native_crash on AOT methods.
Fixes #122797
Regression
Regressed in .NET 10 due to d34ef7e which added additional stack walking scenarios that could run as async signal safe.
Testing
Manually verified.
Risk
Low
The changes are minimal (2 files changed, 3 insertions, 3 deletions) and correctly check the async state of MonoJitInfo before calling mono_jit_info_get_method.