The first thing I would try is to change the DB you are using. Perhaps it's a weird 1.9.2 issues and the db connection is what is hanging? Then I'd try to upgrade any versions of rack/webrick (if using something like Selenium) in case it's one of those. Basically check all the gem versions.
I have 3 apps I'm working on right now, all with Rails 3, Ruby 1.9.2, and all tested with Cucumber/Capybara and I've not experienced this problem once. FWIW I am using Cucumber 0.8.5, no webrick, postgres 8.4.1, and no webrick Bo [image: Bodaniel Jeanes] *Bodaniel Jeanes* [image: LinkedIn] <http://www.linkedin.com/in/bjeanes>[image: Twitter] <http://twitter.com/bjeanes>[image: Tungle.me] <http://tungle.me/bjeanes>[image: Blog] <http://bjeanes.com> Whttp://bjeanes.com [email protected]+61412639224 [image: Google Talk] [image: MSN] [image: Google Wave] [email protected] [image: Skype][image: AIM] bojeanes On Thu, Oct 7, 2010 at 11:32 PM, Alex Cooper <[email protected]> wrote: > Hi everybody, > > I uncovered a rather unnerving race condition at work > (GetUp<http://getup.org.au/>) > today, and I'd love to know if anyone else has seen this. > > I've been getting a erratic, but reproducible lockups under ruby 1.9.2 and > cucumber/capybara [1]. But under ruby 1.8.7 it's fine. > > This sucks, because we'd really like to use 1.9.2 for its much improved > performance. > > The cucumber script does nothing special. Populate the DB, fill in some > fields, press a button or two. Sometimes cucumber hangs midway through the > test--but at *different locations. *This behavior is seen on other > features, too, but it's mainly in the same few scenarios. > > Steps to reproduce: > > 1. rvm use 1.8.7 > 2. bundle exec cucumber features/example.feature [2] > 3. observe soothing green output > 4. rvm use 1.9.2 > 5. bundle exec cucumber features/example.feature > 6. tear hair out when deadlock occurs [3] > > > The kicker is that it happens in different places in the cucumber script, > and there's no predictable pattern I can discern as to exactly which step > (or type of step) will hang. > > I suspect deadlock, because output halts midway through a scenario, CPU > drops to zero, memory usage remains stable, and Ruby no longer responds to > SIGINT (which I think it normally would). > > So, my questions for the floor are, in increasing order of importance: > > 1. *Has anyone on the list experienced (and hopefully fixed) this > problem?* > 2. *How would you approach tracking this bad boy down? (Preferably not > involving > MRI source code and gdb.**)* > 3. *Which particular alcoholic beverage is preferred for drowning one's > sorrows while debugging bugs like this?* > > > Cheers, and many thanks in advance, > > - alex. > > Notes: > > 1. The environment is: Rails 3.0, Ruby 1.9.2, cucumber 0.9.0, > cucumber-rails 0.3.2, webrick 1.3.1, postgres 8.4.4, OSX Snow Leopard > 2. There really is nothing special about this script--it just fills in > inputs and pushes buttons. > 3. On different machines, deadlock occurs with different frequency. On > my (slow) MBP with 2G memory, it happens about 70% of the time. On a > colleague's <http://ryanbigg.com/> older (but faster) machine, it locks > up around 30% of the time. > > > -- > Alex Cooper m: 0402 024 304 w: http://acooper.org/ > t: @kuperov > > -- > You received this message because you are subscribed to the Google Groups > "Ruby or Rails Oceania" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<rails-oceania%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/rails-oceania?hl=en. > -- You received this message because you are subscribed to the Google Groups "Ruby or Rails Oceania" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rails-oceania?hl=en.
