A hung npm ci in CI times out and retries instead of holding a runner for hours #358

Closed
opened 2026-11-06 17:15:29 -05:00 by claude · 0 comments
Owner
  • Draft: none (found 2026-11-06 while watching develop CI)
  • Priority: high (a hung job holds an asgard runner slot for hours and blocks every later run)
  • Agent: coder
  • Depends on: none
  • Decisions: none

Why

On 2026-11-06 two jobs hung in npm ci on asgard: task 8304 (run 1287, Test .NET) from 15:36 and task 8349 (run 1289, Build Binary macos-amd64) from 16:06. Both were in the "Build the Admin Console" step (.forgejo/scripts/build-admin-console.sh).

  • Both npm debug logs end at the same line: every tarball came from the cache (http cache ... (cache hit)), then the deprecation warnings, then nothing.
  • After that, both processes sat idle in epoll_wait with no CPU and no sockets for 55 and 85 minutes, until the owner cancelled the runs by hand. The develop push run for bc56d8cc waited behind them.
  • The two npm ci runs overlapped and share one cache (/cache/npm, mounted by .forgejo/scripts/in-container.sh). That may be the trigger, but it is not proven.
  • No job in .forgejo/workflows/ sets timeout-minutes, and nothing limits npm ci, so a hang lasts until the runner's default job timeout.

What changes

  • Every npm ci in CI (.forgejo/scripts/build-admin-console.sh and the Install Dependencies step in .forgejo/workflows/pipeline.yml) runs under a time limit, with one retry after a timeout. Use a shared helper rather than two copies, and make sure timeout exists in the ninlil-builder-node image.
  • Every job in the workflows gets a timeout-minutes set comfortably above its normal duration (read the recent run times).
  • Optional: take away the shared-cache hypothesis, for example by giving each npm ci a private copy of the cache or by setting --prefer-offline. Only do this if it is cheap and keeps cache hits.

Acceptance

  • A forced hang (for example a tiny time limit in a local run of the helper) times out, retries once and then fails the step with a clear message.
  • Every job in .forgejo/workflows/*.yml has timeout-minutes.
  • The PR pipeline is green.
- **Draft:** none (found 2026-11-06 while watching develop CI) - **Priority:** high (a hung job holds an asgard runner slot for hours and blocks every later run) - **Agent:** coder - **Depends on:** none - **Decisions:** none ### Why On 2026-11-06 two jobs hung in `npm ci` on asgard: task 8304 (run 1287, Test .NET) from 15:36 and task 8349 (run 1289, Build Binary macos-amd64) from 16:06. Both were in the "Build the Admin Console" step (`.forgejo/scripts/build-admin-console.sh`). - Both npm debug logs end at the same line: every tarball came from the cache (`http cache ... (cache hit)`), then the deprecation warnings, then nothing. - After that, both processes sat idle in `epoll_wait` with no CPU and no sockets for 55 and 85 minutes, until the owner cancelled the runs by hand. The develop push run for `bc56d8cc` waited behind them. - The two `npm ci` runs overlapped and share one cache (`/cache/npm`, mounted by `.forgejo/scripts/in-container.sh`). That may be the trigger, but it is not proven. - No job in `.forgejo/workflows/` sets `timeout-minutes`, and nothing limits `npm ci`, so a hang lasts until the runner's default job timeout. ### What changes - Every `npm ci` in CI (`.forgejo/scripts/build-admin-console.sh` and the `Install Dependencies` step in `.forgejo/workflows/pipeline.yml`) runs under a time limit, with one retry after a timeout. Use a shared helper rather than two copies, and make sure `timeout` exists in the `ninlil-builder-node` image. - Every job in the workflows gets a `timeout-minutes` set comfortably above its normal duration (read the recent run times). - Optional: take away the shared-cache hypothesis, for example by giving each `npm ci` a private copy of the cache or by setting `--prefer-offline`. Only do this if it is cheap and keeps cache hits. ### Acceptance - [ ] A forced hang (for example a tiny time limit in a local run of the helper) times out, retries once and then fails the step with a clear message. - [ ] Every job in `.forgejo/workflows/*.yml` has `timeout-minutes`. - [ ] The PR pipeline is green.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lantea-one/ninlil#358
No description provided.