Uploaded image for project: 'Couchbase C client library libcouchbase'
  1. Couchbase C client library libcouchbase
  2. CCBC-180

Segfault when in case server name resolved to several addresses, where first of them rejects couchbase connection

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 2.0.4
    • 2.0.3
    • library
    • Security Level: Public
    • None
    • linux - several
    • Release Note

    Description

      I get a lot of segfaults using the client when trying to connect to external couchbase servers (i.e. when there is no couchbase server on localhost).

      I've tested this on a couple different machines, with both ruby REE and 1.9.3 - same results every time.

      To reproduce:
      1) setup couchbase server / cluster on machine-1
      2) setup ruby development environment on machine-2
      – I'm using rvm
      – I've install the couchbase library
      3) run simple ruby program to test connections:
      #simple_test.rb
      require 'couchbase'
      Couchbase.connection_options = {:bucket => 'rubytest', :node_list => ['123.45.67.89:8091'], :password => 'password'}
      Couchbase.connect
      4) watch it segfault when you run it

      Essentially, it seems that setting the 'connection_optoins' has no effect on creating new buckets, they keep trying to connect to the built-in default of 'localhost'

      This is especially problematic because of what it means trying to use couchbase in production: If I work around this by passing connection options to a new bucket, I will eventually run into this same segfault issue whenever the cluster I am connecting to is rebalancing - I've gotten quite a few segfaults when adding / removing nodes and then rebalancing.

      Attachments

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

        Activity

          People

            avsej Sergey Avseyev
            tim.ray Tim Ray
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty