Revert "Fix lookup for current Thread in async signal handler"#122415
Revert "Fix lookup for current Thread in async signal handler"#122415
Conversation
This reverts commit ee898ca.
|
Tagging subscribers to this area: @mangod9 |
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
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 |
|
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 |
|
Remaining NAOT arm64 outerloop failure is in Globalization.Tests.JapaneseCalendarTests so I think this confirms that #122048 is the cause. |
|
/ba-g failures are nuget in outerloop |
Just want to run native AOT outerloop on this.
Reverts #122048