Project

General

Profile

Actions

Bug #21759

open

`test_fork.rb:78` is failing with `RUBY_MN_THREADS=1`

Bug #21759: `test_fork.rb:78` is failing with `RUBY_MN_THREADS=1`

Added by hsbt (Hiroshi SHIBATA) about 2 hours ago.

Status:
Open
Assignee:
-
Target version:
-
ruby -v:
ruby 4.0.0dev (2025-12-01T18:02:35Z master f92001344d) +YJIT +MN +PRISM [arm64-darwin25]
[ruby-core:123990]

Description

The following failure of make btest is happend with RUBY_MN_THREADS=1.

#289 test_fork.rb:78:
     def now = Process.clock_gettime(Process::CLOCK_MONOTONIC)

     Thread.new do
       loop { sleep 0.0001 }
     end

     10.times do
       pid = fork{ exit!(0) }
       deadline = now + 10
       while true
         _, status = Process.waitpid2(pid, Process::WNOHANG)
         break if status
         if now > deadline
           Process.kill(:KILL, pid)
           raise "failed"
         end
         sleep 0.001
       end
       unless status.success?
         raise "child exited with status #{status}"
       end
   (...snip)
  #=> #<Assertion::Timeout: timed out after 180 seconds> (expected "ok")  [Bug #20670]

This failure occurred 4 times out of 5 times. But I couldn't reproduce this when I removed RUBY_MN_THREADS at 5 times.

No data to display

Actions

Also available in: PDF Atom