Skip to content

Conversation

@MichalStrehovsky
Copy link
Member

Just want to run native AOT outerloop on this.

Reverts #122048

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

@MichalStrehovsky
Copy link
Member Author

/azp run runtime-nativeaot-outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reverts changes from #122048 that introduced an async-safe thread lookup mechanism for signal handlers on Unix platforms. The revert is being done to run native AOT outerloop tests and removes the lock-free thread map implementation that was designed to safely retrieve thread information from signal handlers without relying on thread-local storage.

Key changes:

  • Removes the async-safe thread map implementation and reverts to TLS-based thread lookup in signal handlers
  • Removes minipal_get_current_thread_id_no_cache() and related async-safe lookup functions
  • Reverts ExecutionManager changes that added IsManagedCodeNoLock() for lockless managed code checking

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/native/minipal/thread.h Removes minipal_get_current_thread_id_no_cache() function and related preprocessor guards
src/coreclr/vm/threadsuspend.cpp Reverts CheckActivationSafePoint to use GetThreadNULLOk() and IsManagedCode() instead of async-safe variants
src/coreclr/vm/threads.h Removes declaration of GetThreadAsyncSafe() function
src/coreclr/vm/threads.cpp Removes async-safe thread map integration from SetThread and removes GetThreadAsyncSafe() implementation
src/coreclr/vm/codeman.h Reverts GetScanFlags signature to take no parameters and removes IsManagedCodeNoLock() declaration
src/coreclr/vm/codeman.cpp Reverts GetScanFlags implementation and removes IsManagedCodeNoLock() function
src/coreclr/vm/CMakeLists.txt Removes asyncsafethreadmap.cpp from the build on Unix platforms
src/coreclr/runtime/asyncsafethreadmap.h Deletes header file for async-safe thread map
src/coreclr/runtime/asyncsafethreadmap.cpp Deletes implementation of lock-free thread map for signal handlers
src/coreclr/pal/src/exception/signal.cpp Restructures control flow in inject_activation_handler (indentation change only)
src/coreclr/nativeaot/Runtime/unix/PalUnix.cpp Reverts ActivationHandler to call HijackCallback with NULL thread and retrieves thread after hijack
src/coreclr/nativeaot/Runtime/threadstore.h Removes declaration of GetCurrentThreadIfAvailableAsyncSafe()
src/coreclr/nativeaot/Runtime/threadstore.cpp Removes async-safe thread map integration from thread attach/detach and removes GetCurrentThreadIfAvailableAsyncSafe()
src/coreclr/nativeaot/Runtime/CMakeLists.txt Removes asyncsafethreadmap.cpp from the NativeAOT runtime build

@agocke
Copy link
Member

agocke commented Dec 10, 2025

I queued https://dev.azure.com/dnceng-public/public/_build/results?buildId=1227009 and https://dev.azure.com/dnceng-public/public/_build/results?buildId=1227023 to test the same theory, and I think this is the cause of the failures.

cc @janvorli

@agocke
Copy link
Member

agocke commented Dec 11, 2025

Remaining NAOT arm64 outerloop failure is in Globalization.Tests.JapaneseCalendarTests so I think this confirms that #122048 is the cause.

@agocke agocke enabled auto-merge (squash) December 11, 2025 23:16
@agocke
Copy link
Member

agocke commented Dec 11, 2025

/ba-g failures are nuget in outerloop

@agocke agocke merged commit ef183e9 into main Dec 11, 2025
184 of 192 checks passed
@agocke agocke deleted the revert-122048-fix-async-thread-by-threadid-lookup branch December 11, 2025 23:18
@github-actions github-actions bot locked and limited conversation to collaborators Jan 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants