This project is archived and is in readonly mode.

#5295 ✓resolved
Robert Pankowecki

Rails3 RC - Application hangs randomly when server running in test environment

Reported by Robert Pankowecki | August 4th, 2010 @ 01:03 PM | in 3.0.2

Just run some application server with 'RAILS_ENV=test rails s' and click links. Sometimes it just does not start to process the request.
I can see in the log that the server received the request but nothing is happening.

I managed to create capybara test that just tries to clicks 40 links on a page that leads to the same page. The test works without a problem on rails3.beta4 but fails on rails3.rc because of the bug. I can submit the application with it so it is easy to repeat the bug.

Comments and changes to this ticket

  • Robert Pankowecki

    Robert Pankowecki August 4th, 2010 @ 01:15 PM

    I traced my ruby process. It seems that one of them is waiting for some fmutex. (http://groups.google.com/group/ruby-capybara/browse_thread/thread/5.... Is it possible that some semaphores logic works different in test env? Like for example guard/mutex used by loggers ?

  • Robert Pankowecki

    Robert Pankowecki August 4th, 2010 @ 03:24 PM

    Last logs:

    Started GET "/models?i=14" for 127.0.0.1 at 2010-08-04 16:16:57 +0200
      Processing by ModelsController#index as HTML
      Parameters: {"i"=>"14"}
    Rendered models/index.html.erb within layouts/application (5.8ms)
    Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms)
    
    
    Started GET "/models?i=8" for 127.0.0.1 at 2010-08-04 16:16:58 +0200
    

    Obviously the application stops working somewhere between writing "Started GET" and "Processing by".

  • Rohit Arondekar

    Rohit Arondekar August 4th, 2010 @ 05:08 PM

    • Importance changed from “” to “Low”

    I don't think I can reproduce this on master. I tried refreshing a lot of times but it didn't happen.

    I can confirm that it does happen with RC. A simple scaffold will do. Just keep refreshing the /posts page, it should hang after 10-30 refreshes.

    I wanted to try on 3-0-stable but I'm getting an error so I couldn't. The error here: http://pastie.org/1075273 The error has nothing to do with this ticket, but if it works on 3-0-stable then this issue might have been fixed along the way.

  • Robert Pankowecki

    Robert Pankowecki August 4th, 2010 @ 08:05 PM

    I spent 6 hours today trying to find out something about this bug but I could not find anything useful. I can try tomorrow (CET) to use master and see how it works for me. Can you provide any guess about why it might be happening on RC ?

  • Rohit Arondekar

    Rohit Arondekar August 5th, 2010 @ 01:58 AM

    • State changed from “new” to “open”
    • Milestone cleared.

    I can confirm that it does happen on 3-0-stable also.

    Steps to reproduce:

    • Bundle 3-0-stable
    • Create a scaffold Post
    • RAILS_ENV=test rake db:migrate
    • RAILS_ENV bundle exec rails s
    • keep refreshing /posts, it should hang after 10-30 refreshes
  • Jeremy Kemper
  • Robert Pankowecki

    Robert Pankowecki September 4th, 2010 @ 10:13 PM

    My capybara tests stared to running fine again on Rails 3.0.0 so I can say that is not reproducible for me now.

  • Jeremy Kemper

    Jeremy Kemper September 4th, 2010 @ 10:30 PM

    • State changed from “open” to “resolved”
  • Jeremy Kemper

    Jeremy Kemper October 15th, 2010 @ 11:02 PM

    • Milestone set to 3.0.2

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>

Pages