Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

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

#5295

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.

Reported by Robert Pankowecki · August 4th, 2010 @ 01:03 PM

State: resolved
Milestone: 3.0.2
Assigned to: nobody
Importance: Low

Activity

  1. Robert Pankowecki
    Robert Pankowecki

    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 ?

    August 4th, 2010 @ 01:15 PM

  2. Robert Pankowecki
    Robert Pankowecki

    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".

    August 4th, 2010 @ 03:24 PM

  3. Rohit Arondekar
    Rohit Arondekar
    • 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.

    August 4th, 2010 @ 05:08 PM

  4. Robert Pankowecki
    Robert Pankowecki

    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 ?

    August 4th, 2010 @ 08:05 PM

  5. Rohit Arondekar
    Rohit Arondekar
    • 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

    August 5th, 2010 @ 01:58 AM

  6. Jeremy Kemper
  7. Robert Pankowecki
    Robert Pankowecki

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

    September 4th, 2010 @ 10:13 PM

  8. Jeremy Kemper
    Jeremy Kemper
    • State changed from open to resolved

    September 4th, 2010 @ 10:30 PM

  9. Jeremy Kemper