Skip to content

Device Manager hangs forever on linux #17

@ncushnahan

Description

@ncushnahan
  • OS and Version: Linux Ubuntu 24.04
  • VS Code Version: 1.111.0
  • Extension Version: 1.16.0
  • Target Device: None attached
  • Other extensions you installed (and if the issue persists after disabling them): Observed while using Arm Debugger extension.
  • A clear and concise description of what the bug is.

On Linux, Device Manager appears able to hang indefinitely during device-related lookups even when no external target device is attached. This showed up through another extension (Arm Debugger) that queries Device Manager during debug/config startup: creating a new launch.json, opening an existing Arm debug config editor, or starting a debug configuration could get stuck.

After changing the caller not to wait on Device Manager during startup, the issue was resolved.
Also disabling Device Manager fixed the issue.
This only seems to occur on linux with version 1.111.0 of vscode, earlier versions are fine. Other platforms don't have this issue.

To Reproduce
Steps to reproduce the behavior:

  1. Use VS Code 1.111.0 on Linux with Arm Device Manager 1.16.0 and Arm Debugger version 1.8.0 installed.
  2. Open a workspace with no existing launch.json, and try to create a new one from Run and Debug.
  3. Notice that a message on the bottom bar of vscode says "activating extensions", but nothing else occurs, no launch.json is created.
  4. Observe that the UI can remain stuck for a long time or indefinitely instead of returning promptly or failing gracefully.

This issue can also be seen when trying to run debug configs, which will hang forever and never launch, and trying to add new debug configs to an existing launch.json via a helper.

If we navigate to the device manager in vscode, we can see that it seems to be constantly loading itself, even outside the context of Arm Debugger.

Image

Expected behavior
Device Manager should return promptly, or fail gracefully in this scenario.

Additional info :
The following calls seemed like they would hang when investigating:

  • getDevices()
  • device-manager.getDevicePack

When this happens, callers waiting on Device Manager never get a result.

From tracing the call flow (with codex - this might not be 100% accurate. I will double check this manually.) :

  • device-manager.getDevicePack
    -> DeviceManager.getDevicePack()
    -> getCurrentDevice()
    -> BaseDeviceProvider.isAttached()
    -> getDevices()

Desktop device enumeration then goes through:

  • DesktopDeviceProvider.getDevices()
    -> UsbService.getDeviceList()
    -> child RPC $getDevices()
    -> Usb.getDeviceList()
    -> getDeviceCache()
    -> resolveDevices()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions