[tracer] Fix potential crash at shutdown - #9191
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d708ef0ffa
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (9191) and master. ✅ No regressions detected |
BenchmarksBenchmark execution time: 2026-09-07 20:07:35 Comparing candidate commit 52f85a0 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 72 metrics, 0 unstable metrics, 66 known flaky benchmarks, 60 flaky benchmarks without significant changes.
|
52f85a0 to
c11c981
Compare
Summary of changes
Fix calls into CLR for an unloaded module.
Reason for change
At shutdown, ReJit can call into the CLR for an unloaded module and this leads to a crash.
Implementation details
The idea is to handle modules clean up while we have in-flight ReJIT requests.
handlers: for ReJIT handler, we remove reused module ID.Test coverage
Other details
I reproduced the crash locally by adding a
sleepin theEnqueueThreadLoopinfinite-loop to simulate thread descheduling, processing slowness... and this PR actually fixes the crash.