Skip to content

🐛 fix(test): serialize external reaping - #1872

Merged
gaborbernat merged 1 commit into
mainfrom
fix/toxiproxy-reap-owner
Aug 30, 2026
Merged

gaborbernat merged 1 commit into
mainfrom
fix/toxiproxy-reap-owner

Conversation

@gaborbernat

@gaborbernat gaborbernat commented Aug 30, 2026

Copy link
Copy Markdown
Member

The toxiproxy external-reap fixture allowed its startup owner and helper to wait for the same child, so either thread could consume the exit status. The resulting ECHILD race failed the macOS platform lane on main.

The fixture now exits with a zero status after transferring its captured output descriptors through a Unix socket. The external reaper owns waitpid, then releases the transferred OwnedFd values so startup receives ECHILD through its public error path. Exact descriptor-count handling closes every received descriptor on failure. 🔒

Closes #1864

The startup owner and the external reap fixture could both wait for the same
process, so either thread could consume its exit status.

Transfer the capture descriptors to the test before the fixture exits. The test
owns waitpid and releases those descriptors after reaping the process. The
startup owner then receives ECHILD through the intended error path.

Refs #1864
@gaborbernat gaborbernat added the bug Something isn't working label Aug 30, 2026
@gaborbernat gaborbernat self-assigned this Aug 30, 2026
@codspeed

codspeed Bot commented Aug 30, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 23 untouched benchmarks
⏩ 139 skipped benchmarks1


Comparing fix/toxiproxy-reap-owner (fe4aa7e) with main (60698d6)

Open in CodSpeed

Footnotes

  1. 139 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@gaborbernat
gaborbernat merged commit 2a89fc0 into main Aug 30, 2026
32 checks passed
@gaborbernat
gaborbernat deleted the fix/toxiproxy-reap-owner branch August 30, 2026 03:41
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.

Make external process reaping deterministic

1 participant