Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when starting Ruby 3.3.0 Rails 7 application #2520

Open
mitchellhenke opened this issue Jan 23, 2024 · 4 comments
Open

Crash when starting Ruby 3.3.0 Rails 7 application #2520

mitchellhenke opened this issue Jan 23, 2024 · 4 comments

Comments

@mitchellhenke
Copy link

Issue report

Fill in as much as possible so that we can understand, find and fix the problem.

Are you sure this is a bug in Passenger?
Please read our troubleshooting and debugging guides first:
https://www.phusionpassenger.com/library/admin/troubleshooting/
https://www.phusionpassenger.com/library/admin/

Please try with the newest version of Passenger to avoid issues that have already been fixed

Question 1: What is the problem?

  • What is the expected behavior?

Booting a Ruby 3.3 application without errors

  • What is the actual behavior?

Infrequently, passenger will crash when booting the application.

  • How can we reproduce it? Please try to provide a sample application (or Virtual Machine) demonstrating the issue. Otherwise, if we can't reproduce it, we might have to ask you a number of followup questions or run certain commands to try and figure out the problem.

It does not happen every time which makes it a little difficult to track down. We didn't see the error prior to upgrading our application to Ruby 3.3.

This is the stacktrace in passenger.log:

Error: The application encountered the following error: Interrupted system call @ rb_sysopen - /tmp/passenger.spawn.XXXX0DHlFB/response/finish (Errno::EINTR)
/passenger-6.0.19/src/helper-scripts/rack-preloader.rb:29:in `<main>'
/passenger-6.0.19/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/passenger-6.0.19/src/helper-scripts/rack-preloader.rb:211:in `<module:App>'
/passenger-6.0.19/src/helper-scripts/rack-preloader.rb:169:in `negotiate_spawn_command'
/passenger-6.0.19/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:288:in `advertise_readiness'
/passenger-6.0.19/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:288:in `open'
/passenger-6.0.19/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:288:in `initialize'

[ E 2024-01-23 17:12:25.0103 10559/T23 age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /app/application: The application encountered the following error: Interrupted system call @ rb_sysopen - /tmp/passenger.spawn.XXXX0DHlFB/response/finish (Errno::EINTR)
[ E 2024-01-23 17:12:25.0126 10559/T8 age/Cor/Con/CheckoutSession.cpp:281 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 874b2452. Please see earlier logs for details about the error.

We see the Interrupted system call @ rb_sysopen - /tmp/passenger.spawn.XXXX0DHlFB/response/finish (Errno::EINTR) more frequently, but sometimes the application boots successfully after that. In rare cases, it results in Could not spawn process for application and the application boot fails.

Question 2: Passenger version and integration mode:

open source 6.0.19/nginx

Question 3: OS or Linux distro, platform (including version):

Ubuntu 20.04

Question 4: Passenger installation method:

Your answer:
[ ] RubyGems + Gemfile
[x] RubyGems, no Gemfile
[ ] Phusion APT repo
[ ] Phusion YUM repo
[ ] OS X Homebrew
[ ] source tarball
[ ] Other, please specify:

Question 5: Your app's programming language (including any version managers) and framework (including versions):

Ruby 3.3.0, Rails 7.1.2

Question 6: Are you using a PaaS and/or containerization? If so which one?

No.

Question 7: Anything else about your setup that we should know?

Your answer:


We strive for quality and appreciate you taking the time to submit a report! Please note that if you want guaranteed response times and priority issue support we encourage you to join our enterprise customer base. They also provide us with the means to continue our high level of open source support!

@CamJN
Copy link
Member

CamJN commented Jan 23, 2024

Your app is receiving an unhandled signal during a system call to open the file used to indicate that the app finished spawning. It is possible that Passenger sent that signal if the app took a long time to boot, but it is also possible that the signal came from elsewhere such as the oom killer or some other watchdog type process. It would be helpful if you could determine which signal number it is receiving, or what process is sending it.

@herrbuerger
Copy link

@mitchellhenke I was wondering if you figured out what was causing this issue as we are also running into it currently.

@mitchellhenke
Copy link
Author

mitchellhenke commented May 5, 2024 via email

@CamJN
Copy link
Member

CamJN commented Aug 9, 2024

This should be fixed in 6.0.23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants