You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Func-eval while runtime is suspended may not run due to deadlock (timing issue) #1537
It cannot acquire the lock and the func-eval times out. There doesn't seem to be any other instance of notifying the debugger of a cross-thread dependency (though something like NotifyOfCrossThreadDependency) from the VM side. It still wouldn't allow the func-eval to run anyway.
Best way to fix probably would be to not enter cooperative GC mode while holding a regular lock, such that the runtime cannot be suspended while holding the lock. This would mean entering cooperative GC mode before acquiring the lock, requiring that the lock be an unsafe any-mode lock, which in turn means that no GC_TRIGGERS work may be done inside the lock. May be doable, need to see what it would entail.
Reacted by John, Martijn Sneijders, Francesco Pretto and Steve Ognibene
Disabling tiered compilation should help when debugging, although it can't be disabled if attaching to a running app that already has it enabled. Tiered compilation may be disabled in the following ways:
Project file (with a clean build after changes to the property):
Activity
Fail FuncEval if slot backpatching lock is held by any thread (#2380)
[3.1] Fail FuncEval if slot backpatching lock is held by any thread (#…
nszeitli commentedon Feb 25, 2020
If this is the "To prevent an unsafe abort" root cause, is there a known workaround at this time?
kouvel commentedon Feb 25, 2020
Disabling tiered compilation should help when debugging, although it can't be disabled if attaching to a running app that already has it enabled. Tiered compilation may be disabled in the following ways:
Project file (with a clean build after changes to the property):
.runtimeconfig.json
Environment variable:
kouvel commentedon Mar 4, 2020
Fixed in 3.1 with dotnet/coreclr#28006, and fixed in master with #32250 (original PR #2380)