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
Isolate SOS hosting from other debugger extensions that use managed code #6207
SOS should work when another WinDbg or LLDB extension that uses managed code has already started a runtime or loaded different dependency versions. This concerns independently loaded debugger extensions, not optional SOS extensions.
Current issues on main:
CoreCLR dependency conflicts: SOS infrastructure loads into Default, sharing assembly bindings with other managed debugger extensions. Incompatible dependencies loaded first can prevent initialization or break commands. ExtensionLoadContext isolates optional SOS extensions, not SOS infrastructure.
Existing-runtime handling: SOS selects a runtime and calls coreclr_initialize without explicitly handling an already-active CoreCLR. Its TPA/probing setup cannot be assumed to replace the existing host's configuration or make SOS assemblies discoverable there.
Framework/AppDomain isolation: SOS runs in the default AppDomain. Its failed-bind resolver cannot override incompatible bindings that already succeeded. A dedicated AppDomain could isolate dependencies, but managed objects cannot simply be shared across domains without marshaling/remoting. A native COM-compatible boundary can avoid remoting, provided the domain remains alive while the debugger retains interface pointers or callbacks. Unloading it would invalidate those pointers. AppDomain isolation also cannot replace the underlying CLR version.
Incomplete initialization recovery: Initialization publishes native pointers, the initialized flag, and managed singleton state before registration succeeds, without complete rollback. Failures can leave partial state and block reconfiguration. Windows may also fall back to Framework after CoreCLR initialization fails.
Configuration
Native SOS hosting in WinDbg or LLDB. The Framework/AppDomain path applies to supported Windows configurations.
Activity
Isolate SOS Framework hosting from debugger loads (#6208)
Isolate native SOS hosting in a private ALC