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

Null field in newsrv->authority leading to crash in lcb_wait3/compute_vb_list_diff

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Major
    • 2.8.4
    • 2.8.3
    • library
    • None

    Description

      bt
      * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
        * frame #0: 0x00007fff8ecc8330 libsystem_platform.dylib`_platform_strcmp + 176
          frame #1: 0x00000001052f54b2 libcouchbase.2.dylib`compute_vb_list_diff(from=0x000000010047cc90, to=0x0000000100436c30, out=0x0000000101952230) at vbucket.c:1051
          frame #2: 0x00000001052f5278 libcouchbase.2.dylib`lcbvb_compare(from=0x000000010047cc90, to=0x0000000100436c30) at vbucket.c:1076
          frame #3: 0x0000000105356969 libcouchbase.2.dylib`lcb::clconfig::Confmon::do_set_next(this=0x0000000100576000, new_config=0x0000000100419470, notify_miss=false) at confmon.cc:134
          frame #4: 0x0000000105354c63 libcouchbase.2.dylib`lcb::clconfig::Confmon::do_next_provider(this=0x0000000100576000) at confmon.cc:254
          frame #5: 0x0000000105359047 libcouchbase.2.dylib`lcb::io::Timer<lcb::clconfig::Confmon, &(lcb::clconfig::Confmon::do_next_provider())>::cb(arg=0x0000000100576000) at timer-cxx.h:80
          frame #6: 0x0000000105308c3d libcouchbase.2.dylib`timer_callback(sock=-1, which=1, arg=0x000000010053b8b0) at timer.c:45
          frame #7: 0x00000001056df9d7 libevent_core-2.1.6.dylib`event_process_active_single_queue + 1003
          frame #8: 0x00000001056dcd39 libevent_core-2.1.6.dylib`event_base_loop + 1170
          frame #9: 0x00000001056cb71e libcouchbase_libevent.dylib`lcb_io_run_event_loop(iops=0x0000000100579500) at plugin-libevent.c:202
          frame #10: 0x00000001053f5da0 libcouchbase.2.dylib`::lcb_wait3(instance=0x0000000100564a30, flags=LCB_WAIT_NOCHECK) at wait.cc:140
          frame #11: 0x00000001052c4df8 _libcouchbase.cpython-36m-darwin.so`pycbc_oputil_wait_common(self=0x00000001056af750) at oputil.c:461
          frame #12: 0x00000001052ca9b4 _libcouchbase.cpython-36m-darwin.so`pycbc_Bucket__http_request(self=0x00000001056af750, args=0x0000000100303048, kwargs=0x00000001056bf120) at http.c:265
          frame #13: 0x00000001000d17ea Python`_PyCFunction_FastCallDict + 463
          frame #14: 0x00000001000d18b5 Python`_PyCFunction_FastCallKeywords + 69
          frame #15: 0x000000010013600f Python`call_function + 489
          frame #16: 0x000000010012ef64 Python`_PyEval_EvalFrameDefault + 5082
          frame #17: 0x00000001001367df Python`_PyEval_EvalCodeWithName + 1829
          frame #18: 0x0000000100136ecb Python`fast_function + 227
          frame #19: 0x0000000100135fe6 Python`call_function + 448
          frame #20: 0x000000010012ef64 Python`_PyEval_EvalFrameDefault + 5082
          frame #21: 0x0000000100137166 Python`_PyFunction_FastCall + 121
          frame #22: 0x0000000100135fe6 Python`call_function + 448
          frame #23: 0x000000010012eecc Python`_PyEval_EvalFrameDefault + 4930
          frame #24: 0x0000000100137166 Python`_PyFunction_FastCall + 121
          frame #25: 0x0000000100135fe6 Python`call_function + 448
          frame #26: 0x000000010012eecc Python`_PyEval_EvalFrameDefault + 4930
          frame #27: 0x00000001001367df Python`_PyEval_EvalCodeWithName + 1829
          frame #28: 0x0000000100137096 Python`_PyFunction_FastCallDict + 444
          frame #29: 0x0000000100099ab9 Python`_PyObject_FastCallDict + 196
          frame #30: 0x0000000100099bdc Python`_PyObject_Call_Prepend + 156
          frame #31: 0x000000010009993a Python`PyObject_Call + 101
          frame #32: 0x000000010012f121 Python`_PyEval_EvalFrameDefault + 5527
          frame #33: 0x00000001001367df Python`_PyEval_EvalCodeWithName + 1829
          frame #34: 0x0000000100137096 Python`_PyFunction_FastCallDict + 444
          frame #35: 0x0000000100099ab9 Python`_PyObject_FastCallDict + 196
          frame #36: 0x0000000100099bdc Python`_PyObject_Call_Prepend + 156
          frame #37: 0x000000010009993a Python`PyObject_Call + 101
          frame #38: 0x00000001000e3fce Python`slot_tp_call + 50
          frame #39: 0x0000000100099a84 Python`_PyObject_FastCallDict + 143
          frame #40: 0x0000000100135fdf Python`call_function + 441
          frame #41: 0x000000010012eecc Python`_PyEval_EvalFrameDefault + 4930
          frame #42: 0x0000000100137166 Python`_PyFunction_FastCall + 121
          frame #43: 0x0000000100135fe6 Python`call_function + 448
          frame #44: 0x000000010012eecc Python`_PyEval_EvalFrameDefault + 4930
          frame #45: 0x0000000100137166 Python`_PyFunction_FastCall + 121
          frame #46: 0x0000000100099ab9 Python`_PyObject_FastCallDict + 196
          frame #47: 0x0000000100099bdc Python`_PyObject_Call_Prepend + 156
          frame #48: 0x000000010009993a Python`PyObject_Call + 101
          frame #49: 0x000000010012f121 Python`_PyEval_EvalFrameDefault + 5527
          frame #50: 0x00000001001367df Python`_PyEval_EvalCodeWithName + 1829
          frame #51: 0x0000000100137096 Python`_PyFunction_FastCallDict + 444
          frame #52: 0x0000000100099ab9 Python`_PyObject_FastCallDict + 196
          frame #53: 0x0000000100099bdc Python`_PyObject_Call_Prepend + 156
          frame #54: 0x000000010009993a Python`PyObject_Call + 101
          frame #55: 0x00000001000e3fce Python`slot_tp_call + 50
          frame #56: 0x0000000100099a84 Python`_PyObject_FastCallDict + 143
          frame #57: 0x0000000100135fdf Python`call_function + 441
          frame #58: 0x000000010012eecc Python`_PyEval_EvalFrameDefault + 4930
          frame #59: 0x0000000100137166 Python`_PyFunction_FastCall + 121
          frame #60: 0x0000000100099ab9 Python`_PyObject_FastCallDict + 196
          frame #61: 0x0000000100099bdc Python`_PyObject_Call_Prepend + 156
          frame #62: 0x000000010009993a Python`PyObject_Call + 101
          frame #63: 0x000000010012f121 Python`_PyEval_EvalFrameDefault + 5527
          frame #64: 0x00000001001367df Python`_PyEval_EvalCodeWithName + 1829
          frame #65: 0x0000000100137096 Python`_PyFunction_FastCallDict + 444
          frame #66: 0x0000000100099ab9 Python`_PyObject_FastCallDict + 196
          frame #67: 0x0000000100099bdc Python`_PyObject_Call_Prepend + 156
          frame #68: 0x000000010009993a Python`PyObject_Call + 101
          frame #69: 0x00000001000e3fce Python`slot_tp_call + 50
          frame #70: 0x0000000100099a84 Python`_PyObject_FastCallDict + 143
          frame #71: 0x0000000100135fdf Python`call_function + 441
          frame #72: 0x000000010012eecc Python`_PyEval_EvalFrameDefault + 4930
          frame #73: 0x0000000100137166 Python`_PyFunction_FastCall + 121
          frame #74: 0x0000000100099ab9 Python`_PyObject_FastCallDict + 196
          frame #75: 0x0000000100099bdc Python`_PyObject_Call_Prepend + 156
          frame #76: 0x000000010009993a Python`PyObject_Call + 101
          frame #77: 0x000000010012f121 Python`_PyEval_EvalFrameDefault + 5527
          frame #78: 0x00000001001367df Python`_PyEval_EvalCodeWithName + 1829
          frame #79: 0x0000000100137096 Python`_PyFunction_FastCallDict + 444
          frame #80: 0x0000000100099ab9 Python`_PyObject_FastCallDict + 196
          frame #81: 0x0000000100099bdc Python`_PyObject_Call_Prepend + 156
          frame #82: 0x000000010009993a Python`PyObject_Call + 101
          frame #83: 0x00000001000e3fce Python`slot_tp_call + 50
          frame #84: 0x0000000100099a84 Python`_PyObject_FastCallDict + 143
          frame #85: 0x0000000100135fdf Python`call_function + 441
          frame #86: 0x000000010012eecc Python`_PyEval_EvalFrameDefault + 4930
          frame #87: 0x0000000100137166 Python`_PyFunction_FastCall + 121
          frame #88: 0x0000000100099ab9 Python`_PyObject_FastCallDict + 196
          frame #89: 0x0000000100099bdc Python`_PyObject_Call_Prepend + 156
          frame #90: 0x000000010009993a Python`PyObject_Call + 101
          frame #91: 0x000000010012f121 Python`_PyEval_EvalFrameDefault + 5527
          frame #92: 0x00000001001367df Python`_PyEval_EvalCodeWithName + 1829
          frame #93: 0x0000000100137096 Python`_PyFunction_FastCallDict + 444
          frame #94: 0x0000000100099ab9 Python`_PyObject_FastCallDict + 196
          frame #95: 0x0000000100099bdc Python`_PyObject_Call_Prepend + 156
          frame #96: 0x000000010009993a Python`PyObject_Call + 101
          frame #97: 0x00000001000e3fce Python`slot_tp_call + 50
          frame #98: 0x0000000100099a84 Python`_PyObject_FastCallDict + 143
          frame #99: 0x0000000100135fdf Python`call_function + 441
          frame #100: 0x000000010012eecc Python`_PyEval_EvalFrameDefault + 4930
          frame #101: 0x0000000100137166 Python`_PyFunction_FastCall + 121
          frame #102: 0x0000000100135fe6 Python`call_function + 448
          frame #103: 0x000000010012eecc Python`_PyEval_EvalFrameDefault + 4930
          frame #104: 0x0000000100137166 Python`_PyFunction_FastCall + 121
          frame #105: 0x0000000100135fe6 Python`call_function + 448
          frame #106: 0x000000010012eecc Python`_PyEval_EvalFrameDefault + 4930
          frame #107: 0x00000001001367df Python`_PyEval_EvalCodeWithName + 1829
          frame #108: 0x000000010012db4f Python`PyEval_EvalCodeEx + 52
          frame #109: 0x00000001000b9c1b Python`function_call + 338
          frame #110: 0x000000010009993a Python`PyObject_Call + 101
          frame #111: 0x000000010012f121 Python`_PyEval_EvalFrameDefault + 5527
          frame #112: 0x00000001001367df Python`_PyEval_EvalCodeWithName + 1829
          frame #113: 0x0000000100137096 Python`_PyFunction_FastCallDict + 444
          frame #114: 0x0000000100099ab9 Python`_PyObject_FastCallDict + 196
          frame #115: 0x0000000100099bdc Python`_PyObject_Call_Prepend + 156
          frame #116: 0x000000010009993a Python`PyObject_Call + 101
          frame #117: 0x00000001000e48fa Python`slot_tp_init + 57
          frame #118: 0x00000001000e1846 Python`type_call + 184
          frame #119: 0x0000000100099a84 Python`_PyObject_FastCallDict + 143
          frame #120: 0x0000000100135fdf Python`call_function + 441
          frame #121: 0x000000010012eecc Python`_PyEval_EvalFrameDefault + 4930
          frame #122: 0x00000001001367df Python`_PyEval_EvalCodeWithName + 1829
          frame #123: 0x000000010012db15 Python`PyEval_EvalCode + 43
          frame #124: 0x000000010015525a Python`run_mod + 54
          frame #125: 0x000000010015553a Python`PyRun_FileExFlags + 180
          frame #126: 0x0000000100154ac7 Python`PyRun_SimpleFileExFlags + 280
          frame #127: 0x0000000100168878 Python`Py_Main + 3268
          frame #128: 0x0000000100001e1d python`___lldb_unnamed_symbol1$$python + 227
          frame #129: 0x00007fff8eab9235 libdyld.dylib`start + 1
          frame #130: 0x00007fff8eab9235 libdyld.dylib`start + 1
      (lldb) frame variable
      (lldb) frame select 1
      frame #1: 0x00000001052f54b2 libcouchbase.2.dylib`compute_vb_list_diff(from=0x000000010047cc90, to=0x0000000100436c30, out=0x0000000101952230) at vbucket.c:1051
         1048	        lcbvb_SERVER *newsrv = to->servers + ii;
         1049	        for (jj = 0; !found && jj < from->nsrv; jj++) {
         1050	            lcbvb_SERVER *oldsrv = from->servers + jj;
      -> 1051	            found |= (strcmp(newsrv->authority, oldsrv->authority) == 0);
         1052	        }
         1053	        if (!found) {
         1054	            char *infostr = malloc(strlen(newsrv->authority) + 128);
      (lldb) frame variable
      (lcbvb_CONFIG *) from = 0x000000010047cc90
      (lcbvb_CONFIG *) to = 0x0000000100436c30
      (char **) out = 0x0000000101952230
      (int) offset = 0
      (unsigned int) ii = 0
      (unsigned int) jj = 0
      (int) found = 0
      (lcbvb_SERVER *) newsrv = 0x000000010045af70
      (lcbvb_SERVER *) oldsrv = 0x000000010044c790
      (lldb) print *newsrv;
      (lcbvb_SERVER) $0 = {
        svc = {
          data = 0
          mgmt = 8091
          views = 0
          ixquery = 0
          ixadmin = 0
          n1ql = 0
          fts = 0
          cbas = 0
          views_base_ = 0x0000000000000000 <no value available>
          query_base_ = 0x0000000000000000 <no value available>
          fts_base_ = 0x0000000000000000 <no value available>
          cbas_base_ = 0x0000000000000000 <no value available>
          hoststrs = ([0] = <no value available>, [1] = <no value available>, [2] = <no value available>, [3] = <no value available>, [4] = <no value available>, [5] = <no value available>, [6] = <no value available>, [7] = <no value available>)
        }
        svc_ssl = {
          data = 0
          mgmt = 0
          views = 0
          ixquery = 0
          ixadmin = 0
          n1ql = 0
          fts = 0
          cbas = 0
          views_base_ = 0x0000000000000000 <no value available>
          query_base_ = 0x0000000000000000 <no value available>
          fts_base_ = 0x0000000000000000 <no value available>
          cbas_base_ = 0x0000000000000000 <no value available>
          hoststrs = ([0] = <no value available>, [1] = <no value available>, [2] = <no value available>, [3] = <no value available>, [4] = <no value available>, [5] = <no value available>, [6] = <no value available>, [7] = <no value available>)
        }
        authority = 0x0000000000000000 <no value available>
        hostname = 0x00000001004464f0 "10.142.171.101"
        viewpath = 0x0000000000000000 <no value available>
        querypath = 0x0000000000000000 <no value available>
        ftspath = 0x0000000000000000 <no value available>
        cbaspath = 0x0000000000000000 <no value available>
        nvbs = 0
      }
      (lldb) print *oldserv;
      error: use of undeclared identifier 'oldserv'
      (lldb) print *oldsrv;
      (lcbvb_SERVER) $1 = {
        svc = {
          data = 11210
          mgmt = 8091
          views = 8092
          ixquery = 9101
          ixadmin = 9100
          n1ql = 8093
          fts = 8094
          cbas = 0
          views_base_ = 0x0000000000000000 <no value available>
          query_base_ = 0x0000000000000000 <no value available>
          fts_base_ = 0x0000000000000000 <no value available>
          cbas_base_ = 0x0000000000000000 <no value available>
          hoststrs = ([0] = "10.142.171.101:11210", [1] = <no value available>, [2] = "10.142.171.101:8091", [3] = <no value available>, [4] = <no value available>, [5] = <no value available>, [6] = <no value available>, [7] = <no value available>)
        }
        svc_ssl = {
          data = 11207
          mgmt = 18091
          views = 18092
          ixquery = 0
          ixadmin = 0
          n1ql = 18093
          fts = 18094
          cbas = 0
          views_base_ = 0x0000000000000000 <no value available>
          query_base_ = 0x0000000000000000 <no value available>
          fts_base_ = 0x0000000000000000 <no value available>
          cbas_base_ = 0x0000000000000000 <no value available>
          hoststrs = ([0] = <no value available>, [1] = <no value available>, [2] = <no value available>, [3] = <no value available>, [4] = <no value available>, [5] = <no value available>, [6] = <no value available>, [7] = <no value available>)
        }
        authority = 0x000000010044ce70 "10.142.171.101:11210"
        hostname = 0x0000000100409a40 "10.142.171.101"
        viewpath = 0x0000000100409a70 "/default"
        querypath = 0x0000000100466df0 "/query/service"
        ftspath = 0x0000000100466e00 "/"
        cbaspath = 0x0000000000000000 <no value available>
        nvbs = 1024
      }
      

      Attachments

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

        Activity

          People

            avsej Sergey Avseyev
            Ellis.Breen Ellis Breen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty