Currently the diagnostics server is always created and there is no way of configuring the runtime to not do this. We should add an optional config switch that allows users to disable creation of the diagnostics server thread entirely.
cc @noahfalk @josalem
I'd recommend reusing the switch we already have: COMPLUS_EnableDiagnostics
@hoyosjs - this could also be used as a workaround to the performance issue you mentioned. I wasn't able to find it or I would I have linked it.
I think we should do this for 3.1. The implementation should be super-cheap and it is a good risk mitigation against future diagnostics server bugs we may discover.
dotnet/runtime#13275 was the issue @duskembayev was seeing. After shutdown the pipe seems to linger doing ACL queries under a sandboxed scenario. This is exactly the fix he had tried but it was just never hooked to the check. dotnet/coreclr#27137 fixes it, is there any way you can give this a try? Does this unblock you?
Reopening for 3.1 port
Fix has been merged to master. 3.1 port is here: dotnet/coreclr#27140
Closing as 3.1 port has been merged.
Most helpful comment
I think we should do this for 3.1. The implementation should be super-cheap and it is a good risk mitigation against future diagnostics server bugs we may discover.