ThreadError: deadlock; recursive locking
Closed this issue · 15 comments
0.3.5 is throwing these errors all over the place. Not happening with 0.3.4
Can I have some more details on your configuration and use?
I'm using it in a Rails 3.2 app with with POW.
As noted in this issue, basecamp/pow#191 the error can be caused if rack modules are not properly calling close.
I've modified the middleware to dup itself before running. This may fix the issue. Try the latest git HEAD.
The latest git HEAD did not solve this for me.
What version of Rack is everyone pulling in to their projects?
Also, I've tried one more change. It's in the fix-deadlocks-maybe
branch. If that doesn't do it, I'm out of ideas.
New error using the fix-deadlocks-maybe branch and rack 1.3.6:
ERROR ThreadError: Attempt to unlock a mutex which is not locked
stacktrace ....
livereload.rb:95:in `_call'
What is in your middleware stack?
use Airbrake::UserInformer
use ActionDispatch::Static
use Rack::LiveReload
use Rack::Lock
use #ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x6d9cc008
use Rack::Runtime
use Rack::MethodOverride
use Rails::Rack::Logger
use ActionDispatch::ShowExceptions
use ActionDispatch::RemoteIp
use Rack::Sendfile
use ActionDispatch::Reloader
use ActionDispatch::Callbacks
use ActiveRecord::ConnectionAdapters::ConnectionManagement
use ActiveRecord::QueryCache
use ActionDispatch::Cookies
use ActionDispatch::Session::CookieStore
use ActionDispatch::Flash
use ActionDispatch::ParamsParser
use ActionDispatch::Head
use Rack::ConditionalGet
use Rack::ETag
use ActionDispatch::BestStandardsSupport
use Warden::Manager
use Sass::Plugin::Rack
use Airbrake::Rack
use Bullet::Rack
run InterferenceApp::Application.routes
I actually get two errors on each request:
first:
ERROR ThreadError: Attempt to unlock a mutex which is locked by another thread at line 95
second
ERROR ThreadError: Attempt to unlock a mutex which is not locked
OK I've tried one more change I can think of on the new branch.
Fixed it for me. Awesome. ❤️
phew Good. :) Once @aaronchi writes back with his results, I'll push a new version. Thanks for your patience. :)
yep. seems to be ok now :)
Sweet, new release coming up! Thanks, everyone.