Skip to content

[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
backport/pr-123346-to-release/10.0
Feb 7, 2026
Merged

[release/10.0] [Mono]: Fix stackwalk callbacks calling mono_jit_info_get_method in async signal safe mode.#123792
steveisok merged 1 commit intorelease/10.0from
backport/pr-123346-to-release/10.0

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Jan 30, 2026

Backport of #123346 to release/10.0

/cc @lateralusX

Customer Impact

  • Customer reported
  • Found internally

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

  • Yes
  • No

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.

…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).
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Feb 6, 2026
@steveisok steveisok added Servicing-consider Issue for next servicing release review Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Feb 6, 2026
@steveisok steveisok merged commit cdc557a into release/10.0 Feb 7, 2026
74 of 76 checks passed
@steveisok steveisok deleted the backport/pr-123346-to-release/10.0 branch February 7, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants