Skip to content

fix(runner): job-control noise and timeout grace - #1344

Merged
Chemaclass merged 2 commits into
mainfrom
fix/parallel-noise-and-timeout-grace
Sep 7, 2026
Merged

fix(runner): job-control noise and timeout grace#1344
Chemaclass merged 2 commits into
mainfrom
fix/parallel-noise-and-timeout-grace

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

🤔 Background

A --parallel full-suite run reported bash's own job-control diagnostic as the stderr of a file that wrote nothing, and skipped the tear_down of a timed-out test about one run in three. Both were found while validating the tree for 0.50.2.

💡 Changes

  • Drop bash's child setpgid diagnostic from replayed worker stderr, and omit the whole block when nothing else remains. The child sets its own process group before it execs, so the group was always right and only the message was wrong.
  • Replace the watchdog's flat 0.3s SIGTERM-to-SIGKILL window with a bounded poll for the body to exit, so a tear_down still completes on a loaded machine and the common case ends sooner than the old sleep.
  • Cover both with tests that fail on main: a slow tear_down against a 1s budget, and worker stderr made of nothing but noise.

Two defects a --parallel full-suite run surfaced.

A worker turns on job control so each test is its own process group.
Bash's parent-side setpgid loses a harmless race against a child that
already exec'd, macOS answers EPERM, and bash reports every errno but
ESRCH. The line was replayed under "Stderr from <file>" for a file that
wrote nothing. The child sets the group itself before it execs, so the
group was always right and only the message was wrong.

The timeout watchdog gave the body a flat 0.3s between its SIGTERM and
its SIGKILL. That window has to cover killing whatever the body blocked
on, waking bash, reaching its EXIT trap and running tear_down, which a
loaded machine did not manage: the hook was skipped in about one
parallel full-suite run in three. The grace now polls for the body to
exit, bounded at 2s, so the common case ends sooner than the old sleep
and a slow hook still completes.
@Chemaclass Chemaclass added the bug Something isn't working label Sep 7, 2026
@Chemaclass Chemaclass self-assigned this Sep 7, 2026
@Chemaclass
Chemaclass enabled auto-merge (squash) September 7, 2026 14:32
@Chemaclass
Chemaclass merged commit 683ba16 into main Sep 7, 2026
37 checks passed
@Chemaclass
Chemaclass deleted the fix/parallel-noise-and-timeout-grace branch September 7, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants