This project is archived and is in readonly mode.
config.cache_classes = false is broken in 2.3.4 and 2.3.5
Reported by Jarl Friis | May 10th, 2010 @ 09:54 AM | in 2.3.6
Even the most basic application is broken in 2.3.4 and 2.3.5 in
development environment (where config.cache_classes =
false
)
Here are steps to reproduce. notice it is on the second request (not the first one) it fails:
$ rails newproject
create
create app/controllers
create app/helpers
create app/models
create app/views/layouts
create config/environments
create config/initializers
create config/locales
create db
create doc
create lib
create lib/tasks
create log
create public/images
create public/javascripts
create public/stylesheets
create script/performance
create test/fixtures
create test/functional
create test/integration
create test/performance
create test/unit
create vendor
create vendor/plugins
create tmp/sessions
create tmp/sockets
create tmp/cache
create tmp/pids
create Rakefile
create README
create app/controllers/application_controller.rb
create app/helpers/application_helper.rb
create config/database.yml
create config/routes.rb
create config/locales/en.yml
create db/seeds.rb
create config/initializers/backtrace_silencers.rb
create config/initializers/inflections.rb
create config/initializers/mime_types.rb
create config/initializers/new_rails_defaults.rb
create config/initializers/session_store.rb
create config/environment.rb
create config/boot.rb
create config/environments/production.rb
create config/environments/development.rb
create config/environments/test.rb
create script/about
create script/console
create script/dbconsole
create script/destroy
create script/generate
create script/runner
create script/server
create script/plugin
create script/performance/benchmarker
create script/performance/profiler
create test/test_helper.rb
create test/performance/browsing_test.rb
create public/404.html
create public/422.html
create public/500.html
create public/index.html
create public/favicon.ico
create public/robots.txt
create public/images/rails.png
create public/javascripts/prototype.js
create public/javascripts/effects.js
create public/javascripts/dragdrop.js
create public/javascripts/controls.js
create public/javascripts/application.js
create doc/README_FOR_APP
create log/server.log
create log/production.log
create log/development.log
create log/test.log
$ cd newproject/
/home/jarl/tmp/newproject
$ ./script/about
About your application's environment
Ruby version 1.8.7 (x86_64-linux)
RubyGems version 1.3.5
Rack version 1.0
Rails version 2.3.5
Active Record version 2.3.5
Active Resource version 2.3.5
Action Mailer version 2.3.5
Active Support version 2.3.5
Application root /home/jarl/tmp/newproject
Environment development
Database adapter sqlite3
Database schema version 0
$ ./script/generate scaffold test
exists app/models/
exists app/controllers/
exists app/helpers/
create app/views/tests
exists app/views/layouts/
exists test/functional/
exists test/unit/
create test/unit/helpers/
exists public/stylesheets/
create app/views/tests/index.html.erb
create app/views/tests/show.html.erb
create app/views/tests/new.html.erb
create app/views/tests/edit.html.erb
create app/views/layouts/tests.html.erb
create public/stylesheets/scaffold.css
create app/controllers/tests_controller.rb
create test/functional/tests_controller_test.rb
create app/helpers/tests_helper.rb
create test/unit/helpers/tests_helper_test.rb
route map.resources :tests
dependency model
exists app/models/
exists test/unit/
exists test/fixtures/
create app/models/test.rb
create test/unit/test_test.rb
create test/fixtures/tests.yml
create db/migrate
create db/migrate/20100510080045_create_tests.rb
$ grep 'cache' config/environments/development.rb
config.cache_classes = false
$ ./script/console
Loading development environment (Rails 2.3.5)
>> app.get '/tests/'
=> 500
>> app.get '/tests/'
ThreadError: thread 0x7f9dc864b370 tried to join itself
from /var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/reloader.rb:31:in `lock'
from /var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/reloader.rb:31:in `run'
from /var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:108:in `call'
from /var/lib/gems/1.8/gems/rack-1.0.1/lib/rack/lint.rb:47:in `_call'
from /var/lib/gems/1.8/gems/rack-1.0.1/lib/rack/lint.rb:35:in `call'
from /var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/integration.rb:316:in `process'
from /var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/integration.rb:197:in `get'
from (irb):2
I have verified that this also fails in 2.3.4, but everything is fine in 2.3.3
Jarl
Comments and changes to this ticket
-
Michael Koziarski May 10th, 2010 @ 10:27 AM
- Milestone set to 2.3.6
- Tag changed from cache_classes, thread to bugmash, cache_classes, thread
- State changed from new to verified
- Title changed from config.cache_classes = false is broken in 2.3.4 and 2.3.5 to Integration Test runner doesn't call #close on the response body
The issue here is that the integration test runner doesn't call close on the body, thereby leaving the reloader mutex locked.
-
Jarl Friis May 10th, 2010 @ 10:29 AM
- Tag changed from bugmash, cache_classes, thread to cache_classes, thread
- Title changed from Integration Test runner doesn't call #close on the response body to config.cache_classes = false is broken in 2.3.4 and 2.3.5
Ticket #3153 may be related to this ticket.
-
Jarl Friis May 10th, 2010 @ 10:34 AM
- Tag changed from cache_classes, thread to bugmash, cache_classes, thread
Oops I didn't intend to change neither title nor tags, it must have been because I updated a not-updated ticket. I don't know how to change the title back again.
-
Neeraj Singh May 10th, 2010 @ 11:54 AM
- Tag changed from bugmash, cache_classes, thread to bugmash, cache_classes, patch, thread
Attached is code patch.
Providing a test for the patch is really difficult because all the existing integration_test mock the actual call.
-
Rizwan Reza May 16th, 2010 @ 02:33 AM
- Tag changed from bugmash, cache_classes, patch, thread to bugmash-review, cache_classes, patch, thread
-
Rizwan Reza May 16th, 2010 @ 02:36 AM
+1 verified
The patch seems to be a simple and applies cleanly. All tests pass.
-
Rizwan Reza May 16th, 2010 @ 02:41 AM
- Tag changed from bugmash-review, cache_classes, patch, thread to bugmash, bugmash-review, cache_classes, patch, thread
-
Repository May 16th, 2010 @ 09:45 AM
- State changed from verified to resolved
(from [3570f3e7f692e1d43e6be4d65bc6de986748cab8]) Fix broken integration test in 2.x [#4565 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/3570f3e7f692e1d43e6be4d65bc6de... -
Rizwan Reza May 16th, 2010 @ 03:07 PM
- Tag changed from bugmash, bugmash-review, cache_classes, patch, thread to bugmash, cache_classes, patch, thread
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 4565 config.cache_classes = false is broken in 2.3.4 and 2.3.5 (from [3570f3e7f692e1d43e6be4d65bc6de986748cab8]) Fix bro...