Skip to content

Copilot CLI Node.js v22 aborts on startup under gVisor runtime (exit 139, DecodeUTF8 assertion) #6558

Description

@lpcox

Summary

The Copilot CLI's bundled Node.js runtime (v22.23.1) aborts with a native assertion failure on startup when the agent runs under the gVisor (runsc) runtime. Node crashes before any workflow logic executes (tokenCount=0, 0 bytes stdout), and after the harness exhausts its retries the wrapper itself segfaults, so the agent job exits with code 139.

Where observed

This is a runtime/sandbox failure, not a defect in the PR under test (#9941). The default and sbx runtime variants of the same stress test are unaffected.

Fatal error

#  node::StringBytes::Encode(v8::Isolate*, const char*, std::size_t, node::encoding)::<lambda(uint16_t*)> at ../src/string_bytes.cc:598
#  Assertion failed: (written) == (u16size)

----- Native stack trace -----
 1: node::Assert(node::AssertionInfo const&)
 2: 0xac3853
 3: node::encoding_binding::BindingData::DecodeUTF8(v8::FunctionCallbackInfo<v8::Value> const&)

----- JavaScript stack trace -----
1: decode (node:internal/encoding:494:28)
2: stringify (node:internal/modules/helpers:418:18)
3: moduleStrategy (node:internal/modules/esm/translators:86:12)
4: #translate (node:internal/modules/esm/loader:435:20)
5: afterLoad (node:internal/modules/esm/loader:491:29)
6: loadAndTranslate (node:internal/modules/esm/loader:496:12)
...

Node aborts (SIGABRT) inside its native UTF-8 decode path while loading an ES module. The copilot-harness retried 3 times; all attempts crashed identically within ~90ms:

[copilot-harness] attempt 1: process closed exitCode=1 signal=SIGABRT duration=0s stdout=0B stderr=1132B
[copilot-harness] attempt 1 failed: ... failureClass=partial_execution ... tokenCount=0
[copilot-harness] attempt 2: process closed exitCode=1 signal=SIGABRT
...
/tmp/awf-cmd-1.sh: line 29: 75 Segmentation fault  /bin/bash -c '... copilot_harness.cjs /usr/local/bin/copilot ...'
[WARN] Command completed with exit code: 139
##[error]Process completed with exit code 139.

Environment: nodeVersion=v22.23.1 platform=linux, network-isolation mode enforcing egress via Docker network topology.

Likely cause

A native assertion in Node's StringBytes::Encode / DecodeUTF8 firing during ESM module translation strongly suggests an incompatibility between the bundled Node runtime and gVisor's syscall/memory emulation (runsc), rather than a workflow or application bug.

Suggested fixes to investigate

  • Bump or pin the Copilot CLI's bundled Node.js to a version that does not trip this assertion under gVisor.
  • Review the runsc platform/syscall configuration used for the AWF agent container (e.g. platform mode, mmap/UTF-8 emulation paths).
  • Confirm whether this reproduces deterministically or is a transient runner/sandbox flake.

Impact

Any agentic workflow using sandbox.agent.runtime: gvisor can fail at startup with exit 139 regardless of the PR content, producing false-negative stress-test results.

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