phusion / passenger

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

MacOS 12.01 Monterey Apple Silicon M1 Mini Errors #2395

Closed daBee closed 2 years ago

daBee commented 2 years ago

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? I've checked the directives I've been given for the .so and .ini files and they are correct. The nature of the error tells me this is a Passenger error. I've restarted the machine, restarted nginx, and all this started after an update to both homebrew and gems while trying different versions of Ruby, currently set to 2.7.4 (see the reports).

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

Question 1: What is the problem?

Errors and no website. Expected website. I get a Passenger error:

App 2959 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/forwardable/version.rb:3: warning: already initialized constant Forwardable::VERSION
App 2959 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/forwardable-1.3.2/lib/forwardable.rb:115: warning: previous definition of VERSION was here
App 2959 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/forwardable/version.rb:4: warning: already initialized constant Forwardable::FORWARDABLE_VERSION
App 2959 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/forwardable-1.3.2/lib/forwardable.rb:116: warning: previous definition of FORWARDABLE_VERSION was here
App 2959 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/arm64-darwin21/strscan.bundle: warning: already initialized constant StringScanner::Version
App 2959 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/arm64-darwin21/strscan.bundle: warning: already initialized constant StringScanner::Id
App 2959 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/fileutils.rb:105: warning: already initialized constant FileUtils::VERSION
App 2959 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/fileutils-1.6.0/lib/fileutils.rb:105: warning: previous definition of VERSION was here
App 2959 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/fileutils.rb:1284: warning: already initialized constant FileUtils::Entry_::S_IF_DOOR
App 2959 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/fileutils-1.6.0/lib/fileutils.rb:1269: warning: previous definition of S_IF_DOOR was here
App 2959 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/fileutils.rb:1569: warning: already initialized constant FileUtils::Entry_::DIRECTORY_TERM
App 2959 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/fileutils-1.6.0/lib/fileutils.rb:1557: warning: previous definition of DIRECTORY_TERM was here
App 2959 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/fileutils.rb:1627: warning: already initialized constant FileUtils::OPT_TABLE
App 2959 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/fileutils-1.6.0/lib/fileutils.rb:1615: warning: previous definition of OPT_TABLE was here
App 2959 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/fileutils.rb:1686: warning: already initialized constant FileUtils::LOW_METHODS
App 2959 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/fileutils-1.6.0/lib/fileutils.rb:1674: warning: previous definition of LOW_METHODS was here
App 2959 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/fileutils.rb:1693: warning: already initialized constant FileUtils::METHODS
App 2959 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/fileutils-1.6.0/lib/fileutils.rb:1681: warning: previous definition of METHODS was here
App 2959 output: Error: The application encountered the following error: superclass mismatch for class StringIO (TypeError)
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/openssl/config.rb:14:in `require'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/openssl/config.rb:14:in `<top (required)>'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/openssl.rb:18:in `require'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/openssl.rb:18:in `<top (required)>'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/session/cookie.rb:3:in `require'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/session/cookie.rb:3:in `<top (required)>'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1809:in `require'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1809:in `<class:Base>'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:909:in `<module:Sinatra>'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:22:in `<top (required)>'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra/main.rb:26:in `require'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra/main.rb:26:in `<module:Sinatra>'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra/main.rb:1:in `<top (required)>'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra.rb:1:in `require'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra.rb:1:in `<top (required)>'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.30/lib/bundler/runtime.rb:60:in `require'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.30/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.30/lib/bundler/runtime.rb:55:in `each'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.30/lib/bundler/runtime.rb:55:in `block in require'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.30/lib/bundler/runtime.rb:44:in `each'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.30/lib/bundler/runtime.rb:44:in `require'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.30/lib/bundler.rb:175:in `require'
App 2959 output:     /Users/rich/Sites/HQ/app.rb:4:in `<top (required)>'
App 2959 output:     config.ru:4:in `require'
App 2959 output:     config.ru:4:in `block in <main>'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:125:in `instance_eval'
App 2959 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:125:in `initialize'
App 2959 output:     config.ru:1:in `new'
App 2959 output:     config.ru:1:in `<main>'
App 2959 output:     /opt/homebrew/Cellar/passenger/6.0.11_1/libexec/src/helper-scripts/rack-preloader.rb:101:in `eval'
App 2959 output:     /opt/homebrew/Cellar/passenger/6.0.11_1/libexec/src/helper-scripts/rack-preloader.rb:101:in `preload_app'
App 2959 output:     /opt/homebrew/Cellar/passenger/6.0.11_1/libexec/src/helper-scripts/rack-preloader.rb:189:in `block in <module:App>'
App 2959 output:     /opt/homebrew/Cellar/passenger/6.0.11_1/libexec/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:390:in `run_block_and_record_step_progress'
App 2959 output:     /opt/homebrew/Cellar/passenger/6.0.11_1/libexec/src/helper-scripts/rack-preloader.rb:188:in `<module:App>'
App 2959 output:     /opt/homebrew/Cellar/passenger/6.0.11_1/libexec/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
App 2959 output:     /opt/homebrew/Cellar/passenger/6.0.11_1/libexec/src/helper-scripts/rack-preloader.rb:29:in `<main>'
[ E 2021-11-10 16:04:27.7195 2408/T1b age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /Users/rich/Sites/HQ: The application encountered the following error: superclass mismatch for class StringIO (TypeError)
    Error ID: 9ee0768d
    Error details saved to: /var/folders/_k/t5tdgpd93_d6vstpk4678lhh0000gn/T//passenger-error-wCipNP.html

[ E 2021-11-10 16:04:27.7354 2408/Tg age/Cor/Con/CheckoutSession.cpp:276 ]: [Client 5-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 9ee0768d. Please see earlier logs for details about the error.
App 3040 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/forwardable/version.rb:3: warning: already initialized constant Forwardable::VERSION
App 3040 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/forwardable-1.3.2/lib/forwardable.rb:115: warning: previous definition of VERSION was here
App 3040 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/forwardable/version.rb:4: warning: already initialized constant Forwardable::FORWARDABLE_VERSION
App 3040 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/forwardable-1.3.2/lib/forwardable.rb:116: warning: previous definition of FORWARDABLE_VERSION was here
App 3040 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/arm64-darwin21/strscan.bundle: warning: already initialized constant StringScanner::Version
App 3040 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/arm64-darwin21/strscan.bundle: warning: already initialized constant StringScanner::Id
App 3040 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/fileutils.rb:105: warning: already initialized constant FileUtils::VERSION
App 3040 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/fileutils-1.6.0/lib/fileutils.rb:105: warning: previous definition of VERSION was here
App 3040 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/fileutils.rb:1284: warning: already initialized constant FileUtils::Entry_::S_IF_DOOR
App 3040 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/fileutils-1.6.0/lib/fileutils.rb:1269: warning: previous definition of S_IF_DOOR was here
App 3040 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/fileutils.rb:1569: warning: already initialized constant FileUtils::Entry_::DIRECTORY_TERM
App 3040 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/fileutils-1.6.0/lib/fileutils.rb:1557: warning: previous definition of DIRECTORY_TERM was here
App 3040 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/fileutils.rb:1627: warning: already initialized constant FileUtils::OPT_TABLE
App 3040 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/fileutils-1.6.0/lib/fileutils.rb:1615: warning: previous definition of OPT_TABLE was here
App 3040 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/fileutils.rb:1686: warning: already initialized constant FileUtils::LOW_METHODS
App 3040 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/fileutils-1.6.0/lib/fileutils.rb:1674: warning: previous definition of LOW_METHODS was here
App 3040 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/fileutils.rb:1693: warning: already initialized constant FileUtils::METHODS
App 3040 output: /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/fileutils-1.6.0/lib/fileutils.rb:1681: warning: previous definition of METHODS was here
App 3040 output: Error: The application encountered the following error: superclass mismatch for class StringIO (TypeError)
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/openssl/config.rb:14:in `require'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/openssl/config.rb:14:in `<top (required)>'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/openssl.rb:18:in `require'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/openssl.rb:18:in `<top (required)>'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/session/cookie.rb:3:in `require'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/session/cookie.rb:3:in `<top (required)>'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1809:in `require'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1809:in `<class:Base>'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:909:in `<module:Sinatra>'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:22:in `<top (required)>'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra/main.rb:26:in `require'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra/main.rb:26:in `<module:Sinatra>'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra/main.rb:1:in `<top (required)>'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra.rb:1:in `require'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra.rb:1:in `<top (required)>'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.30/lib/bundler/runtime.rb:60:in `require'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.30/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.30/lib/bundler/runtime.rb:55:in `each'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.30/lib/bundler/runtime.rb:55:in `block in require'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.30/lib/bundler/runtime.rb:44:in `each'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.30/lib/bundler/runtime.rb:44:in `require'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.30/lib/bundler.rb:175:in `require'
App 3040 output:     /Users/rich/Sites/HQ/app.rb:4:in `<top (required)>'
App 3040 output:     config.ru:4:in `require'
App 3040 output:     config.ru:4:in `block in <main>'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:125:in `instance_eval'
App 3040 output:     /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:125:in `initialize'
App 3040 output:     config.ru:1:in `new'
App 3040 output:     config.ru:1:in `<main>'
App 3040 output:     /opt/homebrew/Cellar/passenger/6.0.11_1/libexec/src/helper-scripts/rack-preloader.rb:101:in `eval'
App 3040 output:     /opt/homebrew/Cellar/passenger/6.0.11_1/libexec/src/helper-scripts/rack-preloader.rb:101:in `preload_app'
App 3040 output:     /opt/homebrew/Cellar/passenger/6.0.11_1/libexec/src/helper-scripts/rack-preloader.rb:189:in `block in <module:App>'
App 3040 output:     /opt/homebrew/Cellar/passenger/6.0.11_1/libexec/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:390:in `run_block_and_record_step_progress'
App 3040 output:     /opt/homebrew/Cellar/passenger/6.0.11_1/libexec/src/helper-scripts/rack-preloader.rb:188:in `<module:App>'
App 3040 output:     /opt/homebrew/Cellar/passenger/6.0.11_1/libexec/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
App 3040 output:     /opt/homebrew/Cellar/passenger/6.0.11_1/libexec/src/helper-scripts/rack-preloader.rb:29:in `<main>'
[ E 2021-11-10 16:04:28.4077 2408/T1g age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /Users/rich/Sites/HQ: The application encountered the following error: superclass mismatch for class StringIO (TypeError)
    Error ID: c461095f
    Error details saved to: /var/folders/_k/t5tdgpd93_d6vstpk4678lhh0000gn/T//passenger-error-4Ctr7z.html

[ E 2021-11-10 16:04:28.4219 2408/Tj age/Cor/Con/CheckoutSession.cpp:276 ]: [Client 6-1] Cannot checkout session because a spawning error occurred. The identifier of the error is c461095f. Please see earlier logs for details about the error.

Some passenger info from a script I wrote:

RF: Passenger Standalone Info
_____ Passenger Installation Test: _____

 * Checking whether this Passenger install is in PATH... ✓
 * Checking whether there are no other Passenger installations... (!)

     You are currently validating against Phusion Passenger(R) 6.0.11, located in:

         /opt/homebrew/Cellar/passenger/6.0.11_1/libexec/bin/passenger

     Besides this Passenger installation, the following other
     Passenger installations have also been detected:

         /opt/homebrew/bin/passenger

     Please uninstall these other Passenger installations to avoid
     confusion or conflicts.

Detected 0 error(s), 1 warning(s).
_____ Passenger Stats: _____

Version: 6.0.11
Date   : 2021-11-10 16:30:28 -0500

-------- Apache processes --------

----------- Nginx processes ------------
PID   PPID  VMSize       Resident  Name
----------------------------------------
2401  1     399215.2 MB  1.1 MB    nginx: master process /opt/homebrew/opt/nginx/bin/nginx -g daemon off;
2410  2401  399352.0 MB  0.4 MB    nginx: worker process
2411  2401  399352.0 MB  0.4 MB    nginx: worker process
2412  2401  399223.0 MB  0.4 MB    nginx: worker process
2413  2401  399360.0 MB  0.4 MB    nginx: worker process
2414  2401  399351.0 MB  0.4 MB    nginx: worker process
2415  2401  399632.0 MB  0.4 MB    nginx: worker process
2416  2401  399488.0 MB  0.4 MB    nginx: worker process
2417  2401  399488.0 MB  0.4 MB    nginx: worker process

------ Passenger processes -------
PID   VMSize       Resident  Name
----------------------------------
2405  399091.7 MB  3.2 MB    Passenger watchdog
2408  399950.5 MB  7.9 MB    Passenger core
_____ brew info nginx --with-passenger _____

nginx: stable 1.21.4 (bottled), HEAD
HTTP(S) server and reverse proxy, and IMAP/POP3 proxy server
https://nginx.org/
/opt/homebrew/Cellar/nginx/1.21.3 (3 files, 675.5KB)
    Built from source
/opt/homebrew/Cellar/nginx/1.21.4 (26 files, 2.2MB) *
    Poured from bottle on 2021-11-09 at 14:20:43
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/nginx.rb
License: BSD-2-Clause
==> Dependencies
Required: openssl@1.1, pcre
==> Options
--HEAD
    Install HEAD version
==> Caveats
Docroot is: /opt/homebrew/var/www

The default port has been set in /opt/homebrew/etc/nginx/nginx.conf to 8080 so that
nginx can run without sudo.

nginx will load all files in /opt/homebrew/etc/nginx/servers/.

To restart nginx after an upgrade:
    brew services restart nginx
Or, if you don't want/need a background service you can just run:
    /opt/homebrew/opt/nginx/bin/nginx -g daemon off;
==> Analytics
install: 45,562 (30 days), 127,767 (90 days), 513,605 (365 days)
install-on-request: 45,458 (30 days), 127,438 (90 days), 511,982 (365 days)
build-error: 21 (30 days)

_____ brew info passenger _____

passenger: stable 6.0.11 (bottled), HEAD
Server for Ruby, Python, and Node.js apps via Apache/NGINX
https://www.phusionpassenger.com/
/opt/homebrew/Cellar/passenger/6.0.11_1 (4,973 files, 247.7MB) *
    Poured from bottle on 2021-11-10 at 16:27:07
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/passenger.rb
License: MIT
==> Dependencies
Build: nginx
Required: openssl@1.1, pcre
==> Options
--HEAD
    Install HEAD version
==> Caveats
To activate Phusion Passenger for Nginx, run:
    brew install nginx
And add the following to /opt/homebrew/etc/nginx/nginx.conf at the top scope (outside http{}):
    load_module /opt/homebrew/opt/passenger/libexec/modules/ngx_http_passenger_module.so;
And add the following to /opt/homebrew/etc/nginx/nginx.conf in the http scope:
    passenger_root /opt/homebrew/opt/passenger/libexec/src/ruby_supportlib/phusion_passenger/locations.ini;
    passenger_ruby /usr/bin/ruby;

To activate Phusion Passenger for Apache, create /etc/apache2/other/passenger.conf:
    LoadModule passenger_module /opt/homebrew/opt/passenger/libexec/buildout/apache2/mod_passenger.so
    PassengerRoot /opt/homebrew/opt/passenger/libexec/src/ruby_supportlib/phusion_passenger/locations.ini
    PassengerDefaultRuby /usr/bin/ruby
==> Analytics
install: 662 (30 days), 1,595 (90 days), 6,535 (365 days)
install-on-request: 623 (30 days), 1,504 (90 days), 6,044 (365 days)
build-error: 0 (30 days)

_____ Ruby Info (programming language): _____

/Users/rich/.rbenv/shims/ruby
ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [arm64-darwin21]
_____ nginx version: _____

_____ OS Version: _____

ProductName:    macOS
ProductVersion: 12.0.1
BuildVersion:   21A559
Software:

        System Software Overview:

            System Version: macOS 12.0.1 (21A559)
            Kernel Version: Darwin 21.1.0
            Boot Volume: Primer
            Boot Mode: Normal
            Computer Name: HQ3
            User Name: Rich (rich)
            Secure Virtual Memory: Enabled
            System Integrity Protection: Enabled
            Time since boot: 7 days 3:32

Passenger installation method:
[ X ] OS X Homebrew

**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: This happened from a recent update to passenger, nginx through gems and homebrew update. Not sure I have much else that I can report.

daBee commented 2 years ago

Anybody home?

CamJN commented 2 years ago

Do you have Rosetta 2 installed? I don't have an apple silicon Mac to test this on, but my theory is that the ruby installed by rbenv has accidentally had an amd64 lib installed alongside an arm64 lib and the wrong one got loaded. Can you run this command?

find ~/.rbenv -type f \( -perm +111 -o -name '*.so' -o -name '*.dylib' \) -exec sh -c 'lipo -archs {} 2>/dev/null >/dev/null' \; -print | xargs -n1 lipo -info

daBee commented 2 years ago

I do not have Rosetta 2 installed. That instruction is hanging silent. You want me to chase this up with rbenv?

CamJN commented 2 years ago

Not necessarily, perhaps try updating rubygems first per: https://stackoverflow.com/questions/70026904/ruby-on-rails-error-superclass-mismatch-for-class-stringio-typeerror/70047278

daBee commented 2 years ago

Ya updated and shifted to various versions. Persists.

daBee commented 2 years ago

Well, that was a complete dead end.

Closed with no reply

Not a ruby issue apparently. Wasn't given any insight at all. Can we run with your file search above? It hung, both then and now. Tried this, still hung blank:

find /Users/rich/.rbenv/versions/2.7.4 -type f \( -perm +111 -o -name '*.so' -o -name '*.dylib' \)

tried sudo on original command:

>> 20:29:49 rich@HQ3 2.7.4 ➜ sudo find ~/.rbenv -type f \( -perm +111 -o -name '*.so' -o -name '*.dylib' \) -exec sh -c 'lipo -archs {} 2>/dev/null >/dev/null' \; -print | xargs -n1 lipo -infofind /Users/rich/.rbenv/versions/2.7.4 -type f  | bbedit
fatal error: /Library/Developer/CommandLineTools/usr/bin/lipo: unknown flag: -infofind
fatal error: /Library/Developer/CommandLineTools/usr/bin/lipo: unknown flag: -infofind
fatal error: /Library/Developer/CommandLineTools/usr/bin/lipo: unknown flag: -infofind
fatal error: /Library/Developer/CommandLineTools/usr/bin/lipo: unknown flag: -infofind
fatal error: /Library/Developer/CommandLineTools/usr/bin/lipo: unknown flag: -infofind
fatal error: /Library/Developer/CommandLineTools/usr/bin/lipo: unknown flag: -infofind
fatal error: /Library/Developer/CommandLineTools/usr/bin/lipo: unknown flag: -infofind
fatal error: /Library/Developer/CommandLineTools/usr/bin/lipo: unknown flag: -infofind
fatal error: /Library/Developer/CommandLineTools/usr/bin/lipo: unknown flag: -infofind
fatal error: /Library/Developer/CommandLineTools/usr/bin/lipo: unknown flag: -infofind
fatal error: /Library/Developer/CommandLineTools/usr/bin/lipo: unknown flag: -infofind
CamJN commented 2 years ago

Hmm, the lipo -infofind flag is definitely present for my version. Can you check the CLT version, I see you're using Monterey which I can't yet update to due to homebrew incompetence. Can you run pkgutil --pkg-info=com.apple.pkg.CLTools_Executables? I'm not 100% sure the package name remained the same for monterey as compared to big sur, but i'm sure we can figure this out.

daBee commented 2 years ago
>> 21:59:28 rich@HQ3 2.7.4 ➜ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 13.1.0.0.1.1633545042
volume: /
location: /
install-time: 1637640606
groups: com.apple.FindSystemFiles.pkg-group
CamJN commented 2 years ago

Ok so your dev tools are newer than mine. That's a bit difficult, but we can probably manage. Can you tell me what man lipo | pbcopy puts into your clipboard (just paste into the reply here)? There might be a new flag we can use.

daBee commented 2 years ago

Yes. I was told by brew doctor that I needed to update them. Sys Prefs:Software Update won't do that. softwareupdate was the way to go.

>> 1:28:12 rich@HQ3 2.7.4 ➜ man lipo | pbcopy
>> 1:28:13 rich@HQ3 2.7.4 ➜
CamJN commented 2 years ago

Sorry I didn't explain very well, the man lipo | pbcopy command puts the contents of the lipo man page in your clipboard, so it's already copied, and you can just paste it here. you don't copy the output from the terminal, as that overwrites the stuff that the command puts there.

daBee commented 2 years ago

OK wasn't sure where you were going with that. I also use Launchbar and the clipboard entries had nothing. Also piping to pbcopy sends bad text for some reason. Here it is.

LIPO(1)                                             General Commands Manual                                            LIPO(1)

NAME
       lipo - create or operate on universal files

SYNOPSIS
       lipo input_file command [option...]

DESCRIPTION
       The lipo tool creates or operates on ``universal'' (multi-architecture) files. Generally, lipo reads a single input
       file and writes to a single output file, although some commands and options accept multiple input files.  lipo will
       only ever write to a single output file, and input files are never modified in place.

       lipo supports a number of commands for creating universal files from single-architecture files, extracting single-
       architecture files from universal files, and displaying architecture information.  lipo can only perform one such
       command at a time, although some command flags may appear more than once. Some commands support additional options that
       can be used with that command. In addition, there are global options that are supported by multiple commands.

       The arch_type arguments may be any of the supported architecture names listed in the man page arch(3).

COMMANDS
       -archs Display only the architecture names present in a single input file. Each architecture name is a single word,
              making this option suitable for shell scripting. Unknown architectures will be represented by "unknown" along
              with the numeric CPU type and CPU subtype values as a single word.

       -create
              Create one universal output file from one or more input files. When input files specified on the command-line,
              all of the architectures in each file will be copied into the output file, whereas when input files are included
              using the global -arch option, only the specified architecture will be copied from that input file.  This
              command requires the -output option.

       -detailed_info
              Display a detailed list of the architecture types in the input universal file (all the the information in the
              universal header, for each architecture in the file).

       -extract arch_type [-extract arch_type...]
              Take one universal input file and copy the arch_type from that universal file into a universal output file
              containing only that architecture. This command requires the -output option.

       -extract_family arch_type [-extract_family arch_type...]
              Take one universal input file and copy all of the arch_types for the family that arch_type is in from that
              universal file into an output file containing only those architectures.  The file will be thin if only one
              architecture is found or universal otherwise. This command requires the -output option.

       -info  Display a brief description of each input file along with the names of each architecture type in that input
              file.

       -remove arch_type [-remove arch_type ...]
              Take one universal input file and remove the arch_type from that universal file, placing the result in the
              output file. This command requires the -output option.

       -replace arch_type file_name [-replace arch_type file_name...]
              Take one universal input file; in the output file, replace the arch_type contents of the input file with the
              contents of the specified file_name.  This command requires the -output option.

       -thin arch_type
              Take one input file and create a thin output file with the specified arch_type.  This command requires the
              -output option.

       -verify_arch arch_type ...
              Take one input file and verify the specified arch_types are present in the file.  If so then exit with a status
              of 0 else exit with a status of 1. Because more than one arch_type can be verified at once, all of the input
              files must appear before the -verify_arch flag on the command-line.

OPTIONS
       -arch arch_type input_file
              Tells lipo that input_file contains the specified architecture type.  The -arch arch_type specification is
              unnecessary if input_file is an object file, a universal file, or some other file whose architecture(s) lipo can
              figure out.

       -hideARM64
              When creating a universal binary including both 32-bit and 64-bit ARM files, this option will ask lipo to add
              the 64-bit files at the end and not include them in the count of architectures present in the file. The files
              must be executable files (Mach-O filetype MH_EXECUTE). This option has no effect if neither 32-bit ARM nor
              64-bit ARM files are present, and no other files may be hidden in this way. This option only works with the
              -create, -remove, and -replace, commands, and is only intended for tools and workflows testing a workaround on
              older systems.

       -output output_file
              Commands that create new files write to the output file specified by the -output flag. This option is required
              for the -create, -extract, -extract_family, -remove, -replace, and -thin commands.

       -segalign arch_type value
              Set the segment alignment of the specified arch_type when creating a universal file containing that
              architecture.  value is a hexadecimal number that must be an integral power of 2.  This is only needed when lipo
              can't figure out the alignment of an input file (currently not an object file), or when it guesses at the
              alignment too conservatively.  The default for files unknown to lipo is 0 (2^0, or an alignment of one byte),
              and the default alignment for archives is 4 (2^2, or 4-byte alignment).

SEE ALSO
       arch(3)

Apple Computer, Inc.                                    August 31, 2018                                                LIPO(1)
(END)
CamJN commented 2 years ago

oh hah, nevermind i noticed that your command above had extra stuff added at the end:

find ~/.rbenv -type f \( -perm +111 -o -name '*.so' -o -name '*.dylib' \) -exec sh -c 'lipo -archs {} 2>/dev/null >/dev/null' \; -print | xargs -n1 lipo -info is the command, and: find /Users/rich/.rbenv/versions/2.7.4 -type f | bbedit was added somehow.

Anyway, depending on how many ruby versions you have installed, and how many gems, that command can take a long time; as it finds every executable file, and library, and then checks the architectures (to filter out script files), and then prints the architectures for the non script files.

You can do a small test by running lipo -info ~/.rbenv/versions/2.7.4/bin/ruby, which should print something about being an arm executable, but the idea is to check for non arm libraries that might be loaded and cause issues.

daBee commented 2 years ago

OK, I can perform that if you like. I tried reducing the instructions to see if any results would pop back, but still nothing.

Here is the small test result:

>> 2:28:36 rich@HQ3 ~ ➜ lipo -info ~/.rbenv/versions/2.7.4/bin/ruby
Non-fat file: /Users/rich/.rbenv/versions/2.7.4/bin/ruby is architecture: arm64
daBee commented 2 years ago

Still performing that find. 4 versions of Ruby and it's still going.

rbjarnason commented 2 years ago

A partner notified us of this happening just when Docker was rebooted on Ruby 2.7.3 on phusion/passenger-ruby27:1.0.16, we then went into trying to upgrade and had to upgrade to Docker Passenger v.2.0.1 (and Ruby 2.7.4) due to the issue of that certificate issue with v1 and now have this same error on a clean Docker-based installation.

App 4332 output: Using /usr/local/rvm/gems/ruby-2.7.4
App 4332 output: /usr/local/rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/x86_64-linux/etc.so: warning: already initialized constant Etc::VERSION
App 4332 output: /usr/local/rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_AIO_LISTIO_MAX
App 4332 output: /usr/local/rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_AIO_MAX
.... lot more of those....
App 4332 output: /usr/local/rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/x86_64-linux/etc.so: warning: already initialized constant Etc::PC_SYNC_IO
App 4332 output: /usr/local/rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/x86_64-linux/etc.so: warning: already initialized constant Struct::Passwd
App 4332 output: /usr/local/rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/x86_64-linux/etc.so: warning: already initialized constant Struct::Group
App 4332 output: Error: The application encountered the following error: superclass mismatch for class StringIO (TypeError)
App 4332 output:     /home/app/oav_website/vendor/bundle/ruby/2.7.0/gems/psych-4.0.2/lib/psych/nodes/node.rb:2:in `require'
rbjarnason commented 2 years ago

Our app works fine on Ubuntu with rails s, only doing this under Passenger. Here is the Dockerfile https://github.com/CitizensFoundation/docker-open-active-voting/blob/oav-configuration-v-1/Dockerfile

CamJN commented 2 years ago

The warnings imply that you depend on the etc gem for your app, which is included in the default gems that come with ruby so if you have etc in your gemfile, removing it might remove those warnings.

As for the StringIO superclass mismatch, since it's happening with both rvm and rbenv and on both docker and macOS, I'm guessing that there's an issue with the psych gem, it wouldn't be the first time.

However it might be possible to work around it. What path do you have set as your passenger_ruby? the rbenv shim or the direct path to the ruby executable?

rbjarnason commented 2 years ago

passenger_ruby /usr/bin/ruby2.7; It's like that in the nginx.conf

No, we're not not using etc gem and it does not show up in Gemfile.lock which is here: https://github.com/CitizensFoundation/oav-configuration/blob/master/Gemfile.lock

We upgraded from psych 3.x to 4.x to try to fix this issue.

Everything works fine on Ubuntu using rails s both with psych 3.x and 4.x - this problem is only happening in our Passenger Docker setup.

We've been trying to fix this issue all day and we have been updating everything we can - not ready yet to go to Ruby 3.x though...

CamJN commented 2 years ago

Maybe change the passenger_ruby to /usr/local/rvm/wrappers/ruby-2.7.4/ruby, and see if that fixes the environment.

rbjarnason commented 2 years ago

Unfortunately, that did not work.

image

I then removed the psych gem but that results in the same psych error but now with the, I guess, built in version.

image

rbjarnason commented 2 years ago

So all of this has been working until a partner got in touch today saying that the app is causing an internal server error with "superclass mismatch for class StringIO" in the logs - they were not running docker build, just that the server (and docker image) got restarted and suddenly this error starts to happen. Like docker-passenger somehow autoupdated? Had been working for months. Until we started to upgrade today to try to fix this we was running under this docker image: phusion/passenger-ruby27:1.0.16

rbjarnason commented 2 years ago

Now we are running: FROM phusion/passenger-ruby27:2.0.1 but trying now again with just phusion/passenger-ruby27. Didn't make a difference still same error.

daBee commented 2 years ago
psych (4.0.2, default: 3.1.0)
ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [arm64-darwin21]
passenger: stable 6.0.12 (bottled), HEAD
##### passenger_files_comparator.rb #####
Suggested / current / suggested exists?:
load_module /opt/homebrew/opt/passenger/libexec/modules/ngx_http_passenger_module.so;
load_module /opt/homebrew/opt/passenger/libexec/modules/ngx_http_passenger_module.so;
true

passenger_root /opt/homebrew/opt/passenger/libexec/src/ruby_supportlib/phusion_passenger/locations.ini;
passenger_root /opt/homebrew/opt/passenger/libexec/src/ruby_supportlib/phusion_passenger/locations.ini;
true

passenger_ruby /usr/bin/ruby;
passenger_ruby /Users/rich/.rbenv/shims/ruby;           DIFFERENT
true

4 versions of Ruby (never used system), find command still working. Heh.

  2.7.2
  2.7.3
* 2.7.4 (set by /Users/rich/.ruby-version)
  3.0.2
rbjarnason commented 2 years ago

We're trying different things I've been downgrading the passenger gem step by step and testing the app in the docker setup. Now at 6.0.5, and then something interesting happened. The "superclass mismatch for class StringIO" is still there but all the warnings about already initialized constants disappeared.

Screenshot from 2021-11-25 17-42-13

image

Probably something unrelated to the superclass problem but all the warnings came back when we went down to version 6.0.4.

image

daBee commented 2 years ago

I just did a bundle doctor, and this came up. Not sure if it's significant:

The following gems are missing OS dependencies:
 * argon2: /usr/lib/libSystem.B.dylib
 * bcrypt: /usr/lib/libSystem.B.dylib
 * date: /usr/lib/libSystem.B.dylib
 * ffi: /usr/lib/libSystem.B.dylib
 * ffi: /usr/lib/libffi.dylib
 * json: /usr/lib/libSystem.B.dylib
 * libxml-ruby: /usr/lib/libSystem.B.dylib
 * libxml-ruby: /usr/lib/libxml2.2.dylib
 * murmurhash3: /usr/lib/libSystem.B.dylib
 * nokogiri: /usr/lib/libSystem.B.dylib
 * nokogiri: /usr/lib/liblzma.5.dylib
 * nokogiri: /usr/lib/libobjc.A.dylib
 * openssl: /usr/lib/libSystem.B.dylib
 * pg: /usr/lib/libSystem.B.dylib
 * racc: /usr/lib/libSystem.B.dylib
 * rmagick: /usr/lib/libSystem.B.dylib
 * stringio: /usr/lib/libSystem.B.dylib
 * unf_ext: /usr/lib/libSystem.B.dylib
 * unf_ext: /usr/lib/libc++.1.dylib
 * websocket-driver: /usr/lib/libSystem.B.dylib
CamJN commented 2 years ago

If libsystem is missing that is a big deal. Can you check that manually? It might be that apple finally moved to libsystem.C due to a compatibility break, or changed the path, in which case ruby and some gems might need to update their build scripts.

daBee commented 2 years ago

None of these exist:

ls: /usr/lib/libc++.1.dylib: No such file or directory
ls: /usr/lib/libffi.dylib: No such file or directory
ls: /usr/lib/liblzma.5.dylib: No such file or directory
ls: /usr/lib/libobjc.A.dylib: No such file or directory
ls: /usr/lib/libSystem.B.dylib: No such file or directory
ls: /usr/lib/libxml2.2.dylib: No such file or directory

Update: oops, let me redo this...

CamJN commented 2 years ago

Is the double lib prefix just a typo in your comment here?

daBee commented 2 years ago

BTW that original find has finished, with no results:

find ~/.rbenv -type f \( -perm +111 -o -name '*.so' -o -name '*.dylib' \) -exec sh -c 'lipo -archs {} 2>/dev/null >/dev/null' \; -print | xargs -n1 lipo -info

I'm going to remove two versions and try it again. I might have an alias conflict.

CamJN commented 2 years ago

Can you run lipo -archs ~/.rbenv/versions/2.7.4/bin/ruby? it's bizarre that nothing printed at all from the find command.

daBee commented 2 years ago

Ya like I said I might have some conflicts with some aliases I took out. I have an alias addiction that needs attention.

>> 15:32:54 rich@HQ3 ~ ➜ lipo -archs ~/.rbenv/versions/2.7.4/bin/ruby
arm64
rbjarnason commented 2 years ago

@CamJN We have created a minimal case to reproduce this with only rails, mysql2 & passenger gems in the Gemfile and are still hitting this crash with docker-passenger 2.0.1 on a fresh 20.04 Ubuntu installation. The apps are working fine running outside the passenger-docker environment.

All of our open-source digital democracy apps that use Rails and this setup are broken and a participatory budgeting project in Ireland has had to be postponed because of this problem and we're getting a bit desperate.

Can you check those core files and see if you see any problems?: https://github.com/CitizensFoundation/oav-configuration/blob/master/Gemfile https://github.com/CitizensFoundation/docker-open-active-voting/blob/oav-configuration-v-1/Dockerfile https://github.com/CitizensFoundation/docker-open-active-voting/blob/oav-configuration-v-1/nginx.conf

Here is a (5 minutes) installation guide for one of our apps on a fresh Ubuntu 20.04 installation that replicates this crash: https://docs.google.com/document/d/1vAOLv6uY-S5QbMiPv6iu6mtiQeSjMWo-EKiUEiw-LNA/edit#heading=h.bs6ews97qim5

rbjarnason commented 2 years ago

We're back in business! After downgrading to Ruby 2.6.8 and phusion/passenger-ruby26 it is working again! It looks like only the phusion/passenger-ruby27 image is broken.

But the other strange thing is still the 50-60 warnings that come like this: image

CamJN commented 2 years ago

I'm glad you're up and running again, and thanks for the reproduction setup i'll look into this to see what i can find out on my end.

daBee commented 2 years ago

What does that translate to using homebrew? I'd like to be functional this weekend after two weeks dead stop.

CamJN commented 2 years ago

@rbjarnason You can reduce the warnings a LOT by running gem uninstall etc to remove the extra etc gem. According to this: app gem update is how the extra etc gem gets installed.

CamJN commented 2 years ago

@rbjarnason

/home/app/oav_website/config/application.rb:8 OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE you're the one causing the redefinition of OpenSSL::SSL::VERIFY_PEER.

CamJN commented 2 years ago

@daBee looking back, it looks like you've also got gems installed both by the ruby version itself, and by rubygems.

/Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/fileutils.rb:1284: warning: already initialized constant FileUtils::Entry_::S_IF_DOOR
/Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/fileutils-1.6.0/lib/fileutils.rb:1269: warning: previous definition of S_IF_DOOR was here

So perhaps by clearing out the versions installed by rubygems, you can get things running?

rbjarnason commented 2 years ago

@CamJN Thanks for the pointers and help. And not to forget thanks for the excellent Passenger package that has served us and our partners well for close to a decade in digital democracy projects around the world! :) We were planning to wait on the Ruby upgrade until v. 3.1 so will keep an eye on this ticket regarding getting 2.7 working again - let me know if you have any questions in terms of replicating the problem.

daBee commented 2 years ago

@CamJN OK, tried gem uninstall -aIx then bundle install and same issue. I'm thinking rbenv installed openssl but bundle installed sinatra. Worked before for years.

Note: I have several subdomains on my dev box. so rbenv is used to manage realms of gems.

superclass mismatch for class StringIO (TypeError)
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/openssl/config.rb:14:in `require'
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/openssl/config.rb:14:in `<top (required)>'
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/openssl.rb:18:in `require'
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/openssl.rb:18:in `<top (required)>'
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/session/cookie.rb:3:in `require'
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/session/cookie.rb:3:in `<top (required)>'
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1809:in `require'
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1809:in `<class:Base>'
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:909:in `<module:Sinatra>'
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:22:in `<top (required)>'
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra/main.rb:26:in `require'
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra/main.rb:26:in `<module:Sinatra>'
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra/main.rb:1:in `<top (required)>'
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra.rb:1:in `require'
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/sinatra-2.1.0/lib/sinatra.rb:1:in `<top (required)>'
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:60:in `require'
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:60:in `block (2 levels) in require'
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:55:in `each'
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:55:in `block in require'
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:44:in `each'
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:44:in `require'
  /Users/rich/.rbenv/versions/2.7.4/lib/ruby/site_ruby/2.7.0/bundler.rb:175:in `require'
  /Users/rich/Sites/HQ/app.rb:4:in `<top (required)>'
daBee commented 2 years ago

Ok this is officially really bothering me. Why would a Passenger instance show this error while zsh instances not throw errors using the same 4 versions of ruby? If it's a language problem, it would show up.

Bundler.require is the culprit, even with two gems. I'm going to make a minimal site as requested elsewhere by someone. I gotta get onto docker. None of my other vhosts work. I'm shut down.

CamJN commented 2 years ago

@FooBarWidget any thoughts? This is pretty weird.

daBee commented 2 years ago

StringIO is apparently the culprit, with the StringIO default 0.1.0 and StringIO 3.0.1 versions dancing together somehow. Just thought I'd put this here. See #5108 above. StringIO had an update late just over a month ago.

daBee commented 2 years ago

I'm going to close this as @CamJN knows about our discussion in rubygems/rubygems#5108