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

Asset serving from Webrick causes mutex error #18822

Closed
richardnuno opened this issue Feb 5, 2015 · 12 comments
Closed

Asset serving from Webrick causes mutex error #18822

richardnuno opened this issue Feb 5, 2015 · 12 comments

Comments

@richardnuno
Copy link

We're seeing a issue related to asset serving with Webrick that is causing the server to lock up.
These errors were intermittent and hard to reproduce but this test application tries to do that.

When refreshing the root page repeatedly the following error appears in the server log (you might have to hold refresh hotkeys for a few seconds):

ERROR Errno::ECONNRESET: Connection reset by peer @ io_fillbuf - fd:16

or

ERROR Errno::EPROTOTYPE: Protocol wrong type for socket

When shutting down the server the follow error is displayed:

Internal Server Error

Attempt to unlock a mutex which is not locked

Removing the requires from application.js seemed to make the Errno errors disappear.

@richardnuno
Copy link
Author

Forgot to mention, ruby version is 2.2.0 and rails version is 4.2.0

@sivsushruth
Copy link
Contributor

@richardnuno I tried to reproduce the bug with ruby 2.1.0 and rails 4.2.0 several times, but in vein.

@TiuTalk
Copy link

TiuTalk commented Feb 14, 2015

@richardnuno Can you please provide a sample application that reproduces the issue?

@kamui
Copy link

kamui commented Feb 18, 2015

@TiuTalk The sample app is here: https://github.com/bonobos/asset_mutex_bug

I can reproduce the issue on my MacBook Pro running 10.10 with ruby 2.2.0.

@binyamindavid
Copy link

Having the same problem.

Completed 200 OK in 102ms (Views: 101.1ms | ActiveRecord: 0.0ms)
[2015-02-23 19:58:50] ERROR Errno::ECONNRESET: Connection reset by peer @ io_fillbuf - fd:16
    /Users/benjaminsigidi/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:80:in `eof?'
    /Users/benjaminsigidi/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:80:in `run'
    /Users/benjaminsigidi/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'

@danieldocki
Copy link

Same here
Ruby 2.1.2
Rails 4.0.12

11:28:10 web.1  | [2015-03-04 11:28:10] ERROR Errno::ECONNRESET: Connection reset by peer @ io_fillbuf - fd:16
11:28:10 web.1  |   /Users/danieldocki/.rbenv/versions/2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:80:in `eof?'
11:28:10 web.1  |   /Users/danieldocki/.rbenv/versions/2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:80:in `run'
11:28:10 web.1  |   /Users/danieldocki/.rbenv/versions/2.1.2/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'

@arthurnn
Copy link
Member

arthurnn commented Mar 4, 2015

This seems like to be a bug on Webrick and not on Rails TBH.

@ossrapaport-zz
Copy link

It's a Webrick bug, switch to Thin and it goes away.

@rails-bot
Copy link

This issue has been automatically marked as stale because it has not been commented on for at least
three months.

The resources of the Rails team are limited, and so we are asking for your help.

If you can still reproduce this error on the 4-2-stable, 4-1-stable branches or on master,
please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions.

@arthurnn
Copy link
Member

This belongs to Webrick as far as I can tell.

@TonyShuangYuan
Copy link

I also encounter this issue in Rails 4.2.6, Some times chrome hold refresh hotkeys for several minutes .After i hit keys in rails console(my rails runs as develop mode) the console display :"ERROR Errno::ECONNRESET: An existing connection was forcibly closed by the remote host..."

@ioquatix
Copy link
Contributor

The EPROTOTYPE issue is a bug with the macOS kernel. More details can be found here: https://bugs.ruby-lang.org/issues/14713

@rails-bot rails-bot bot removed the stale label Apr 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests