rails: Deadlock between ParamsWrapper#model and Loadable#require_or_load
Steps to reproduce
- Create a Rails 5.1.2 app with Postgres DB (pg 0.20), puma server (puma 3.9.1, 5 threads).
- Add some models and RESTful controllers. Keep default
wrap_parameters format: [:json]
. - Make a large number (e.g., 5) of simultaneous GET requests to the controllers with
Accept: application/json
andContent-Type: application/json; charset=utf-8
headers.
Expected behavior
Requests succeed.
Actual behavior
Requests cause a hangup almost consistently. Further investigation with ActionDispatch::DebugLocks
shows threads end up deadlocked.
System configuration
Rails version: 5.1.2
Ruby version: 2.4.1
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (1 by maintainers)
Reopened this since we never got a chance to look into it. I will take a look and try to repro it.