rails_same_site_cookie icon indicating copy to clipboard operation
rails_same_site_cookie copied to clipboard

Segfaults in Rails 4.2 / ruby 2.3.3

Open calh opened this issue 5 years ago • 2 comments

Hi, I'm running this in Rails 4.2.11, ruby 2.3.3p222, and I'm seeing random segfaults coming from the middleware call. Here's a snippet.

App 48203 stderr: -- Ruby level backtrace information ----------------------------------------
App 48203 stderr: /opt/ruby23/lib/ruby/gems/2.3.0/gems/passenger-5.1.2/src/ruby_supportlib/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'
App 48203 stderr: /opt/ruby23/lib/ruby/gems/2.3.0/gems/passenger-5.1.2/src/ruby_supportlib/phusion_passenger/request_handler.rb:416:in `block (3 levels) in start_threads'
App 48203 stderr: /opt/ruby23/lib/ruby/gems/2.3.0/gems/passenger-5.1.2/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:113:in `main_loop'
App 48203 stderr: /opt/ruby23/lib/ruby/gems/2.3.0/gems/passenger-5.1.2/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:160:in `accept_and_process_next_request'
App 48203 stderr: /opt/ruby23/lib/ruby/gems/2.3.0/gems/passenger-5.1.2/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb:97:in `process_request'
App 48203 stderr: .../bundle/ruby/2.3.0/gems/railties-4.2.11/lib/rails/railtie.rb:194:in `method_missing'
App 48203 stderr: .../bundle/ruby/2.3.0/gems/railties-4.2.11/lib/rails/railtie.rb:194:in `public_send'
App 48203 stderr: .../bundle/ruby/2.3.0/gems/railties-4.2.11/lib/rails/application.rb:165:in `call'
App 48203 stderr: .../bundle/ruby/2.3.0/gems/railties-4.2.11/lib/rails/engine.rb:518:in `call'
App 48203 stderr: .../bundle/ruby/2.3.0/gems/lumberjack-1.0.13/lib/lumberjack/rack/unit_of_work.rb:11:in `call'
App 48203 stderr: .../bundle/ruby/2.3.0/gems/lumberjack-1.0.13/lib/lumberjack.rb:34:in `unit_of_work'
App 48203 stderr: .../bundle/ruby/2.3.0/gems/lumberjack-1.0.13/lib/lumberjack/rack/unit_of_work.rb:12:in `block in call'
App 48203 stderr: .../bundle/ruby/2.3.0/gems/rack-1.6.11/lib/rack/sendfile.rb:113:in `call'
App 48203 stderr: .../bundle/ruby/2.3.0/gems/activesupport-4.2.11/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
App 48203 stderr: .../bundle/ruby/2.3.0/gems/rack-1.6.11/lib/rack/runtime.rb:18:in `call'
App 48203 stderr: .../bundle/ruby/2.3.0/gems/rails_same_site_cookie-0.1.5/lib/rails_same_site_cookie/middleware.rb:13:in `call'

calh avatar Feb 06 '20 18:02 calh

Hi @calh is it still a problem in ruby 2.3.3? What did you do to resolve the issue?

ssinghi avatar Sep 03 '20 15:09 ssinghi

It is still a problem, although it's fairly rare and just very difficult to trace down. My suspicion is that it's not specifically your gem, but perhaps an interaction between Passenger and Ruby, and your middleware is just caught in the trace.

My only path right now is to upgrade ruby, rails, and passenger to see if that helps. But the upgrade process is a beast and will take me a while.

calh avatar Sep 03 '20 15:09 calh