summaryrefslogtreecommitdiff
path: root/.dotnet/LICENSE.txt
diff options
context:
space:
mode:
authorKoundinya Veluri <kouvel@users.noreply.github.com>2020-02-18 16:46:37 -0500
committerGitHub <noreply@github.com>2020-02-18 16:46:37 -0500
commitc5d3d752260383fbed72ba2b4d86d82fea673c76 (patch)
treeccf26422210e03ad5b777c688d7c1cafde875c5f /.dotnet/LICENSE.txt
parentb4b4098794a58914e4a1d2897c59d1fe995d1a0d (diff)
downloadcoreclr-c5d3d752260383fbed72ba2b4d86d82fea673c76.tar.gz
coreclr-c5d3d752260383fbed72ba2b4d86d82fea673c76.tar.bz2
coreclr-c5d3d752260383fbed72ba2b4d86d82fea673c76.zip
[3.1] Fail FuncEval if slot backpatching lock is held by any thread (#28006)
- In many cases cooperative GC mode is entered after acquiring the slot backpatching lock and the thread may block for debugger suspension while holding the lock. A FuncEval may time out on entering the lock if for example it calls a virtual or interface method for the first time. Failing the FuncEval when the lock is held enables the debugger to fall back to other options for expression evaluation. - Also added polls for debugger suspension before acquiring the slot backpatching lock on background threads that often operate in preemptive GC mode. A common case is when the debugger breaks while the tiering delay timer is active, the timer ticks shortly afterwards (after debugger suspension completes) and if a thread pool thread is already available, the background thread would block while holding the lock. The poll checks for debugger suspension and pulses the GC mode to block before acquiring the lock. Risks: - The fix is only a heuristic and lessens the problem when it is detected that the lock is held by some thread. Since the lock is acquired in preemptive GC mode, it is still possible that after the check at the start of a FuncEval, another thread acquires the lock and the FuncEval may time out. The polling makes it less likely for the lock to be taken by background tiering work, for example if a FuncEval starts while rejitting a method. - The expression evaluation experience may be worse when it is detected that the lock is held, and may still happen from unfortunate timing - Low risk for the change itself Port of https://github.com/dotnet/runtime/pull/2380 Fix for https://github.com/dotnet/runtime/issues/1537
Diffstat (limited to '.dotnet/LICENSE.txt')
0 files changed, 0 insertions, 0 deletions