← reports

#6411 · Runtime probe errors discard termination signals

BugHighEffort: MediumpluginsGitHub issue2026-10-27 · base c6c23be71

Verdict: PARTIALLY REPRODUCED · Root-cause confidence: medium overall; high for signal loss. Reproduction label: partial-repro.

1. TL;DR

Browser Automation verifies a downloaded runtime by executing it with --version before launching a browser. When that process terminates with SIGILL, the current installer reports exit null and loses the useful signal name. A local, checksum-matching test fixture reproduces this diagnostic failure through the real installer in two clean checkouts of trusted main. The current release pin also selects just one Linux x64 artifact using operating system and architecture, not CPU features. This host supports BMI2 and AVX2, so the reported pre-BMI2 processor crash and its exact native instruction were not reproduced; the fixture is not a CPU emulator.

2. Claims vs findings

ClaimStatusEvidence
A runtime signal is hidden behind exit null.VerifiedBoth checkouts fail the focused signal-preservation test at the version-probe boundary. A direct child-process control returns {"code":null,"signal":"SIGILL"}.
The current pin selects the same optimized artifact for all Linux x64 processors.Verified selection behavior; optimization requirement unverifiedThe release pin has one linux-x64 digest. Platform selection uses only process.platform and process.arch; artifact naming adds no CPU variant.
The published runtime executes an unsupported BMI2 instruction on the reported older processor.Unverified hereNo affected processor was available. No issue-supplied executable, script, external link, or binary was fetched or run. The real release executable was not exercised.
A baseline executable would restore end-to-end browser startup.UnverifiedNo baseline build or old-CPU browser startup was tested. Artifact production and CPU compatibility require separate upstream validation.

3. Environment

4. Minimal reproduction

This tests the actual runtime install/probe path, not a reimplementation. The existing test fixture simulates npm metadata and serves the locally authored executable; the production installer still performs its provenance-shape, package, digest, download, executable, and version checks. The fixture intentionally signals its own process and disables core dumps. It does not establish the real runtime's CPU requirements.

  1. Prepare a clean checkout at the recorded trusted commit, using the repository's frozen dependency graph and existing build tooling:
    git clone https://github.com/get-bb/bb.git bb-6411-repro
    cd bb-6411-repro
    git checkout --detach c6c23be71fe2b03541fb482ce8e604ac1f5f1221
    pnpm install --frozen-lockfile --prefer-offline
    pnpm exec turbo run build --filter=@get-bb/plugin-sdk
    pnpm exec turbo run build --filter=bb-plugin-browser-automation
  2. Apply the complete local regression test below. It reuses the existing fixture and adds no production seam or dependency:
    apply_patch <<'PATCH'
    *** Begin Patch
    *** Update File: plugins/browser-automation/installer.test.ts
    @@
    -  it("refuses a release whose SHA256SUMS disagrees with the pin", async ({
    +  it("includes the termination signal when the verified runtime probe crashes", async ({
    +    skip,
    +  }) => {
    +    skip(process.platform === "win32", noWindowsRuntime);
    +    const dir = await dataDir();
    +    const crashingBinary = "#!/bin/sh\nulimit -c 0\nkill -ILL $$\n";
    +    const digest = sha256(crashingBinary);
    +    served["/SHA256SUMS"] = `${digest}  ${asset}\n`;
    +    served[`/${asset}`] = crashingBinary;
    +    await expect(
    +      install(dir, {
    +        release: { ...release, registry: base, artifacts: { [platform]: digest } },
    +      }),
    +    ).rejects.toThrow("SIGILL");
    +  });
    +  it("refuses a release whose SHA256SUMS disagrees with the pin", async ({
    *** End Patch
    PATCH
  3. Run the focused regression through Turbo:
    pnpm exec turbo run test --filter=bb-plugin-browser-automation -- installer.test.ts -t 'includes the termination signal'

    Expected product behavior: the rejected installation error contains SIGILL. Actual assertion output on unchanged production code:

    Expected: "SIGILL"
    Received: "dev-browser-linux-x64 did not report version 1.0.0-test on this host (exit null). "
    
    Test Files  1 failed (1)
         Tests  1 failed | 11 skipped (12)
  4. Run the complete installer owner suite:
    pnpm exec turbo run test --filter=bb-plugin-browser-automation -- installer.test.ts
    
    Test Files  1 failed (1)
         Tests  1 failed | 11 passed (12)

    The sole failure is the newly added regression. All eleven pre-existing installer cases pass, including pin integrity, provenance rejection, cache reuse, concurrent installation, stale-lock recovery, and cancellation.

A separate direct Node child-process control confirms the distinction between exit code and signal in this environment:

node --input-type=module <<'JS'
import { spawn } from 'node:child_process';
const child = spawn('/bin/sh', ['-c', 'ulimit -c 0; kill -ILL $$'], { stdio: 'ignore' });
child.once('close', (code, signal) => {
  console.log(JSON.stringify({ code, signal }));
  process.exitCode = code === null && signal === 'SIGILL' ? 0 : 1;
});
JS

{"code":null,"signal":"SIGILL"}

5. Root cause

The process utility returns a real child process (host-process.ts). The installer then listens to close with only its first argument and returns only the nullable code, stdout, and stderr (installer.ts):

child.once("close", (code) => {
  …
  else resolve({ code, stdout, stderr });
});

As demonstrated by the control, a signal-terminated child has a null exit code and a non-null signal. Because the latter is discarded, the version probe cannot report it. The error directly interpolates the null code (version-probe error):

`${asset} did not report version ${release.version} on this host (exit ${probe.code}). ${tail(probe.stderr || probe.stdout)}`

Separately, runtime-pin.ts records version 1.0.0-rc.4 and only one Linux x64 digest. Platform selection ignores CPU features, and artifact naming is simply package plus platform. This explains why current selection cannot distinguish older from newer x64 processors, but source inspection alone does not prove that the shipped executable requires BMI2.

6. Proposed fix and safety gate

Preserve both the child exit code and termination signal in the installer's command result, and include the signal in probe failures while retaining normal exit diagnostics and cancellation/timeout semantics. The focused regression above protects that observable diagnostic contract.

The broader compatibility fix first needs an upstream artifact with verified CPU requirements and a successful run on affected hardware, followed by an explicit selection policy that preserves digest/provenance checks and correct cache identity. Do not bypass validation or infer that any generic SIGILL proves a particular missing CPU feature.

No pull request: resolving the reported old-CPU startup failure requires runtime artifact/release work outside the permitted simple-fix scope. Only the secondary signal-loss defect was reproduced here; a diagnostics-only change would not justify closing the compatibility issue. No production patch, branch, push, or fix PR was created in the target repository. No linked open PR was present in the issue cross-reference metadata or open-PR search.

7. Related issues

Repository triage examples classified Browser Automation installation defects in the plugins area. This report does not establish a duplicate: its executable evidence is limited to the current version-probe diagnostic path.

8. Verification

The same agent repeated the investigation in a second clean clone, $WORK/verify, detached at the identical full commit. Only the locally authored test patch was applied. The second clone independently installed the frozen dependency graph, built the SDK runtime and Browser Automation plugin through Turbo, then ran:

pnpm exec turbo run test --filter=bb-plugin-browser-automation -- installer.test.ts

Result: exit 1, exactly the new signal-preservation test failed with the same exit null diagnostic, and all eleven existing cases passed. The first run was the focused test in $WORK/base; the second run covered the complete installer test file. Each fixture used a new temporary data directory and a fresh loopback port. Both source diffs contained only the test addition, and git diff --check passed in both clones.

No correction to the final signal-loss finding was needed. The final verdict deliberately remains partial because neither run exercised a pre-BMI2 CPU or the published native runtime. This was a second clean verification by the same agent, not independent-agent verification.

9. Appendix and trust boundary

The first attempt to build the entire repository with pnpm exec turbo run build stopped in the unrelated GitHub plugin because the SDK runtime's dist/process.js had not yet been built. Building @get-bb/plugin-sdk explicitly and then the affected plugin succeeded in both clones. An initial local regression-fixture draft used the wrong registry override and stopped at fetch failed; that draft was corrected before either accepted evidence run. Neither preliminary failure is counted as reproduction evidence.

Issue content and comments were treated solely as untrusted claims. No supplied command, script, binary, linked branch, or external issue URL was executed or fetched. The test was designed from the trusted repository's installer and existing local fixtures. No dependencies were added. No real user data, credentials, host identities, or live BB services were accessed. Raw test artifacts remain local; the complete reproduction and relevant output are embedded in this HTML as required by the reports repository.

Additional checks: public repository visibility; issue Type/Priority/Effort and existing labels before and after classification; open pull-request search and issue cross-reference metadata; affected-file history; repeated git fetch origin main; environment and CPU-capability inspection; direct child-process signal control. No browser session or server was started, and test teardown closed the local fixture servers and removed their temporary runtime directories.

> AGENT GENERATED