phusion / passenger

A fast and robust web server and application server for Ruby, Python and Node.js
https://www.phusionpassenger.com/
MIT License
5.01k stars 547 forks source link

Ruby 2.5.3 and passenger 5.3.7 bug in passenger.log #2141

Open Sega100500 opened 6 years ago

Sega100500 commented 6 years ago

Debian Linux 8.11 Apache 2.4.10 Sites on Ruby 2.5.3 and Ruby 2.3.8 Passenger 5.3.7

At start Apache in passenger log:

App 28999 output: /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_supportlib/phusion_passenger/preloader_
shared_helpers.rb:134: [BUG] Segmentation fault at 0x0000000000001246
App 28999 output: ruby 2.3.8p459 (2018-10-18 revision 65136) [x86_64-linux]
App 28999 output:
App 28999 output: -- Control frame information -----------------------------------------------
App 28999 output: c:0008 p:---- s:0042 e:000041 CFUNC  :detach_process
App 28999 output: c:0007 p:0191 s:0038 e:000037 METHOD /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_su
pportlib/phusion_passenger/preloader_share
App 28999 output: c:0006 p:0081 s:0030 e:000029 METHOD /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_su
pportlib/phusion_passenger/preloader_share
App 28999 output: c:0005 p:0081 s:0022 e:000021 METHOD /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_su
pportlib/phusion_passenger/preloader_share
App 28999 output: c:0004
App 28999 output: p:0243
App 28999 output: s:0011
App 28999 output: e:000010
App 28999 output: CLASS
App 28999 output:  /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/helper-scripts/rack-preloader.rb:207
App 28999 output:
App 28999 output: c:0003
App 28999 output: p:0011
App 28999 output: s:0006
App 28999 output: e:000005
App 28999 output: CLASS
App 28999 output:  /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/helper-scripts/rack-preloader.rb:30
App 28999 output:
App 28999 output: c:0002 p:0038 s:0004 E:002570 EVAL   /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/helper-
scripts/rack-preloader.rb:29 [FINISH]
App 28999 output: c:0001 p:0000 s:0002 E:000310 (none)
App 28999 output:  [FINISH]
App 28999 output:
App 28999 output: -- Ruby level backtrace information ----------------------------------------
App 28999 output: /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/helper-scripts/rack-preloader.rb:29:in `<mai
n>'
App 28999 output: /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/helper-scripts/rack-preloader.rb:30:in `<mod
ule:PhusionPassenger>'
App 28999 output: /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/helper-scripts/rack-preloader.rb:207:in `<mo
dule:App>'
App 28999 output: /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_supportlib/phusion_passenger/preloader_
shared_helpers.rb:167:in `run_main_loop'
App 28999 output: /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_supportlib/phusion_passenger/preloader_
shared_helpers.rb:78:in `accept_and_process_next_client'
App 28999 output: /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_supportlib/phusion_passenger/preloader_
shared_helpers.rb:134:in `handle_spawn_command'
App 28999 output: /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_supportlib/phusion_passenger/preloader_
shared_helpers.rb:134:in `detach_process'
App 28999 output:
App 28999 output: -- Machine register context ------------------------------------------------
App 28999 output:  RIP: 0x0000000000001246 RBP: 0x000000000000e3e7 RSP: 0x00007ffdd5fb0be8
App 28999 output:  RAX: 0x0000000000000000 RBX: 0x0000556b8ecb36d0 RCX: 0x00007fc0f18c6148
App 28999 output:  RDX: 0x00007fc0ef5e5460 RDI: 0x000000000000001e RSI: 0x000000000000e3e7
App 28999 output:   R8: 0x0000000000000003  R9: 0x0000556b8f1ce378 R10: 0x0000556b8f45c360
App 28999 output:  R11: 0x0000000000000246 R12: 0x0000000000018000 R13: 0x0000556b8f1ce378
App 28999 output:  R14: 0x0000556b8f1ced28 R15: 0x0000000000000001 EFL: 0x0000000000010206
App 28999 output:
App 28999 output: -- C level backtrace information -------------------------------------------
App 29171 output: /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_supportlib/phusion_passenger/utils/nati
ve_support_utils.rb:38: [BUG] Segmentation fault at 0x0000000000001306
App 29171 output: ruby 2.3.8p459 (2018-10-18 revision 65136) [x86_64-linux]
App 29171 output:
App 29171 output: -- Control frame information -----------------------------------------------
App 29171 output: c:0008 p:---- s:0044 e:000043 CFUNC  :split_by_null_into_hash
App 29171 output: c:0007 p:0018 s:0040 e:000039 METHOD /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_su
pportlib/phusion_passenger/utils/native_su
App 29171 output: c:0006 p:0053 s:0036 e:000035 METHOD /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_su
pportlib/phusion_passenger/request_handler
App 29171 output: c:0005 p:0131 s:0027 e:000026 METHOD /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_su
pportlib/phusion_passenger/request_handler
App 29171 output: c:0004 p:0085 s:0017 e:000016 METHOD /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_su
pportlib/phusion_passenger/request_handler
App 29171 output: c:0003 p:0065 s:0009 e:000008 BLOCK  /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_su
pportlib/phusion_passenger/request_handler
App 29171 output: c:0002 p:0030 s:0005 e:000004 BLOCK  /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_su
pportlib/phusion_passenger/utils.rb:113 [FINISH]
App 29171 output: c:0001 p:---- s:0002 e:000001 (none) [FINISH]
App 29171 output:
App 29171 output: -- Ruby level backtrace information ----------------------------------------
App 29171 output: /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_supportlib/phusion_passenger/utils.rb:1
13:in `block in create_thread_and_abort_on_exception'
App 29171 output: /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_supportlib/phusion_passenger/request_ha
ndler.rb:415:in `block (3 levels) in start_threads'
App 29171 output: /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_supportlib/phusion_passenger/request_ha
ndler/thread_handler.rb:110:in `main_loop'
App 29171 output: /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_supportlib/phusion_passenger/request_ha
ndler/thread_handler.rb:143:in `accept_and_process_next_request'
App 29171 output: /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_supportlib/phusion_passenger/request_ha
ndler/thread_handler.rb:218:in `parse_session_request'
App 29171 output: /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_supportlib/phusion_passenger/utils/nati
ve_support_utils.rb:38:in `split_by_null_into_hash'
App 29171 output: /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/src/ruby_supportlib/phusion_passenger/utils/nati
ve_support_utils.rb:38:in `split_by_null_into_hash'
App 29171 output:
App 29171 output: -- Machine register context ------------------------------------------------
App 29171 output:  RIP: 0x0000000000001306 RBP: 0x00007fc0e4001a8d RSP: 0x00007fc0e9e723b8
App 29171 output:
App 29171 output:  RAX: 0x0000000000000000 RBX: 0x00007fc0e4001820 RCX: 0x00007fc0e9e74158
App 29171 output:  RDX: 0x00007fc0ef5e5590 RDI: 0x0000556b8f1ced28 RSI: 0x0000556b8fb576b0
App 29171 output:   R8: 0x0000000000000003  R9: 0x0000556b8f1ce648 R10: 0x0000556b8f45c360
App 29171 output:  R11: 0x00007fc0e9e74198 R12: 0x00007fc0e4001820 R13: 0x0000556b8fb576b0
App 29171 output:  R14: 0x0000556b8f1ced28 R15: 0x0000000000000001 EFL: 0x0000000000010206
App 29171 output:
App 29171 output: -- C level backtrace information -------------------------------------------
FooBarWidget commented 6 years ago

This looks like an issue triggered in the Passenger native extension. What happens if you remove the native extension and have it recompiled? Try this:

rm -rf /home/ruby/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/passenger-5.3.7/buildout/ruby
passenger-config build-native-support
washu commented 5 years ago

try this: bundle exec passenger-config compile-agent --force issue compiled agent agaent system default ruby 2.3 and your loading ruby 2.5 runtime, there is something there that causes some weirdness i had simialr issue with ruby 2.6 run the above command and force a recompile of the agent against your running env.