Fix hang on Ctrl+C when tiering is enabled (#16719)
authorKoundinya Veluri <kouvel@users.noreply.github.com>
Tue, 6 Mar 2018 19:42:13 +0000 (11:42 -0800)
committerGitHub <noreply@github.com>
Tue, 6 Mar 2018 19:42:13 +0000 (11:42 -0800)
commit88e9fb63e5e49ce72a50e2e677fa74d951dc5057
tree9762da02b78efeb1bb532ab63063204520f8b0b1
parent063e8d07f80c8e7e026e42b52cbe9addf50c884d
Fix hang on Ctrl+C when tiering is enabled (#16719)

Fix hang on Ctrl+C when tiering is enabled

- When the work thread count is nonzero at the time of Ctrl+C, by the time `TieredCompilationManager::Shutdown(BOOL)` runs (during `DllMain` for process detach), the background worker thread has already been torn down abruptly and it does not get a chance to exit gracefully and set the event, and Shutdown() hangs the process waiting for the event forever.
- It looks like there is no benefit to waiting for the work to complete, fixed by removing the wait and the event
- In the MusicStore benchmark it looks like the arch folder was missing in the 'publish' folder path. In case there is a difference in bin directory layout between the CI dotnet and current dotnet, changed to check for both paths.
src/vm/appdomain.cpp
src/vm/ceemain.cpp
src/vm/tieredcompilation.cpp
src/vm/tieredcompilation.h
tests/src/performance/Scenario/JitBench/Benchmarks/MusicStoreBenchmark.cs