[ruby-core:88777] Re: [Ruby trunk Bug#15050] GC after forking with fibers crashes

From: Koichi Sasada <ko1@...>
Date: 2018-08-31 07:17:54 UTC
List: ruby-core #88777
On 2018/08/31 15:14, Eric Wong wrote:
>> What is the problem [Bug #15041] want to solve?
> 
> Switching fiber can crash in child process.  r64589 test change
> shows it:
> 
> ```
> -      Fiber.new{ pid = fork {} }.resume
> +      Fiber.new do
> +        pid = fork do
> +          Fiber.new {}.transfer
> +        end
> +      end.resume
> ```
> 
>> I remember that there are several implicit assumption on root fiber and so
>> on. I think changing this attribute is bad idea now.
> 
> I think we need to change to avoid crashes.  We change vm->main_thread
> at fork, too.  Maybe I'can investigate late next week.

Ok. We need to avoid this kind of crash.

-- 
// SASADA Koichi at atdot dot net

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread