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


    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.3
    • Fix Version/s: 2.0.4
    • Component/s: library
    • Security Level: Public
    • Labels:
    • Environment:
      linux - several


      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:
      require 'couchbase'
      Couchbase.connection_options = {:bucket => 'rubytest', :node_list => [''], :password => 'password'}
      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.


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



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


              • Created:

                Gerrit Reviews

                There are no open Gerrit changes