From: "hsbt (Hiroshi SHIBATA) via ruby-core" Date: 2025-12-03T04:45:11+00:00 Subject: [ruby-core:123990] [Ruby Bug#21759] `test_fork.rb:78` is failing with `RUBY_MN_THREADS=1` Issue #21759 has been reported by hsbt (Hiroshi SHIBATA). ---------------------------------------- Bug #21759: `test_fork.rb:78` is failing with `RUBY_MN_THREADS=1` https://bugs.ruby-lang.org/issues/21759 * Author: hsbt (Hiroshi SHIBATA) * Status: Open * ruby -v: ruby 4.0.0dev (2025-12-01T18:02:35Z master f92001344d) +YJIT +MN +PRISM [arm64-darwin25] * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- 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) #=> # (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. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/