Uploaded image for project: 'Couchbase Ruby client library'
  1. Couchbase Ruby client library
  2. RCBC-4

Fatal Deadlock error when calling Couchbase.new on Ruby 1.9.2


    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Security Level: Public
    • Labels:
    • Environment:
      Mac OSX Lion Ruby 1.9.2 (p180)


      Using the example code referenced in RCBC-2 (http://www.couchbase.org/issues/browse/RCBC-2)

      I simply switched to using ruby 1.9.2 and attempted to run.

      /Users/dave/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.2/thread.rb:71:in `sleep': deadlock detected (fatal)
      from /Users/dave/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.2/thread.rb:71:in `wait'
      from /Users/dave/.rvm/gems/ruby-1.9.2-p180/bundler/gems/couchbase-ruby-client-de0885eaa70f/lib/couchbase/latch.rb:66:in `block in wait'
      from <internal:prelude>:10:in `synchronize'
      from /Users/dave/.rvm/gems/ruby-1.9.2-p180/bundler/gems/couchbase-ruby-client-de0885eaa70f/lib/couchbase/latch.rb:65:in `wait'
      from /Users/dave/.rvm/gems/ruby-1.9.2-p180/bundler/gems/couchbase-ruby-client-de0885eaa70f/lib/couchbase/bucket.rb:80:in `initialize'
      from /Users/dave/.rvm/gems/ruby-1.9.2-p180/bundler/gems/couchbase-ruby-client-de0885eaa70f/lib/couchbase.rb:37:in `new'
      from /Users/dave/.rvm/gems/ruby-1.9.2-p180/bundler/gems/couchbase-ruby-client-de0885eaa70f/lib/couchbase.rb:37:in `new'
      from hello-world.rb:5:in `<main>'

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.


        davidjrice David Rice created issue -
        ingenthr Matt Ingenthron made changes -
        Field Original Value New Value
        Assignee Matt Ingenthron [ ingenthr ] Sergey Avseyev [ avsej ]
        avsej Sergey Avseyev made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        avsej Sergey Avseyev made changes -
        Comment [ Something strange is happening with latch implementation. Consider following example:

        require 'thread'

        class Latch
          def wait
            @lock = Mutex.new
            @condition = ConditionVariable.new

            @lock.synchronize do

          def orig_wait
            lock = Mutex.new
            condition = ConditionVariable.new

            lock.synchronize {

        When I call Latch.new.orig_wait all is ok, but for Latch.new.wait raises error. It's strange because I wrote test for latch and they were passing on ruby 1.9.2 before I published the changeset. So I keep looking for the issue ]
        avsej Sergey Avseyev made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        avsej Sergey Avseyev made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        brett19 Brett Lawson made changes -
        Workflow jira [ 14717 ] Couchbase SDK Workflow [ 44790 ]


          • Assignee:
            avsej Sergey Avseyev
            davidjrice David Rice
          • Votes:
            0 Vote for this issue
            1 Start watching this issue


            • Created:

              Gerrit Reviews

              There are no open Gerrit changes