Skip to content

Wait for any helper in the thumbnail cancel test - #224

Open
rustytensor wants to merge 1 commit into
omacom:mainfrom
rustytensor:upstream-thumbnail-test-race
Open

rustytensor wants to merge 1 commit into
omacom:mainfrom
rustytensor:upstream-thumbnail-test-race

Conversation

@rustytensor

Copy link
Copy Markdown
Contributor

thumbnailsCancelRunningHelpersAndAvoidFailureMarker fails now and then on CI. It failed in this run of #219 before it was merged, and four times in a row on my two open PRs (#114 and #222), which don't touch thumbnails.

Why it fails

  • The test asks for six thumbnails whose helpers hang, then waits 5 seconds for the helper of the first clip to start.
  • The provider runs qBound(2, idealThreadCount() / 2, 6) helpers at once. That is two on a CI runner with four cores, and six on a desktop, which is why it passes at home.
  • Which two requests get those slots first is not fixed: each request goes through the cache pool before it reaches the helpers.
  • When the first clip is not one of the two, its helper only starts after another has used up its 10 seconds. One CI log says so: "the requested timeout (5000 ms) was too short, 9950 ms would have been sufficient".
  • After the failure the test returns while its responses are still alive, and a later test crashes on them. That is the SIGSEGV in the same logs.

What changed

+12 −3, in the test only. It now waits for any clip's helper file to have its PID in it and uses that one. Its comment already said "at least one helper".

Tested

On Omarchy, with the test held to two cores and both kept busy, it failed 7 times out of 8 before the change and passes 20 out of 20 after it. On four busy cores it failed 3 out of 12 before and passes 15 out of 15 after. Nothing else in the suite is touched.

The test asks for six thumbnails whose helpers hang, then waits for the
first clip's helper to start. The provider runs as few as two helpers at
once, and which requests get those slots first is not fixed. When the
first clip is not among them, its helper only starts once another has
used up its 10 seconds, and the 5 second wait fails. The test now takes
whichever helper has started.
@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This test-only change appears safe to merge.

Summary

Updates thumbnailsCancelRunningHelpersAndAvoidFailureMarker to wait for any helper with a nonempty PID file instead of waiting for the first clip.

  • The cancellation test waits for any thumbnail helper to start.

Reviews (1) · Last reviewed commit: "Wait for any helper in the thumbnail can..." · Reviewed by Greptile

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