Issue #5700 has been updated by Tomoyuki Chikanaga.
I agree. In fact we don't have to protect all Fibers but only a root Fiber of main Thread.
But can I check-in previous patch for a temporary workaround? The next release of 1.9.3 is almost coming.
----------------------------------------
Bug #5700: fork {} segfaults during VM cleanup when run inside Fiber
https://bugs.ruby-lang.org/issues/5700
Author: Eric Wong
Status: Open
Priority: Normal
Assignee:
Category: core
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2011-12-03 trunk 33934) [x86_64-linux]
The issue is very easy to reproduce:
Fiber.new do
p Process.waitpid2(fork {})
end.resume
Parent process successfully exits, child process segfaults while
it is exiting.
Backtrace is attached (gdb_bt.txt)
MALLOC_CHECK_=3 with GNU libc malloc() implementation detects an
attempt to free invalid pointer (attachment: malloc_check_3.txt)
I can also reproduce this with 1.9.2-p290 and 1.9.3-p0 as well as
latest trunk, so it has been around a while and a fix needs to be
backported.
--
http://bugs.ruby-lang.org/