[GH-ISSUE #6543] [Bug]: image-dimension-limit regression intermittently times out after passing #3668

Closed
opened 2026-10-21 06:05:44 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @kolacheee on GitHub (Sep 22, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6543

What happened

scripts/regressions/image-dimension-limit.regression.ts intermittently fails pnpm regression:node with a timeout, even though every assertion in it passed.

The runner output shows the regression completing and printing its own success line, then being killed by the 30-second budget:

[scripts/regressions/image-dimension-limit.regression.ts] stdout: Image dimension limit regression passed
[scripts/regressions/image-dimension-limit.regression.ts] TIMEOUT after 30s; terminating child.
[scripts/regressions/image-dimension-limit.regression.ts] TIMEOUT (30131ms)

So this is not a failing assertion. The process finishes its work and then does not exit, and the runner reports the file as failed.

How often

Three times across a long working session, in full-suite runs only. Each re-run of the full suite passed, so it is roughly a one-in-three full run.

Run on its own it has never reproduced: node ./scripts/run-regressions.mjs --filter image-dimension-limit passed 3/3 in 351ms, 377ms and 427ms.

What it is not

The HTTP stub is closed properly. The file awaits server.close() in a finally, and the success line prints after that resolves, so the listening server is not what holds the loop open. Regressions run in separate child processes, so it is also not something a previous file left behind.

That points at a handle created during the run that outlives it, most likely a socket or timer from the image-generation retry path the test exercises (the log shows several [image-gen] Retrying rejected FLUX.2 size ... warnings just before the hang).

Why it is worth fixing

The failure is indistinguishable from a real regression in the summary line (351/352 passed; 1 failed) and the runner prints no FAILED line for it, only TIMEOUT, so anyone grepping for FAILED sees a failure count with nothing named. Working out which file it was took a comm of START lines against result lines.

Two things would each help on their own:

  • Make the runner name the file on a timeout the way it does on a failure, so the summary is greppable.
  • Find and release the handle, or give the regression an explicit exit once its assertions are done.

Environment

Linux x64, Node v24.21.0, staging at eecfd4b08.

Originally created by @kolacheee on GitHub (Sep 22, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6543 ## What happened `scripts/regressions/image-dimension-limit.regression.ts` intermittently fails `pnpm regression:node` with a timeout, even though every assertion in it passed. The runner output shows the regression completing and printing its own success line, then being killed by the 30-second budget: ``` [scripts/regressions/image-dimension-limit.regression.ts] stdout: Image dimension limit regression passed [scripts/regressions/image-dimension-limit.regression.ts] TIMEOUT after 30s; terminating child. [scripts/regressions/image-dimension-limit.regression.ts] TIMEOUT (30131ms) ``` So this is not a failing assertion. The process finishes its work and then does not exit, and the runner reports the file as failed. ## How often Three times across a long working session, in full-suite runs only. Each re-run of the full suite passed, so it is roughly a one-in-three full run. Run on its own it has never reproduced: `node ./scripts/run-regressions.mjs --filter image-dimension-limit` passed 3/3 in 351ms, 377ms and 427ms. ## What it is not The HTTP stub is closed properly. The file awaits `server.close()` in a `finally`, and the success line prints after that resolves, so the listening server is not what holds the loop open. Regressions run in separate child processes, so it is also not something a previous file left behind. That points at a handle created during the run that outlives it, most likely a socket or timer from the image-generation retry path the test exercises (the log shows several `[image-gen] Retrying rejected FLUX.2 size ...` warnings just before the hang). ## Why it is worth fixing The failure is indistinguishable from a real regression in the summary line (`351/352 passed; 1 failed`) and the runner prints no `FAILED` line for it, only `TIMEOUT`, so anyone grepping for `FAILED` sees a failure count with nothing named. Working out which file it was took a `comm` of START lines against result lines. Two things would each help on their own: - Make the runner name the file on a timeout the way it does on a failure, so the summary is greppable. - Find and release the handle, or give the regression an explicit exit once its assertions are done. ## Environment Linux x64, Node v24.21.0, staging at `eecfd4b08`.
Author
Owner

@kolacheee commented on GitHub (Sep 22, 2026):

Duplicate of #6529, which has the better diagnosis: the leaked handle is a keep-alive socket from the spec's own fetch calls, and server.close() stops accepting without destroying an idle keep-alive connection. Sibling regressions already call closeAllConnections().

Closing this. The only thing here not already in #6529 is a frequency data point: three occurrences across one long session, full-suite runs only, and 3/3 passes in isolation at 351-427 ms. Adding that there.

<!-- gh-comment-id:5780805748 --> @kolacheee commented on GitHub (Sep 22, 2026): Duplicate of #6529, which has the better diagnosis: the leaked handle is a keep-alive socket from the spec's own `fetch` calls, and `server.close()` stops accepting without destroying an idle keep-alive connection. Sibling regressions already call `closeAllConnections()`. Closing this. The only thing here not already in #6529 is a frequency data point: three occurrences across one long session, full-suite runs only, and 3/3 passes in isolation at 351-427 ms. Adding that there.
Sign in to join this conversation.
No milestone
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
Pasta-Devs/Marinara-Engine#3668
No description provided.