Project

General

Profile

Actions

Bug #19395

closed

Process forking within non-main Ractor hits rb_bug()

Added by luke-gru (Luke Gruber) over 1 year ago. Updated 3 months ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:112155]

Description

def test_fork_in_ractor
  r2 = Ractor.new do
    pid = fork do
      exit Ractor.count
    end
    pid
  end
  pid = r2.take
  puts "Process #{Process.pid} waiting for #{pid}"
  _pid, status = Process.waitpid2(pid) # stuck forever
  if status.exitstatus != 1
    raise "status is #{status.exitstatus}"
  end
end
test_fork_in_ractor()

$ top # shows CPU usage is high for child process

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0