Disable suspend on shutdown during shutdown finalization
authorKoundinya Veluri <kouvel@microsoft.com>
Thu, 19 Nov 2015 18:51:06 +0000 (10:51 -0800)
committerKoundinya Veluri <kouvel@microsoft.com>
Tue, 8 Dec 2015 19:19:11 +0000 (11:19 -0800)
commitb18d2a7e30a0d7066d2c09711de07488a7dec475
treef8d10d42ec0e90e16b1ea390a49b12d3c9638d45
parent49f5b95ee35535189229525947cdb9af245bb4f9
Disable suspend on shutdown during shutdown finalization

The main thread does not time out waiting for the finalizer thread to complete during shutdown. Cases examined had the main thread blocked waiting for the finalizer thread to complete its work. The finalizer thread was blocked on either the "waiting for GC completion" event or one of the the GC spinlocks. Another thread was blocked for shutdown after entering the spinlock while allocating, or during GC. Allowing other threads to suspend for shutdown could cause the finalizer thread to block indefinitely, leading to a deadlock.
src/vm/finalizerthread.cpp
tests/src/GC/Scenarios/FinalizeTimeout/FinalizeTimeout.cs [new file with mode: 0644]
tests/src/GC/Scenarios/FinalizeTimeout/FinalizeTimeout.csproj [new file with mode: 0644]
tests/src/GC/Scenarios/FinalizeTimeout/project.json [new file with mode: 0644]
tests/src/GC/Scenarios/FinalizeTimeout/project.lock.json [new file with mode: 0644]