Hello guys,
recently we started to get NoMethodError (undefined method 'eof?' for PhusionPassenger::Utils::TeeInput error after we upgraded several gems:
puma (3.10.0)
puma (3.12.0)
rack-contrib (1.2.0)
rack-contrib (2.0.1)
rack-mini-profiler (0.9.2)
rack-mini-profiler (1.0.0)
rack-ssl-enforcer (0.2.8)
rack-ssl-enforcer (0.2.9)
remotipart (1.3.1)
remotipart (1.4.2)
rest-client (1.6.7)
rest-client (2.0.2)
The error backtrace is:
rack (2.0.6) lib/rack/multipart.rb:52:in `extract_multipart'
rack (2.0.6) lib/rack/request.rb:472:in `parse_multipart'
rack (2.0.6) lib/rack/request.rb:335:in `POST'
rack (2.0.6) lib/rack/request.rb:358:in `params'
rack (2.0.6) lib/rack/request.rb:22:in `params'
remotipart (1.4.2) lib/remotipart/middleware.rb:13:in `call'
newrelic_rpm (5.3.0.346) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
rack (2.0.6) lib/rack/etag.rb:25:in `call'
newrelic_rpm (5.3.0.346) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
rack (2.0.6) lib/rack/conditional_get.rb:25:in `call'
newrelic_rpm (5.3.0.346) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
rack (2.0.6) lib/rack/head.rb:12:in `call'
newrelic_rpm (5.3.0.346) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
rack (2.0.6) lib/rack/session/abstract/id.rb:232:in `context'
rack (2.0.6) lib/rack/session/abstract/id.rb:226:in `call'
newrelic_rpm (5.3.0.346) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
actionpack (5.1.2) lib/action_dispatch/middleware/cookies.rb:613:in `call'
newrelic_rpm (5.3.0.346) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
actionpack (5.1.2) lib/action_dispatch/middleware/callbacks.rb:26:in `block in call'
activesupport (5.1.2) lib/active_support/callbacks.rb:97:in `run_callbacks'
actionpack (5.1.2) lib/action_dispatch/middleware/callbacks.rb:24:in `call'
newrelic_rpm (5.3.0.346) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
airbrake (7.3.4) lib/airbrake/rack/middleware.rb:48:in `call'
newrelic_rpm (5.3.0.346) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
actionpack (5.1.2) lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call'
newrelic_rpm (5.3.0.346) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
actionpack (5.1.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
newrelic_rpm (5.3.0.346) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
railties (5.1.2) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.1.2) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (5.1.2) lib/active_support/tagged_logging.rb:69:in `block in tagged'
activesupport (5.1.2) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.1.2) lib/active_support/tagged_logging.rb:69:in `tagged'
railties (5.1.2) lib/rails/rack/logger.rb:24:in `call'
newrelic_rpm (5.3.0.346) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
actionpack (5.1.2) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
newrelic_rpm (5.3.0.346) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
request_store (1.4.1) lib/request_store/middleware.rb:19:in `call'
newrelic_rpm (5.3.0.346) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
actionpack (5.1.2) lib/action_dispatch/middleware/request_id.rb:25:in `call'
newrelic_rpm (5.3.0.346) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
rack (2.0.6) lib/rack/method_override.rb:22:in `call'
newrelic_rpm (5.3.0.346) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
rack (2.0.6) lib/rack/runtime.rb:22:in `call'
newrelic_rpm (5.3.0.346) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
actionpack (5.1.2) lib/action_dispatch/middleware/executor.rb:12:in `call'
newrelic_rpm (5.3.0.346) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
rack (2.0.6) lib/rack/sendfile.rb:111:in `call'
newrelic_rpm (5.3.0.346) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
actionpack (5.1.2) lib/action_dispatch/middleware/ssl.rb:66:in `call'
newrelic_rpm (5.3.0.346) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
rack-cors (1.0.2) lib/rack/cors.rb:97:in `call'
newrelic_rpm (5.3.0.346) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
railties (5.1.2) lib/rails/engine.rb:522:in `call'
newrelic_rpm (5.3.0.346) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:97:in `process_request'
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:152:in `accept_and_process_next_request'
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:113:in `main_loop'
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:416:in `block (3 levels) in start_threads'
/usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'
we are using apache2
Server version: Apache/2.4.7 (Ubuntu)
Server built: Mar 10 2015 13:05:59
and Phusion Passenger 5.1.11
This error happens when the user is being redirected to the folder page after they uploaded a file.
Is this error related to this gem or to the other gem like remotipart?
Is it phusion passenger error?
I installed the master version of rack for my app and the issue seems to be gone now:
# Gemfile
gem 'rack', github: 'rack/rack'
@Hirurg103 thanks for pointing this out, spent almost 4hrs straight trying to debug this. Seems to affect Passenger. Its easily reproducible locally running standalone passenger.
Confirmed master version of rack does fix this.
Hi @nukturnal ,
we upgraded to Apache 2.4.7 and passenger 5.3.7 and the bug is still reproducible with rack 2.0.6
@nukturnal Downgrading rack to 2.0.1 fixed this issue for me
Actually I was wrong - this bug is not reproducible with apache 2.4.7 and rack 2.0.6
Hello @nukturnal , could you provide us with the versions of apache/passenger, rack (and other gems which might affect this issue, like remotipart, rack-cors, actionpack?) on which you were able to reproduce this issue?
Thank you!
Hello @Hirurg103, I run passenger start version 6.0.1 locally and it reproduced it as in prod. rack version was 2.0.6
Full Gemfile.lock attached Gemfile.lock.txt
I can confirm this error on Redmine (master) running on Ubuntu 14.04 & Passenger behind Apache:
libapache2-mod-passenger/trusty,now 1:6.0.1-1~trusty1 amd64 [installed]
passenger/trusty,now 1:6.0.1-1~trusty1 amd64 [installed,automatic]
apache2/trusty-updates,now 2.4.7-1ubuntu4.21 amd64 [installed]
We started to experience this error when our Intranet users updated to Chrome 72 (not sure why, but correlation is strong :).
Updating the app to master branch of rack resolved the issue for us.
@cernyjakub is absolutely right: The error indeed happens only when wiki pages are changed or created with Chrome 72, but not for changes created by Firefox 65 from the same machine.
I would like to let you know, that this error has ceased to exist for me. I haven't updated anything on the server, but I have seen, that a new Chrome 72 has been installed by apt. So maybe @cernyjakub, the error has gone for you as well ...
This is fixed in master but still unreleased, see also https://github.com/rack/rack/pull/1201
Passenger in the mean time has been updated to deal with this bug, see https://github.com/phusion/passenger/issues/2150
and the commit where it deals with this rack bug https://github.com/phusion/passenger/commit/9464a70886dd66895baf1f035f4537fea03b6968
So this issue can be fixed by:
Seems to be fixed in 2.0.7 that was released 2 days ago :+1:
Most helpful comment
We started to experience this error when our Intranet users updated to Chrome 72 (not sure why, but correlation is strong :).
Updating the app to master branch of rack resolved the issue for us.