microsoft / microsoft/vscode-cmake-tools

[Bug] many ctest processes are launched freezing the system

Open
#4,554 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug more info needed
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

Brief Issue Summary

I've noticed that on my system with 6 cores, there are more than 100 ctest executables running at the same time, causing the system to freeze.
Relevant settings:

cmake.parallelJobs: 0 # Should adapt automatically to the cores of the system (aka 6)
cmake.ctest.parallelJobs: 0 # Should take over the cores of the previous option (aka 6)
cmake.ctest.allowParallelJobs: true # Enable parallel ctest
cmake.enableTraceLogging: true # Expect info in output
CMake Tools Diagnostics
{
  "os": "win32",
  "vscodeVersion": "1.102.3",
  "cmtVersion": "1.22.6",
  "configurations": [
    {
      "folder": "e:\\dev\\repo",
      "cmakeVersion": "3.30.2",
      "configured": true,
      "generator": "Ninja",
      "usesPresets": true,
      "compilers": {}
    }
  ],
  "cpptoolsIntegration": {
    "isReady": false,
    "hasCodeModel": false,
    "activeBuildType": "",
    "buildTypesSeen": [],
    "requests": [],
    "responses": [],
    "partialMatches": [],
    "targetCount": 0,
    "executablesCount": 0,
    "librariesCount": 0,
    "targets": []
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": true
    }
  ]
}
Debug Log
[main] Configuring project: main 
[main] Saving open files before configure/build

Occurs as many times as files where touched

In between it mentions:

[driver] Start configure 
[driver] Running pre-configure checks and steps
[cmakefileapi-driver] Configuring using preset
[cmakefileapi-driver] Invoking CMake C:/path/to/3.30.2/bin/cmake.exe with arguments [...]
[proc] Executing command: C:/path/to/3.30.2/bin/cmake.exe ...
[proc]   with environment: ...
Additional Information

Actions taken:

  • Find-replace some text in many CMakeLists.txt via VS Code find-replace
  • Dumped all diagnostics to a log file and searched for 'ctest', only found: 2025-08-20 11:23:31.128 [error] [Window] [Extension Host] [CMakeTools] 2025-08-20T09:23:31.127Z [error] [ctest] There was an error running ctest to determine available test executables
  • Checked the CMake/Build window, no mention of ctest

Expected behavior:

  • At most 6 ctest processes are running at the same time on a system with 6 cores

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue on Windows with the listed CMake Tools settings, a Ninja project, and trace logging enabled; inspect the ctest scheduling and configure-trigger paths reported in the debug log. Confirm the fix by ensuring repeated edits do not launch more than the configured core count of ctest processes and that ctest errors remain visible.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, typescript
Domain
build-system, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.