Files
William T. NelsonandClaude Opus 5.5 b77c9f32dc [ruby/test-unit-ruby-core] Close stdin before terminating a
timed-out memory leak child
(https://github.com/ruby/test-unit-ruby-core/pull/37)

* Close stdin before terminating a timed-out memory leak child

With a sample range, assert_no_memory_leak keeps the child's stdin open,
and the child's ensure clause reads a "continue" line from it after each
sample. When the timeout fires while the child is running the sampled
code, EnvUtil.terminate sends SIGTERM, and the child's ensure clause
then blocks reading stdin, which was closed only after terminate
returned. SIGTERM cannot end the child, so terminate escalates to
SIGABRT and then waits for the aborted child without a time limit. On
ruby/ruby's YJIT macOS CI jobs the child sometimes did not exit after
the RUBY_ON_BUG core dump, and the test worker hung until the runner
killed it 20 minutes later. In other runs the test passed but left a
crash report for the child.

Close stdin first. The child's read then returns nil, and its ensure
clause breaks out of the sample loop. The break discards the
SignalException raised by SIGTERM, so the child exits with status 0. If
SIGTERM arrives before the child reaches the sample loop, the child
still dies from SIGTERM.

The existing timeout test now also checks that the child exited
normally or by SIGTERM.

https://github.com/ruby/test-unit-ruby-core/commit/ce7a92e724

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 00:23:25 +00:00
..
2026-03-02 15:37:38 +09:00
2026-10-08 07:04:09 +09:00
2025-12-25 15:31:50 +09:00
2026-10-19 19:54:37 +02:00
2026-09-03 08:38:46 +09:00
2025-09-27 22:46:33 -07:00
…
2026-07-19 16:22:29 +09:00
…
…
…
…
2026-05-17 12:39:13 +09:00
…
…
2024-09-08 23:40:17 +09:00
…
2026-07-26 21:54:15 +09:00
…
2026-10-19 19:54:37 +02:00
…