Hi everybody, I uncovered a rather unnerving race condition at work (GetUp) 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: rvm use 1.8.7 bundle exec cucumber features/example.feature [2] observe soothing green output rvm use 1.9.2 bundle exec cucumber features/example.feature 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: Has anyone on the list experienced (and hopefully fixed) this problem? How would you approach tracking this bad boy down? (Preferably not involving MRI source code and gdb.) Which particular alcoholic beverage is preferred for drowning one's sorrows while debugging bugs like this? Cheers, and many thanks in advance, - alex. Notes: 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 There really is nothing special about this script--it just fills in inputs and pushes buttons. 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 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]. For more options, visit this group at http://groups.google.com/group/rails-oceania?hl=en.
