Skip to content

Windows: pinned-pnpm e2e tests time out at 300 s (dispatched_pinned_pnpm_inherits_env_file_and_strips_flag) #263

Closed

Description

@zkochan

pnpm-cli::suite env_file::dispatched_pinned_pnpm_inherits_env_file_and_strips_flag times out at the 300 s nextest limit on Rust CI / Test / windows, on unrelated branches:

version::child_pnpm_selects_the_version_for_its_own_directory timed out the same way (https://github.com/pnpm/pnpm/actions/runs/41709617536), and its v11 counterpart in pnpm11/pnpm/test/switchingVersions.test.ts hit spawnSync ETIMEDOUT on TS CI windows chunk 3 twice in a row on 2026-11-03.

All of them dispatch to a downloaded pnpm 9.x (devEngines.packageManager / packageManager with onFail: download). On Linux and macOS they pass well within the limit. The registry they use runs on the documents metadata backend, so SQL metadata changes do not reach them. Something in the download-and-dispatch path on Windows can stall for minutes; the next step is a run with the dispatched process's output kept on timeout to see where it waits.


Written by an agent (Claude Code, claude-opus-5-5).

Activity

  1. added a commit that references this issue on Nov 4, 2026
  2. added a commit that references this issue on Nov 4, 2026
  3. zkochan commented on Nov 4, 2026

    @zkochan
    MemberAuthor

    First Ubuntu occurrence: env_file::dispatched_pinned_pnpm_inherits_env_file_and_strips_flag stalled on Rust CI / Test / ubuntu in pnpm/pnpm#17688. That's run 41889025369, attempt 1, job 126781195936: https://github.com/pnpm/pnpm/actions/runs/41889025369/job/126781195936

    The stall report shows the dispatched pnpm --env-file .env run print-env still alive after 240s. Its startup, pre-compute and tokio worker threads were idle, at 0.0 to 0.3s of CPU each, and the parent process had 16.6s.

    #17688 changes package-is-installable, which the pinned-pnpm download goes through, so a link to the PR isn't ruled out yet. The same test passed locally on the PR head (b4ec84fbcf) in about 9s. Attempt 2 of the run is in progress, and I'll add its result here.

    Written by an agent (Claude Code, claude-opus-5-5).

  4. zkochan commented on Nov 4, 2026

    @zkochan
    MemberAuthor

    Update: attempt 2 of the Ubuntu job on pnpm/pnpm#17688 (run 41889025369) passed. The test also passed 5 of 5 local runs on that PR's head, about 10s each, so this Ubuntu occurrence looks like the same intermittent stall as the Windows ones rather than something caused by #17688.

    Written by an agent (Claude Code, claude-opus-5-5).

  5. zkochan commented on Nov 5, 2026

    @zkochan
    MemberAuthor

    The same stall now shows up in the Linux Code Coverage job, where these tests hit the 240 s stall reporter:

    The stall report in both shows the downloaded @pnpm/exe 9.3.0 and its node child still alive with near-zero CPU. That points to a wait, not slow work.


    Written by an agent (Claude Code, claude-opus-5-5).

  6. zkochan commented on Nov 5, 2026

    @zkochan
    MemberAuthor

    Another Windows occurrence of version::child_pnpm_selects_the_version_for_its_own_directory, on pnpm/pnpm#17735 (run https://github.com/pnpm/pnpm/actions/runs/42098322234, job 127494911950). The stall report shows the inner pnpm --version of the pinned @pnpm/exe 9.3.0 still running after 226 s with 4.4 s of CPU. The PR only touches deps-restorer and the fresh-lockfile install plan. Rerunning the failed jobs.

    Written by an agent (Claude Code, claude-opus-5-5).

  7. zkochan commented on Nov 5, 2026

    @zkochan
    MemberAuthor

    A lead from the stall reports on pnpm/pnpm#17724 (runs https://github.com/pnpm/pnpm/actions/runs/42072394369 and https://github.com/pnpm/pnpm/actions/runs/42072394533).

    • In version::child_pnpm_selects_the_version_for_its_own_directory, the stuck process is not the pinned @pnpm/exe 9.3.0. It is the inner pnpm --version, which is the pnpm under test found on PATH, installing 9.1.3 for project b. All its threads are at 0.0 s CPU. The busy one is the cold-install drain, with the pnpm-cold-link thread waiting for downloads.
    • In the Windows env_file::dispatched_pinned_pnpm_inherits_env_file_and_strips_flag stall, only the outer pnpm under test exists, with 3.1 s of CPU and no children. It is stuck before dispatching, while installing 9.3.0.

    Both stalls are pnpm waiting on an @pnpm/exe download. The registry mock serves only @pnpm/[email protected] from pnpr/.fixtures, and proxies 9.3.0 and 9.1.3 (40+ MB platform binaries) from registry.npmjs.org. The default fetchTimeout is 60 s, with 2 retries and up to 60 s of backoff. So three stalled reads take about 250 s, past the 240 s stall deadline.

    The same afternoon, the integrated benchmark on main (https://github.com/pnpm/pnpm/actions/runs/42071464303) failed on the mock's upstream path: repeated error decoding response body for highcharts-11.4.8.tgz through pnpr, then ERR_PNPM_TARBALL_FETCH_TARBALL.

    Not verified: whether pnpr hangs on the upstream body or fails fast, and whether it joins a retry onto an in-flight upstream fetch. The CI jobs do not keep the mock's log. These tests failed 4 of the last 10 main runs of the Rust CI workflow.

    Possible directions:

    • Seed the two @pnpm/exe versions into the mock's runtime cache before the tests run, so they never reach npmjs.
    • Give these tests a shorter fetchTimeout.

    Written by an agent (Claude Code, claude-opus-5-5).

  8. zkochan commented on Nov 6, 2026

    @zkochan
    MemberAuthor

    I reproduced the stall and opened a fix: pnpm/pnpm#17769.

    The cause is pnpr's upstream timeout, not pnpm. It covers the whole response, body included, and defaults to 30 s. The pinned pnpm's native binary (@pnpm/[email protected] is 23.6 MB) is proxied from npmjs. When npmjs serves it slower than about 0.8 MB/s, pnpr cuts the body at 30 s on every retry.

    With the test mock's npm upstream throttled to 500 KB/s locally, env_file::dispatched_pinned_pnpm_inherits_env_file_and_strips_flag failed at its 240 s deadline. With the PR's 3 m upstream timeout, it passed in 49 s.


    Written by an agent (Claude Code, claude-opus-5-5).

  9. zkochan commented on Nov 8, 2026

    @zkochan
    MemberAuthor

    pnpm/pnpm#17769 fixed the cause (pnpr's 30 s upstream body timeout) by giving the mock's upstream 3 minutes. Neither test appears in the 35 failed Rust CI runs since. Reopen if it comes back.

    Written by an agent (Claude Code, claude-opus-5-5).

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions