Skip to content

Debugger hangs on startup from debuginfod #1562

Closed as duplicate
Closed as duplicate

Description

Moved from: microsoft/vscode-cpptools#14465

Environment

  • OS and version:
    macOS Tahoe Version 26.4.1 (25E253)

  • VS Code:
    Visual Studio Code

Version: 1.120.0 (Universal)
Commit: 0958016b2af9f09bb4257e0df4a95e2f90590f9f
Date: 2026-05-12T20:17:22Z (7 days ago)
Electron: 39.8.8
ElectronBuildId: 13870025
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.4.0

Bug Summary and Steps to Reproduce

After updating the C/C++ extension to 1.30.3, debug sessions on aarch64 Linux hang immediately after -exec-run and never reach main. Downgrading to 1.29.3 with the same launch.json and the same container resolves the issue.
Environment

Host: macOS (Apple Silicon, M5 MacBook Pro)
Container: Ubuntu 24.04 LTS, aarch64, running on Docker
VSCode workflow: Remote-SSH into the container
GDB: GNU gdb (Ubuntu 15.1-1ubuntu1~24.04.1) 15.1, configured as aarch64-linux-gnu
C/C++ extension: 1.30.3 (broken), 1.29.3 (works)
MIEngine version reported in telemetry: 17.12.40402.1

Steps to reproduce

In a Docker container running aarch64 Ubuntu 24.04 with GDB 15.1, build any C++ binary with debug symbols.
Use a standard cppdbg launch configuration with MIMode: "gdb", request: "launch", no miDebuggerServerAddress (i.e., local launch via MIEngine's integrated-terminal mechanism).
Start the debug session.

Expected
Debugger stops at main (or at the first user breakpoint).
Actual
Session hangs indefinitely after -exec-run. The inferior process is started (=thread-group-started is visible in the engine log), the dynamic loader is reported (=library-loaded for /lib/ld-linux-aarch64.so.1), and then all subsequent MI commands from MIEngine go unanswered. main is never hit. From the user's perspective, no breakpoint fires.
Root cause (from engine log analysis)
MIEngine sets stop-on-solib-events 1 during initialisation. After -exec-run, GDB stops the inferior at the dynamic loader's solib-event as expected. However, the *stopped,reason="solib-event" notification appears to be lost between GDB and MIEngine: MIEngine's internal state remains "running", and typing -exec-continue in the Debug Console returns:

Unable to perform this action because the process is running.

So MIEngine never sees the stop, never issues the -exec-continue that would let GDB walk through subsequent library loads to main, and the session is wedged. The TTY warning visible in the integrated terminal (warning: GDB: Failed to set controlling terminal: Operation not permitted) is unrelated — it appears in both 1.29.3 (working) and 1.30.3 (broken) and does not affect execution.
What I tried

Disabling debuginfod via ~/.gdbinit and setupCommands → no change.
set inferior-tty /dev/null, set startup-with-shell off → no change.
Adding targetArchitecture: "arm64" to launch.json → fixes the assumed x86_64 warning, no effect on hang.
Manual gdb ./binary followed by start in the same container → works perfectly, hits main. So the container, GDB, ptrace, and the binary are all fine.
Downgrading the C/C++ extension to 1.29.3 (no other changes) → fixes the hang. main is hit normally.

Attachments
I can attach an engine log captured with:
json"logging": {
"engineLogging": true,
"trace": true,
"traceResponse": true
}
The relevant tail shows <-1025-exec-run followed by =thread-group-started, =thread-created, six =breakpoint-modified events, =library-loaded for ld-linux-aarch64.so.1, then five queued -symbol-list-lines commands with no responses. No *stopped event ever appears.

Debugger Configurations

launch.json : 

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Mac - Exch Gateway Server SHM",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/bin/app_exch_gateway_server_shm",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "lldb"
        },
        {
            "name": "Mac - Exch Gateway FT",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/bin/app_exch_gateway_ft",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "lldb"
        },
        {
            "name": "Exch Gateway Server UDP",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/bin/app_exch_gateway_server_udp",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "preLaunchTask": "CMake: build",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ]
        },
        {
            "name": "Exch Gateway Server SHM",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/bin/app_exch_gateway_server_shm",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "preLaunchTask": "CMake: build",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ]
        },
        {
            "name": "Exch Gateway Client",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/bin/app_exch_gateway_client",
            "args": ["127.0.0.1"],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "preLaunchTask": "CMake: build",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ]
        },
        {
            "name": "Exch Gateway FT",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/bin/app_exch_gateway_ft",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "preLaunchTask": "CMake: build",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ]
        },
        {
            "name": "Exch Gateway UT",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/bin/app_exch_gateway_ut",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "preLaunchTask": "CMake: build",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ]
        },
        {
            "name": "Exch Binance UT",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/bin/exch_binance_ut",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "preLaunchTask": "CMake: build",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ]
        },
        {
            "name": "Exch Binance FT",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/bin/exch_binance_ft",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "preLaunchTask": "CMake: build",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ]
        },
        {
            "name": "Exch Binance FT - Metrics",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/bin/exch_binance_ft_binance_metrics",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "preLaunchTask": "CMake: build",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ]
        },
        {
            "name": "Utils FT",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/bin/utils_ft",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "preLaunchTask": "CMake: build",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ]
        },
        {
            "name": "Utils UT",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/bin/utils_ut",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "preLaunchTask": "CMake: build",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ]
        },
        {
            "name": "Sock Echo Server UDP",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/bin/server_echo_udp",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "preLaunchTask": "CMake: build",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ]
        },
        {
            "name": "Sock Echo Client UDP",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/bin/client_echo_udp",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "preLaunchTask": "CMake: build",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ]
        }

    ]
}


task.json : 

{
	"version": "2.0.0",
	"tasks": [
		{
			"type": "cmake",
			"label": "CMake: build",
			"command": "build",
			"targets": [
				"all"
			],
			"group": "build",
			"problemMatcher": [],
			"detail": "CMake template build task"
		}
	]
}

Debugger Logs

--- LaunchOptions ---

LaunchOptions{"name":"Exch Gateway Server SHM","type":"cppdbg","request":"launch",
"program":"/wsDocker/exgw/exgw_exch_gateway/bin/app_exch_gateway_server_shm",
"args":[],"stopAtEntry":false,"cwd":"/wsDocker/exgw/exgw_exch_gateway",
"environment":[],"externalConsole":false,"MIMode":"gdb",
"preLaunchTask":"CMake: build",
"logging":{"engineLogging":true,"trace":true,"traceResponse":true},
"setupCommands":[
  {"description":"Enable pretty-printing for gdb","text":"-enable-pretty-printing","ignoreFailures":true},
  {"description":"Set Disassembly Flavor to Intel","text":"-gdb-set disassembly-flavor intel","ignoreFailures":true}
]}

--- GDB banner ---

GNU gdb (Ubuntu 15.1-1ubuntu1~24.04.1) 15.1
This GDB was configured as "aarch64-linux-gnu".

--- MIEngine telemetry ---

EngineVersion: 17.12.40402.1
HostVersion:   17.12.40402.1
AdapterId:     cppdbg
MIMode:        gdb

--- MIEngine misdetects architecture as x86_64 even though GDB reports aarch64 ---

stdout: Warning: Debuggee TargetArchitecture not detected, assuming x86_64.

--- After -exec-run: process starts, dynamic loader loads, then session hangs ---

<-1022-exec-run
->&"warning: Error disabling address space randomization: Operation not permitted\n"
->=thread-group-started,id="i1",pid="12275"
->=thread-created,id="1",group-id="i1"
<-1023-thread-info 1
->=breakpoint-modified,bkpt={number="1",...addr="0x0000aaaadedcb608",func="main(int, char* const*)",...}
->=breakpoint-modified,bkpt={number="2",...}
->=breakpoint-modified,bkpt={number="3",...}
->=breakpoint-modified,bkpt={number="4",...}
->=breakpoint-modified,bkpt={number="5",...}
->=breakpoint-modified,bkpt={number="6",...}
->=library-loaded,id="/lib/ld-linux-aarch64.so.1",symbols-loaded="0",...
<-1024-symbol-list-lines .../main_shm.cpp
<-1025-symbol-list-lines .../main_shm.cpp
<-1026-symbol-list-lines .../main.cpp
<-1027-symbol-list-lines .../server_exgw.hpp
<-1028-symbol-list-lines .../server_exgw.hpp
->~"Downloading separate debug info for system-supplied DSO at 0xffffb849e000...\n"

[session never reaches main; no response to commands 1023-1028; no *stopped event ever delivered]

<--   C (disconnect-14): user-initiated disconnect

Other Extensions

No response

Additional Information

vscode_cppext_regression.txt

Activity

  1. changed the title [-]Regression: aarch64 debug session hangs before main, *stopped notification for solib-event lost between GDB and MIEngine[/-] [+]Debugger hangs on startup from debuginfod[/+] on May 20, 2026
  2. gregg-miskelly commented on May 20, 2026

    @gregg-miskelly
    Member

    Andrew Wang (@WardenGnaw) I am assuming this is addressed by #1561

  3. gregg-miskelly commented on May 20, 2026

    @gregg-miskelly
    Member

    Can Gürsu (@cangursu) my understanding is the problem here is that Ubuntu's debuginfod server stopped responding. I think you can work around it if you make sure that GDB has the DEBUGINFOD_URLS environment variables set to an empty string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions