Skip to content

Windows x64: codegraph init intermittently crashes with 0xC0000005 when the project has no supported source files (1.6.2, bundled Node 24.16.0) #3280

Open

Description

@Ancienttwo

Version: @colbymchenry/codegraph 1.6.2 (npm), codegraph-win32-x64 bundle, bundled node.exe v24.16.0
OS: Windows 11 Pro 10.0.26100 x64, Intel i7-11390H (4C/8T), 16 GB. Also seen on GitHub-hosted windows-latest.

Repro (PowerShell):

$crash = 0
for ($i = 0; $i -lt 300; $i++) {
  $d = Join-Path $env:TEMP ("cg-" + [guid]::NewGuid())
  New-Item -ItemType Directory $d | Out-Null
  Set-Content (Join-Path $d README.md) "# fixture"
  node <path>\node_modules\@colbymchenry\codegraph\npm-shim.js init $d *> $null
  if ($LASTEXITCODE -ne 0) { $crash++; "run $i exit $LASTEXITCODE" }
}
"crashes: $crash / 300"

Observed: 14/300 runs exit with 3221225477 (0xC0000005). Running the bundled node.exe --liftoff-only --disable-warning=ExperimentalWarning lib\dist\bin\codegraph.js init <dir> directly gives 15/300. stdout ends at Parsing code... or, in a few runs, after Done. stderr is empty. There is no event log entry, WER report or dump. .codegraph/codegraph.lock is left behind.
Expected: exit 0.

Findings:

  • With --trace-exit, every crash's last traced exit is the store worker, extraction/store-worker.js:130 process.exit(0), called right after collectBeforeExit(). So the worker-teardown.ts mitigation does not close the crash on x64.
  • --no-concurrent-marking lowers the rate to 1/300. It does not remove the crash on this machine.
  • With one indexable file (a.ts) the loop gives 0/220. The crash is frequent on the "No supported source files found" path, where workers end shortly after they start.
  • The Node version that launches the shim (22.22.3, 25.9.0, 26.13.0) makes no difference, because the bundled node.exe does the work.

Impact: CI suites that index small fixtures with no source files fail intermittently on Windows.

Possibly related: #2617 (abort at exit with 0xC0000409 on the same bundled Node v24.16.0), fixed on main by #2806, which bundles Node 24.21.0. This crash has a different exit code (0xC0000005) but also happens as the worker exits. I have not tested a 24.21.0 bundle against it. 1.6.2 is still the latest npm release.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions