eval / rack-pjax

pjax for rails and rack applications
http://rack-pjax.herokuapp.com/
MIT License
205 stars 65 forks source link

Deadlock in Rails 3.1 #2

Closed dpmccabe closed 13 years ago

dpmccabe commented 13 years ago

I had rack-pjax working in a Rails 3.0.7, but upon updating to Rails 3.1.1, I'm getting a deadlock error from Rack every few requests:

[2011-11-02 11:36:45] ERROR ThreadError: deadlock; recursive locking
    /Users/Devin/.rvm/gems/ruby-1.9.2-p180@rails31/gems/rack-1.3.5/lib/rack/lock.rb:14:in `lock'
    /Users/Devin/.rvm/gems/ruby-1.9.2-p180@rails31/gems/rack-1.3.5/lib/rack/lock.rb:14:in `call'
    /Users/Devin/.rvm/gems/ruby-1.9.2-p180@rails31/gems/actionpack-3.1.1/lib/action_dispatch/middleware/static.rb:53:in `call'
    /Users/Devin/.rvm/gems/ruby-1.9.2-p180@rails31/gems/railties-3.1.1/lib/rails/engine.rb:456:in `call'
    /Users/Devin/.rvm/gems/ruby-1.9.2-p180@rails31/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
    /Users/Devin/.rvm/gems/ruby-1.9.2-p180@rails31/bundler/gems/rack-pjax-4256ddc68de6/lib/rack/pjax.rb:12:in `call'
    /Users/Devin/.rvm/gems/ruby-1.9.2-p180@rails31/gems/railties-3.1.1/lib/rails/rack/content_length.rb:16:in `call'
    /Users/Devin/.rvm/gems/ruby-1.9.2-p180@rails31/gems/railties-3.1.1/lib/rails/rack/log_tailer.rb:14:in `call'
    /Users/Devin/.rvm/gems/ruby-1.9.2-p180@rails31/gems/rack-1.3.5/lib/rack/handler/webrick.rb:59:in `service'
    /Users/Devin/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
    /Users/Devin/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
    /Users/Devin/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
^C[2011-11-02 11:36:52] INFO  going to shutdown ...
eval commented 13 years ago

(commit triggered the close) I wasn't able to reproduce the issue, but replacing the body and not closing the old body possibly caused the error. Can you test the 0.5.3 version? If the error persists, can you list what other middleware you use? Thanks!

dpmccabe commented 13 years ago

This seems to be fixed. I was never able to get the error to occur every request, but I haven't gotten it since applying 0.5.3. Thanks for the quick turnaround.