Skip to content

coreclr debug session ends silently on x64 Linux when debugging application with large assembly load — vsdbg DBI-Callback thread crashes in libmscordaccore.so #9097

@fraguada

Description

@fraguada

Type: Bug

Issue Description

Environment:

  • Extension: ms-dotnettools.csharp 2.130.5 (linux-x64)
  • vsdbg: ~/.vscode/extensions/ms-dotnettools.csharp-2.130.5-linux-x64/.debugger/vsdbg
  • .NET: 9.0.3 (also reproduced with 9.0.1 and 9.0.2)
  • OS: Ubuntu 24.04 x86_64

A coreclr launch configuration exits silently — no terminated or exited event, no error in the Debug Console — when the target .NET 9 application loads a large number of assemblies at runtime (~316 managed assemblies + many native .so libraries via a third-party SDK). With "engineLogging": true, the session stops producing output after the last assembly load notification; no further protocol messages are received from vsdbg.

The target process itself continues running normally — only vsdbg is affected.

sudo dmesg reveals the cause — vsdbg's own DBI-Callback thread crashing inside libmscordaccore.so:

[  778.946248] DBI-Callback[10410]: segfault at 0 ip 00007bcc8ce067b5 sp 00007bcc8cbfc940 error 4 in libmscordaccore.so[2057b5,7bcc8ccae000+1a5000] likely on CPU 9 (core 9, socket 0)
[  778.946259] Code: 0a e4 ff 48 63 0c 8a 48 01 d1 ff e1 4c 8b 6d d0 49 8b bd 98 00 00 00 48 89 7d a0 be 08 00 00 00 ba 01 00 00 00 e8 6b 96 f2 ff <48> 8b 00 49 89 44 dd 78 48 8b 45 c8 48 85 c0 74 0c 48 8b 4d a0 48
[ 1993.518127] DBI-Callback[18733]: segfault at 0 ip 00007acf156067b5 sp 00007acf153fc940 error 4 in libmscordaccore.so[2057b5,7acf154ae000+1a5000] likely on CPU 9 (core 9, socket 0)
[ 1993.518136] Code: 0a e4 ff 48 63 0c 8a 48 01 d1 ff e1 4c 8b 6d d0 49 8b bd 98 00 00 00 48 89 7d a0 be 08 00 00 00 ba 01 00 00 00 e8 6b 96 f2 ff <48> 8b 00 49 89 44 dd 78 48 8b 45 c8 48 85 c0 74 0c 48 8b 4d a0 48
[ 2021.466030] DBI-Callback[19191]: segfault at 0 ip 000072f9e04067b5 sp 000072f9c6ffa940 error 4 in libmscordaccore.so[2057b5,72f9e02ae000+1a5000] likely on CPU 8 (core 8, socket 0)
[ 2021.466041] Code: 0a e4 ff 48 63 0c 8a 48 01 d1 ff e1 4c 8b 6d d0 49 8b bd 98 00 00 00 48 89 7d a0 be 08 00 00 00 ba 01 00 00 00 e8 6b 96 f2 ff <48> 8b 00 49 89 44 dd 78 48 8b 45 c8 48 85 c0 74 0c 48 8b 4d a0 48
  • Faulting instruction 48 8b 00 = MOV RAX, [RAX] — null dereference in vsdbg's DBI-Callback thread
  • All three crashes are at identical offset 2057b5 with byte-for-byte identical faulting code — fully deterministic
  • Two of the three crashes occurred with justMyCode: true — the setting has no effect on the crash
  • The crash was also observed with .NET 9.0.1 at offset 2056d5

Attempted configuration mitigations (none successful):

  • justMyCode: true — no effect, crash still occurs (verified in dmesg)
  • DOTNET_DbgEnableMiniDump: "0" — no effect
  • enableStepFiltering: false — no effect

Steps to Reproduce

Not reproducible:
While I can reproduce this on different x86_64 systems with my application, I have not been able to create a reproduction that I can share. I tried loading many dynamic assemblies, or assemblies from disk, and vsdbg worked fine.
This has been an issue for two or three years with my application, and it is why my dev environment is arm64, since debugging works fine there with the same application and setup.

  • "type": "lldb" on the same binary — works correctly
  • linux-arm64 with the arm64 extension build (ms-dotnettools.csharp-2.130.5-linux-arm64) — coreclr debugging works correctly there with the same application

Two issues here:

Expected Behavior

vsdbg should not crash on x86_64

Actual Behavior

vsdbg crashes on x86_64

Workaround

Use "type": "lldb" in the VS Code launch configuration until upstream is fixed. Alternatively, debug on linux-arm64 — the arm64 build of vsdbg (ms-dotnettools.csharp-2.130.5-linux-arm64) does not exhibit this crash and coreclr debugging works correctly there with the same application.

Extension version: 2.130.5
VS Code version: Code 1.112.0 (07ff9d6178ede9a1bd12ad3399074d726ebe6e43, 2026-03-17T18:09:23Z)
OS version: Linux x64 6.17.0-1012-oem snap
Modes:

Logs

C# LSP Trace Logs log

Details

Environment Information

VSCode version: 1.112.0
C# Extension: 2.130.5
Using OmniSharp: false

Dotnet Information

Host:
Version: 10.0.5
Architecture: x64
Commit: a612c2a105
RID: linux-x64

.NET SDKs installed:
No SDKs were found.

.NET runtimes installed:
Microsoft.AspNetCore.App 10.0.5 [/home/fraguada/.config/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/10.0.5x64aspnetcore/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 10.0.5 [/home/fraguada/.config/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/10.0.5x64aspnetcore/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
DOTNET_CLI_UI_LANGUAGE [en-US]
DOTNET_MULTILEVEL_LOOKUP [0]
DOTNET_NOLOGO [true]
DOTNET_ROOT [/usr/share/dotnet]

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

Visual Studio Code Extensions
Extension Author Version Folder Name
cmake-tools ms-vscode 1.22.28 ms-vscode.cmake-tools-1.22.28
copilot-chat GitHub 0.40.1 github.copilot-chat-0.40.1
cpp-devtools ms-vscode 0.4.6 ms-vscode.cpp-devtools-0.4.6
cpptools ms-vscode 1.30.5 ms-vscode.cpptools-1.30.5-linux-x64
cpptools-extension-pack ms-vscode 1.5.1 ms-vscode.cpptools-extension-pack-1.5.1
cpptools-themes ms-vscode 2.0.0 ms-vscode.cpptools-themes-2.0.0
csdevkit ms-dotnettools 3.10.4 ms-dotnettools.csdevkit-3.10.4-linux-x64
csharp ms-dotnettools 2.130.5 ms-dotnettools.csharp-2.130.5-linux-x64
gitblame waderyan 12.1.0 waderyan.gitblame-12.1.0
remote-explorer ms-vscode 0.5.0 ms-vscode.remote-explorer-0.5.0
vscode-catch2-test-adapter matepek 4.22.3 matepek.vscode-catch2-test-adapter-4.22.3
vscode-containers ms-azuretools 2.4.1 ms-azuretools.vscode-containers-2.4.1
vscode-docker ms-azuretools 2.0.0 ms-azuretools.vscode-docker-2.0.0
vscode-dotnet-runtime ms-dotnettools 3.0.0 ms-dotnettools.vscode-dotnet-runtime-3.0.0
vscode-lldb vadimcn 1.12.1 vadimcn.vscode-lldb-1.12.1
C# Settings
Setting Value
preferCSharpExtension false
compilerDiagnosticScope openFiles
analyzerDiagnosticScope openFiles
enableXamlTools true
useServerGC true
System Info
Item Value
CPUs Intel(R) Core(TM) Ultra 9 285 (24 x 1716)
GPU Status 2d_canvas: unavailable_software
GPU0: VENDOR= 0xffff [Google Inc. (Google)], DEVICE=0xffff [ANGLE (Google, Vulkan 1.3.0 (SwiftShader Device (Subzero) (0x0000C0DE)), SwiftShader driver-5.0.0)], DRIVER_VENDOR=SwANGLE, DRIVER_VERSION=5.0.0 ACTIVE
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: disabled_off
webnn: unavailable_software
Load (avg) 1, 1, 1
Memory (System) 125.13GB (112.15GB free)
Process Argv --no-sandbox --force-user-env --ozone-platform=x11 --crash-reporter-id f43cb1d1-2757-43d3-bde8-b6076bc53f4d
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP ubuntu:GNOME
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11
A/B Experiments
vsliv368cf:30146710
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
6abeh943:31336334
envsdeactivate2:31464701
cloudbuttont:31379625
aihoversummaries_f:31469309
3efgi100_wstrepl:31403338
56b7f661:31457055
use-responses-api:31390855
je187915:31401257
ec5jj548:31422691
cp_cls_t_966_ss:31454198
4je02754:31466945
find_all_ref_in_bg_f:31469307
8hhj4413:31478653
ge8j1254_inline_auto_hint_haiku:31431912
38bie571_auto:31478677
cp_cls_c_1081:31454833
ia-use-proxy-models-svc:31452481
e9c30283:31461165
test_treatment2:31471001
ts_provider_enabled:31458190
control_6dc23131:31467998
idci7584:31464702
showingstats:31481873
534a6447:31478749
nes-extended-on:31455476
chat:31457767
8hig5102:31480529
8a2c4887_5_3_codex_prompt:31475326
bg_compact_c:31481651
c-off:31481340
cpptoolsoff-v2:31475362
hover1:31474145
db0gd219:31481871
po_split_t:31481793
ddid_c:31478207
getcmakediagnosticsoff:31481767
nes-perm-reb-1:31481660

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions