Skip to content

Fix random EPIPE failure in SIGINT restore tests#1191

Merged
k0kubun merged 1 commit intomasterfrom
fix-broken-pipe
Mar 27, 2026
Merged

Fix random EPIPE failure in SIGINT restore tests#1191
k0kubun merged 1 commit intomasterfrom
fix-broken-pipe

Conversation

@k0kubun
Copy link
Copy Markdown
Member

@k0kubun k0kubun commented Mar 27, 2026

Rescue Errno::EPIPE in test_sigint_restore_default and test_sigint_restore_block. The child process may exit before assert_in_out_err finishes writing "exit\n" to its stdin pipe, which is a race condition in the test setup, not an IRB bug.

test-bundled-gems CI on ruby/ruby has been unstable due to this failure (e.g. https://github.com/ruby/ruby/actions/runs/23619285229/job/68794518403) these days, and this PR attempts to mitigate it.

Rescue Errno::EPIPE in test_sigint_restore_default and
test_sigint_restore_block. The child process may exit before
assert_in_out_err finishes writing "exit\n" to its stdin pipe,
which is a race condition in the test setup, not an IRB bug.
@st0012
Copy link
Copy Markdown
Member

st0012 commented Mar 27, 2026

@k0kubun Do you know if this appeared only after ruby/ruby#16513 (merged yesterday)? Asking cause you mentioned "these days" and I wasn't aware that the non-parallelized bundled gems tests could also have race conditions between tests 🤔

@k0kubun
Copy link
Copy Markdown
Member Author

k0kubun commented Mar 27, 2026

Not sure if "only after". It did feel like this particular failure was happening more than once, at least for this week. Let's make tests more robust to make it work whether we have it or not 🙂

@k0kubun k0kubun merged commit cfd0b91 into master Mar 27, 2026
116 of 118 checks passed
@k0kubun k0kubun deleted the fix-broken-pipe branch March 27, 2026 16:13
k0kubun added a commit to ruby/ruby that referenced this pull request Mar 27, 2026
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.

2 participants