Chad Moone
2013-Apr-24 03:40 UTC
ActiveRecord Warnings and Live Stream Failure/Error on Dev Box
I''ve recently been trying to contribute, and I''ve set up the dev box<https://github.com/rails/rails-dev-box>environment per these instructions<http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#the-easy-way>. Could anyone could help point me in the right direction here? When I run tests on the dev box, I see a lot of warnings in ActiveRecord (mostly in the PostgreSQL suite): /vagrant/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:554: warning: instance variable @socket_io not initialized Yet, when I look at that file<https://github.com/rails/rails/blob/master/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L554>, there is no instance of a variable named @socket_io there (or in the whole project). Is this an issue with the pg gem, or did I miss something in the setup? Also, in the Live Stream suite, I get both a failure and an error: 1) Failure: ActionController::LiveStreamTest#test_exception_callback [/vagrant/rails/actionpack/test/controller/live_stream_test.rb:185]: Expected /An\ exception\ occurred\.\.\./ to match "Processing by ActionController::LiveStreamTest::TestController#exception_with_callback as \nCompleted 500 Internal Server Error in 0ms\n". 2) Error: ActionController::LiveStreamTest#test_render_text: #<Class:0x89f23a8>: No live threads left. Deadlock? /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:72:in `sleep'' /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:72:in `block (2 levels) in wait'' /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:68:in `handle_interrupt'' /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:68:in `block in wait'' /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:66:in `handle_interrupt'' /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:66:in `wait'' /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:196:in `block (2 levels) in pop'' /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:188:in `synchronize'' /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:188:in `block in pop'' /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:187:in `handle_interrupt'' /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:187:in `pop'' /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:335:in `pop'' /vagrant/rails/actionpack/lib/action_controller/metal/live.rb:51:in `each'' /vagrant/rails/actionpack/lib/action_dispatch/http/response.rb:42:in `each'' /vagrant/rails/actionpack/lib/action_dispatch/http/response.rb:188:in `body'' /vagrant/rails/actionpack/test/controller/live_stream_test.rb:159:in `test_render_text'' 4230 tests, 17697 assertions, 1 failures, 1 errors, 0 skips I see, however, that the tests are all green on Travis. Is this to be expected, or am I doing something wrong? Thanks, Chad -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Godfrey Chan
2013-Apr-25 22:22 UTC
Re: ActiveRecord Warnings and Live Stream Failure/Error on Dev Box
+1, just bumped into the same problem. On Tuesday, 23 April 2013 20:40:27 UTC-7, Chad Moone wrote:> > I''ve recently been trying to contribute, and I''ve set up the dev box<https://github.com/rails/rails-dev-box>environment per these > instructions<http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#the-easy-way>. > Could anyone could help point me in the right direction here? > > When I run tests on the dev box, I see a lot of warnings in ActiveRecord > (mostly in the PostgreSQL suite): > > /vagrant/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:554: > warning: instance variable @socket_io not initialized > > > Yet, when I look at that file<https://github.com/rails/rails/blob/master/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L554>, > there is no instance of a variable named @socket_io there (or in the whole > project). Is this an issue with the pg gem, or did I miss something in > the setup? > > Also, in the Live Stream suite, I get both a failure and an error: > > 1) Failure: > ActionController::LiveStreamTest#test_exception_callback > [/vagrant/rails/actionpack/test/controller/live_stream_test.rb:185]: > Expected /An\ exception\ occurred\.\.\./ to match "Processing by > ActionController::LiveStreamTest::TestController#exception_with_callback as > \nCompleted 500 Internal Server Error in 0ms\n". > > 2) Error: > ActionController::LiveStreamTest#test_render_text: > #<Class:0x89f23a8>: No live threads left. Deadlock? > /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:72:in > `sleep'' > /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:72:in > `block (2 levels) in wait'' > /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:68:in > `handle_interrupt'' > /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:68:in > `block in wait'' > /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:66:in > `handle_interrupt'' > /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:66:in > `wait'' > > /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:196:in > `block (2 levels) in pop'' > > /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:188:in > `synchronize'' > > /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:188:in > `block in pop'' > > /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:187:in > `handle_interrupt'' > > /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:187:in > `pop'' > > /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:335:in > `pop'' > /vagrant/rails/actionpack/lib/action_controller/metal/live.rb:51:in > `each'' > /vagrant/rails/actionpack/lib/action_dispatch/http/response.rb:42:in > `each'' > /vagrant/rails/actionpack/lib/action_dispatch/http/response.rb:188:in > `body'' > /vagrant/rails/actionpack/test/controller/live_stream_test.rb:159:in > `test_render_text'' > > 4230 tests, 17697 assertions, 1 failures, 1 errors, 0 skips > > > I see, however, that the tests are all green on Travis. > > Is this to be expected, or am I doing something wrong? > > Thanks, > Chad >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Godfrey Chan
2013-Apr-25 22:43 UTC
Re: ActiveRecord Warnings and Live Stream Failure/Error on Dev Box
Upon further investigation it''s most likely coming from here<https://bitbucket.org/ged/ruby-pg/src/de1cdb0f7ba625ad7cec02bb871ae8fdf7de68c8/ext/pg_connection.c?at=default#cl-55>. It''s probably a bug in the pg gem itself, but it could also be that we are using it incorrectly. On Thursday, 25 April 2013 15:22:09 UTC-7, Godfrey Chan wrote:> > +1, just bumped into the same problem. > > On Tuesday, 23 April 2013 20:40:27 UTC-7, Chad Moone wrote: >> >> I''ve recently been trying to contribute, and I''ve set up the dev box<https://github.com/rails/rails-dev-box>environment per these >> instructions<http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#the-easy-way>. >> Could anyone could help point me in the right direction here? >> >> When I run tests on the dev box, I see a lot of warnings in ActiveRecord >> (mostly in the PostgreSQL suite): >> >> /vagrant/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:554: >> warning: instance variable @socket_io not initialized >> >> >> Yet, when I look at that file<https://github.com/rails/rails/blob/master/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L554>, >> there is no instance of a variable named @socket_io there (or in the whole >> project). Is this an issue with the pg gem, or did I miss something in >> the setup? >> >> Also, in the Live Stream suite, I get both a failure and an error: >> >> 1) Failure: >> ActionController::LiveStreamTest#test_exception_callback >> [/vagrant/rails/actionpack/test/controller/live_stream_test.rb:185]: >> Expected /An\ exception\ occurred\.\.\./ to match "Processing by >> ActionController::LiveStreamTest::TestController#exception_with_callback as >> \nCompleted 500 Internal Server Error in 0ms\n". >> >> 2) Error: >> ActionController::LiveStreamTest#test_render_text: >> #<Class:0x89f23a8>: No live threads left. Deadlock? >> >> /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:72:in >> `sleep'' >> >> /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:72:in >> `block (2 levels) in wait'' >> >> /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:68:in >> `handle_interrupt'' >> >> /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:68:in >> `block in wait'' >> >> /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:66:in >> `handle_interrupt'' >> >> /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:66:in >> `wait'' >> >> /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:196:in >> `block (2 levels) in pop'' >> >> /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:188:in >> `synchronize'' >> >> /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:188:in >> `block in pop'' >> >> /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:187:in >> `handle_interrupt'' >> >> /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:187:in >> `pop'' >> >> /home/vagrant/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/thread.rb:335:in >> `pop'' >> /vagrant/rails/actionpack/lib/action_controller/metal/live.rb:51:in >> `each'' >> /vagrant/rails/actionpack/lib/action_dispatch/http/response.rb:42:in >> `each'' >> /vagrant/rails/actionpack/lib/action_dispatch/http/response.rb:188:in >> `body'' >> /vagrant/rails/actionpack/test/controller/live_stream_test.rb:159:in >> `test_render_text'' >> >> 4230 tests, 17697 assertions, 1 failures, 1 errors, 0 skips >> >> >> I see, however, that the tests are all green on Travis. >> >> Is this to be expected, or am I doing something wrong? >> >> Thanks, >> Chad >> >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Gaurish Sharma
2013-May-13 17:38 UTC
Re: ActiveRecord Warnings and Live Stream Failure/Error on Dev Box
Replies inline: On Wednesday, April 24, 2013 9:10:27 AM UTC+5:30, Chad Moone wrote: Also, in the Live Stream suite, I get both a failure and an error: 1) Failure: ActionController::LiveStreamTest#test_exception_callback [/vagrant/rails/actionpack/test/controller/live_stream_test.rb:185]: Expected /An\ exception\ occurred\.\.\./ to match "Processing by ActionController::LiveStreamTest::TestController#exception_with_callback as \nCompleted 500 Internal Server Error in 0ms\n". 2) Error: ActionController::LiveStreamTest#test_render_text: #<Class:0x89f23a8>: No live threads left. Deadlock? 4230 tests, 17697 assertions, 1 failures, 1 errors, 0 skips <-------------------> I get the same error on my Ubuntu powered Dev machine but its random. Doesn''t happen everytime, my guess is that this is problem with the test itself rather than implementation of live-stream. --Gaurish -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. For more options, visit https://groups.google.com/groups/opt_out.