Skip to content

fix(repeat): stop the seek-back check from waiting forever on an idle ffmpeg - #80

Merged
umiyosh merged 1 commit into
masterfrom
fix/repeat-ffmpeg-limit
Nov 16, 2026
Merged

umiyosh merged 1 commit into
masterfrom
fix/repeat-ffmpeg-limit

Conversation

@umiyosh

@umiyosh umiyosh commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Summary

Refs #75. Once, a build sat for 15 minutes in the check that runs before capture, with node, Chromium and one ffmpeg all idle at 0% CPU. The ffmpeg left running was the one the seek-back check (repeat.ts) starts to turn each compared frame into a small gray image. It was run with spawnSync and no time limit, so node waited on it with no end. Every other wait in that check (the film page's calls) already has a limit.

This does not find why that ffmpeg went idle (it has not happened again in 10 builds). It makes the build stop waiting:

  • ffmpegSync (the time-limited ffmpeg run from stills: the command can wait forever after Chromium goes away #51) takes input for stdin and tries: an ffmpeg that runs past its limit is killed and run again until the tries are used up.
  • gray() in repeat.ts uses it with a 10 s limit and 2 tries. A frame takes well under a second, so a normal build is not affected. A stall now costs at most about 20 s, then the check fails with ffmpeg did not read the frame at <t> s in 10s (2 tries), which also says where it happened if it comes back.

Test plan

  • tests/stall.test.ts: an ffmpeg that never exits makes gray() fail with the frame's time and "(2 tries)" in under 5 s
  • tests/stall.test.ts: an ffmpeg that stalls only on its first run is retried and the frame is read (480 × 270 gray bytes)
  • make check (lint, format, types, all tests, quality gate)

@umiyosh
umiyosh merged commit 17e6534 into master Nov 16, 2026
1 check passed
@umiyosh
umiyosh deleted the fix/repeat-ffmpeg-limit branch November 16, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant