Project

General

Profile

Bug #17489

Updated by kirs (Kir Shatrov) almost 4 years ago

I was able to boil it down to this script: 

 ```ruby 
 require 'bundler/inline' 

 gemfile do 
   source 'https://rubygems.org' 
   gem "sinatra", "~> 2.1" 
 end 

 require 'sinatra' 

 class App < Sinatra::Base 
   get '/' do 
     200 
   end 
 end 

 module Sinatra 
   class Base 
     class << self 
       # patch it to avoid hitting other unsafe things 
       def setup_default_middleware(builder) 
         builder.use Rack::NullLogger 
       end 
     end 
   end 
 end 

 workers = 2.times.map do 
   Ractor.new { App.new } 
 end 

 Ractor.select(*workers) 
 ``` 

 Even though the code doesn't make a lot of sense and Sinatra has other stuff that's not compatible with Ractor, I would not expect user-level Ruby code to segfault. 


 I have attached attach the crash report and stderr output.

Back