[GH-ISSUE #6529] [Issue]: the image-dimension-limit regression passes its assertions and then hangs, failing the lane #3659

Closed
opened 2026-10-21 06:05:39 +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/6529

Originally assigned to: @kolacheee on GitHub.

Summary

scripts/regressions/image-dimension-limit.regression.ts finishes its work, prints its own success line, and then never exits. The runner kills it at the 30-second budget and the whole lane fails, on a clean checkout with no changes.

Expected behavior

pnpm regression passes. The spec takes about half a second: that is how long it takes when it is the only file the runner is given.

Actual behavior

In a full lane it reaches the end, prints Image dimension limit regression passed, and then hangs until the runner terminates it:

[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 (30127ms)
Regression summary: 345/346 passed; 1 failed.

The success line is the last statement in the file, after the finally block that awaits server.close(). So the assertions all pass and the server does close; what is left is something else holding the event loop open, most likely a keep-alive socket from the fetch calls the spec makes against its own loopback server. server.close() stops accepting and waits for connections to end, but it does not destroy an idle keep-alive connection.

Sibling regressions that stand up a real server already call server.closeAllConnections() (for example command-only-regenerate.regression.ts, shutdown-deadline.regression.ts, assigned-chat-sweep.regression.ts). This one does not.

Steps to reproduce

  1. Check out staging with no local changes.
  2. pnpm install
  3. pnpm regression
  4. Watch image-dimension-limit.regression.ts. It prints its success line and is then killed at 30 seconds.

Running it alone passes every time, which is why this reads as a flake rather than as a hang:

node ./scripts/run-regressions.mjs --filter scripts/regressions/image-dimension-limit.regression.ts

Environment

  • Marinara Engine version: 2.4.6 (staging at 3264925f3, and again at 0df28742c)
  • Install type: source
  • OS + version: Fedora, Linux 7.2.6
  • Browser or app shell: not applicable, this is the Node regression lane

Logs, screenshots, or video

Four full lanes today: three ended 345/346 passed; 1 failed with this spec timing out, one passed. Each time the success line was printed first. Run alone, it passed in 406ms, 460ms, 527ms and 826ms, including while another lane was running, so machine load is not what decides it.

Additional context

The fix is likely one line, matching what the sibling regressions already do: destroy the connections as well as closing the listener before the process is expected to exit.

Worth noting separately: because the child is killed rather than failing an assertion, the lane reports a timeout with no indication that every assertion in the file passed. Anybody reading the summary sees a failing spec and looks for a broken assertion that is not there.

Found while validating #6525, which does not touch image generation. Confirmed on a clean checkout before ruling it out as mine.

Originally created by @kolacheee on GitHub (Sep 22, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6529 Originally assigned to: @kolacheee on GitHub. ## Summary `scripts/regressions/image-dimension-limit.regression.ts` finishes its work, prints its own success line, and then never exits. The runner kills it at the 30-second budget and the whole lane fails, on a clean checkout with no changes. ## Expected behavior `pnpm regression` passes. The spec takes about half a second: that is how long it takes when it is the only file the runner is given. ## Actual behavior In a full lane it reaches the end, prints `Image dimension limit regression passed`, and then hangs until the runner terminates it: ``` [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 (30127ms) Regression summary: 345/346 passed; 1 failed. ``` The success line is the last statement in the file, after the `finally` block that awaits `server.close()`. So the assertions all pass and the server does close; what is left is something else holding the event loop open, most likely a keep-alive socket from the `fetch` calls the spec makes against its own loopback server. `server.close()` stops accepting and waits for connections to end, but it does not destroy an idle keep-alive connection. Sibling regressions that stand up a real server already call `server.closeAllConnections()` (for example `command-only-regenerate.regression.ts`, `shutdown-deadline.regression.ts`, `assigned-chat-sweep.regression.ts`). This one does not. ## Steps to reproduce 1. Check out `staging` with no local changes. 2. `pnpm install` 3. `pnpm regression` 4. Watch `image-dimension-limit.regression.ts`. It prints its success line and is then killed at 30 seconds. Running it alone passes every time, which is why this reads as a flake rather than as a hang: ```bash node ./scripts/run-regressions.mjs --filter scripts/regressions/image-dimension-limit.regression.ts ``` ## Environment - Marinara Engine version: 2.4.6 (`staging` at `3264925f3`, and again at `0df28742c`) - Install type: source - OS + version: Fedora, Linux 7.2.6 - Browser or app shell: not applicable, this is the Node regression lane ## Logs, screenshots, or video Four full lanes today: three ended `345/346 passed; 1 failed` with this spec timing out, one passed. Each time the success line was printed first. Run alone, it passed in 406ms, 460ms, 527ms and 826ms, including while another lane was running, so machine load is not what decides it. ## Additional context The fix is likely one line, matching what the sibling regressions already do: destroy the connections as well as closing the listener before the process is expected to exit. Worth noting separately: because the child is killed rather than failing an assertion, the lane reports a timeout with no indication that every assertion in the file passed. Anybody reading the summary sees a failing spec and looks for a broken assertion that is not there. Found while validating [#6525](https://github.com/Pasta-Devs/Marinara-Engine/pull/6525), which does not touch image generation. Confirmed on a clean checkout before ruling it out as mine.
bsakaguchi 2026-10-21 06:05:39 +07:00
Author
Owner

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

Frequency data point from a long session on staging eecfd4b08: hit this three times, full-suite runs only, each re-run of the full suite passing. Never reproduced in isolation, where --filter image-dimension-limit passed 3/3 at 351 ms, 377 ms and 427 ms.

One small thing that cost me time each occurrence: the runner prints TIMEOUT rather than FAILED for this, so the summary reports 1 failed with no file named anywhere in the log. Finding it needed a comm of START lines against result lines. Naming the file on a timeout would make the lane greppable even before the handle leak is fixed.

<!-- gh-comment-id:5780806224 --> @kolacheee commented on GitHub (Sep 22, 2026): Frequency data point from a long session on staging `eecfd4b08`: hit this three times, full-suite runs only, each re-run of the full suite passing. Never reproduced in isolation, where `--filter image-dimension-limit` passed 3/3 at 351 ms, 377 ms and 427 ms. One small thing that cost me time each occurrence: the runner prints `TIMEOUT` rather than `FAILED` for this, so the summary reports `1 failed` with no file named anywhere in the log. Finding it needed a `comm` of START lines against result lines. Naming the file on a timeout would make the lane greppable even before the handle leak is fixed.
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#3659
No description provided.