Skip to content

gk AI hook child processes pile up in uninterruptible-sleep state, cannot be killed #5248

@kftof

Description

@kftof

Description

The gk binary spawned by GitLens (globalStorage/eamodio.gitlens/gk) accumulates hundreds of child processes that get stuck in macOS process state UE (uninterruptible kernel sleep + trying to exit). They cannot be killed with kill or kill -9. Only closing the parent VSCode window reaps them.

Over a normal workday I end up with 1000+ stuck gk processes that I cannot clean up without restarting the editor.

Reproduction

  1. Install latest GitLens in VSCode Insiders.
  2. Open a repository, leave the editor running for several hours / days.
  3. Run:
    ps -axo pid,ppid,state,comm | grep '/eamodio.gitlens/gk' | wc -l

Observe the count grows continuously — never reclaimed.

##Evidence

$ ps -axo pid,ppid,state,comm | grep '/eamodio.gitlens/gk' | head
444 85518 UE .../eamodio.gitlens/gk
505 85517 UE .../eamodio.gitlens/gk
605 85520 UE .../eamodio.gitlens/gk
741 85515 UE .../eamodio.gitlens/gk
2490 85518 UE .../eamodio.gitlens/gk
2547 85517 UE .../eamodio.gitlens/gk
...
All instances are in state UE — stuck in a kernel syscall (most likely a network call to the GitKraken AI endpoint that never returns or never times out) while trying to exit. SIGKILL is ignored because the process never returns from the syscall.

Parent PIDs are the VSCode renderer processes. Killing the renderer is the only way to free them.

Expected behavior

The gk helper should set a hard network timeout (e.g. 10–30s) on its AI / telemetry calls so the syscall returns and the process can exit cleanly.
Stale gk children should be reaped by the extension instead of being left dangling.
Ideally an opt-out (gitlens.ai.enabled: false) should fully prevent the helper from being spawned.

Environment

macOS 15.6.1 (24G90), Darwin arm64
VSCode Insiders 1.121.0-insider (commit aa21abc)
GitLens eamodio.gitlens@2026.5.180633

Workaround

  • Confirmed workaround: setting "gitlens.ai.enabled": false in settings.json + restart of VSCode stops the spawning of gk entirely. No more accumulation. (Tested on macOS 15.6.1, VSCode Insiders 1.121.0, GitLens 2026.5.180633.)
  • Kill the VSCode renderer parent PID — loses the window.
  • Restart VSCode.

None are acceptable long-term as the AI feature is silently broken rather than gracefully degraded.

GitLens Version

2026.5.180633

VS Code Version

Version : 1.121.0-insider
Validation : aa21abcbab6b9a929f7aad632d8377b6fa16bbcd
Date : 2026-05-18T11:07:36+02:00
Electron : 39.8.8
ElectronBuildId : 13870025
Chromium : 142.0.7444.265
Node.js : 22.22.1
V8 : 14.2.231.22-electron.0
Système d’exploitation : Darwin arm64 24.6.0

Git Version

git version 2.51.0

Logs, Screenshots, Screen Captures, etc

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNeeds to be looked at

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions