Skip to content

Compiler timeout error should include the helper's last stderr lines #825

Open

Description

@danfry1

When a helper process run by runBoundedProcess (src/native/bounded-process.mjs) passes its deadline, it is killed and the error says only <label> exceeded <N>ms. One such helper is the compiler that precompiles React Native. The same error appears for a compile cut short by its timeout, for example a registryBuild: 'wait' run on a slow machine.

That message doesn't say why the helper hung. The helper's stderr tail is already collected (the last 64 KiB, LOG_TAIL_BYTES), but only an exit the child makes itself uses it: for out-of-memory detection and the error's first line. The timeout path doesn't use it.

Proposed: append the last few stderr lines (and stdout lines when stderr is empty) to the timeout error, marked as the helper's output, after the suspension note. That covers a Babel plugin that loops, a module that waits on a network call, and a toolchain that prompts for input.

A unit test can use a helper that writes to stderr and then idles: the timeout error must include those lines, and must fail without the change.

Activity

  1. added this to the 0.16.0 milestone on Nov 14, 2026
  2. added
    enhancement
    area:performance
    priority:low
    on Nov 14, 2026
  3. danfry1 commented on Nov 15, 2026

    @danfry1
    OwnerAuthor

    The change is on the branch fix/helper-timeout-output (997a5c3), with no PR yet. The timeout error quotes the helper's last 10 output lines, stderr first, and the branch includes a test in tests/registry-process.test.ts and a changeset.

    The branch is stacked on #824, which has since merged. Before a PR opens, the branch needs main merged in, so its diff is only this change, and the test file rerun.

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

    area:performanceenhancementpriority:low

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions