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

    Details

    • 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:
      None
    • Environment:
      linux - several

      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.

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

        Activity

        tim.ray Tim Ray created issue -
        ingenthr Matt Ingenthron made changes -
        Field Original Value New Value
        Fix Version/s 1.2.2 [ 10465 ]
        avsej Sergey Avseyev made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Cannot Reproduce [ 5 ]
        avsej Sergey Avseyev made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        ingenthr Matt Ingenthron made changes -
        Resolution Cannot Reproduce [ 5 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        ingenthr Matt Ingenthron made changes -
        Fix Version/s 1.2.3 [ 10501 ]
        Fix Version/s 1.2.2 [ 10465 ]
        avsej Sergey Avseyev made changes -
        Project Couchbase Ruby client library [ 10048 ] Couchbase C client library libcouchbase [ 10070 ]
        Key RCBC-113 CCBC-180
        Affects Version/s 2.0.3 [ 10470 ]
        Affects Version/s 1.2.0 [ 10413 ]
        Affects Version/s 1.2.1 [ 10450 ]
        Fix Version/s 2.0.4 [ 10500 ]
        Fix Version/s 1.2.3 [ 10501 ]
        Component/s library [ 10110 ]
        Component/s library [ 10130 ]
        avsej Sergey Avseyev made changes -
        Planned Start (set to new fixed version's start date)
        Planned End (set to new fixed version's start date)
        avsej Sergey Avseyev made changes -
        Priority Major [ 3 ] Critical [ 2 ]
        avsej Sergey Avseyev made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        avsej Sergey Avseyev made changes -
        Summary Couchbase.connection_options is not being used by the client: results in segfaults Segfault when in case server name resolved to several addresses, where first of them rejects couchbase connection
        Flagged Release Note [ 10010 ]
        avsej Sergey Avseyev made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        brett19 Brett Lawson made changes -
        Workflow jira [ 23871 ] Couchbase SDK Workflow [ 43830 ]

          People

          • Assignee:
            avsej Sergey Avseyev
            Reporter:
            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