Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-446

Client library crashes (aborts) upon receiving any signal

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.2.6, 2.3.1
    • 2.5.7
    • library
    • None
    • Fedora 26
      libcouchbase 2.8.2

    Description

      from couchbase.bucket import Bucket
       
      connection_string = 'couchbase://172.23.99.203/bucket-1?password=password'
      b = Bucket(connection_string)
       
      while True:
          b.upsert('key', {})
      

      After receiving SIGINT:

      python-couchbase: self->nremaining == 0 at src/oputil.c:63. AbortAborted (core dumped)
      

      (gdb) bt full
      #0  0x00007f2c3df329fb in raise () from /lib64/libc.so.6
      No symbol table info available.
      #1  0x00007f2c3df34800 in abort () from /lib64/libc.so.6
      No symbol table info available.
      #2  0x00007f2c367fc669 in pycbc_handle_assert (msg=msg@entry=0x7f2c3681072e "self->nremaining == 0", file=file@entry=0x7f2c36810653 "src/oputil.c", line=line@entry=63) at src/exceptions.c:25
              assert_props = <optimized out>
              line = 63
              file = 0x7f2c36810653 "src/oputil.c"
              msg = 0x7f2c3681072e "self->nremaining == 0"
              assert_props = <optimized out>
      #3  0x00007f2c36806e78 in pycbc_common_vars_wait (cv=cv@entry=0x7ffc04497500, self=self@entry=0x7f2c33080408) at src/oputil.c:63
              nsched = 1
      #4  0x00007f2c3680345c in set_common (self=0x7f2c33080408, args=<optimized out>, kwargs=<optimized out>, operation=<optimized out>, argopts=1) at src/store.c:341
              rv = <optimized out>
              ncmds = 1
              ttl_O = 0
              dict = 0x0
              key = 'key'
              value = {}
              seqtype = (PYCBC_SEQTYPE_TUPLE | PYCBC_SEQTYPE_LIST | PYCBC_SEQTYPE_F_ITM | PYCBC_SEQTYPE_F_OPTS | unknown: 32704)
              cv = {argopts = 1, mres = 0x7f2c32609828, ret = 0x0, ncmds = 1, is_seqcmd = 0 '\000', mctx = 0x0}
              scv = {operation = 3, argopts = 1, sd_doc_flags = 0, ttl = 0, flagsobj = 33554432, single_cas = 0}
              persist_to = 0 '\000'
              replicate_to = 0 '\000'
              kwlist_multi = {0x7f2c3680f63d "kv", 0x7f2c3680f617 "ttl", 0x7f2c3680e120 "format", 0x7f2c3680e985 "persist_to", 0x7f2c3680e995 "replicate_to", 0x0}
              kwlist_single = {0x7f2c3680da31 "key", 0x7f2c3680e137 "value", 0x7f2c3680f622 "cas", 0x7f2c3680f617 "ttl", 0x7f2c3680e120 "format", 0x7f2c3680e985 "persist_to", 0x7f2c3680e995 "replicate_to", 
                0x7f2c3680f62f "_sd_doc_flags", 0x0}
      #5  0x00007f2c3ed91c93 in _PyCFunction_FastCallDict () at /usr/src/debug/Python-3.6.2/Objects/methodobject.c:231
              tuple = ('key', {})
              func = 0x7f2c33093e58
              meth = 0x7f2c36803730 <pycbc_Bucket_upsert>
              self = <optimized out>
              result = <optimized out>
              flags = <optimized out>
      #6  0x00007f2c3ed279ee in _PyObject_FastCallDict () at /usr/src/debug/Python-3.6.2/Objects/abstract.c:2298
              call = <optimized out>
              result = 0x0
      #7  0x00007f2c3ed7dd55 in methoddescr_call () at /usr/src/debug/Python-3.6.2/Objects/descrobject.c:246
              argc = 3
              self = <Bucket at remote 0x7f2c33080408>
              func = <built-in method upsert of Bucket object at remote 0x7f2c33080408>
              result = <optimized out>
              stack = 0x7f2c325f3b60
      #8  0x00007f2c3ed277c4 in _PyObject_FastCallDict () at /usr/src/debug/Python-3.6.2/Objects/abstract.c:2316
              tuple = (<Bucket at remote 0x7f2c33080408>, 'key', {})
              call = 0x7f2c3ed7dcf0 <methoddescr_call>
              result = 0x0
      #9  0x00007f2c3ed920c8 in _PyObject_FastCallKeywords () at /usr/src/debug/Python-3.6.2/Objects/abstract.c:2481
              kwdict = {'cas': 0, 'ttl': 0, 'format': None, 'persist_to': 0, 'replicate_to': 0}
              result = <optimized out>
              nkwargs = <optimized out>
      #10 0x00007f2c3ed991fd in call_function () at /usr/src/debug/Python-3.6.2/Python/ceval.c:4833
              pfunc = 0x560db8f10f00
              func = <method_descriptor at remote 0x7f2c36e62ea0>
              x = <optimized out>
              w = <optimized out>
              nargs = 3
              stack = <optimized out>
      #11 0x00007f2c3edd7262 in _PyEval_EvalFrameDefault () at /usr/src/debug/Python-3.6.2/Python/ceval.c:3311
              sp = 0x560db8f10f48
              res = <optimized out>
              names = ('cas', 'ttl', 'format', 'persist_to', 'replicate_to')
              stack_pointer = 0x560db8f10f48
              next_instr = <optimized out>
              opcode = <optimized out>
              oparg = <optimized out>
              why = <optimized out>
              fastlocals = <optimized out>
              freevars = <optimized out>
              retval = <optimized out>
              tstate = 0x560db8d09c10
              co = <optimized out>
              instr_ub = -1
              instr_lb = 0
              instr_prev = -1
              first_instr = <optimized out>
              names = <optimized out>
              consts = <optimized out>
              opcode_targets = {0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3edd6600 <_PyEval_EvalFrameDefault+1344>, 0x7f2c3edd7495 <_PyEval_EvalFrameDefault+5077>, 
                0x7f2c3edd7dfd <_PyEval_EvalFrameDefault+7485>, 0x7f2c3edd76a0 <_PyEval_EvalFrameDefault+5600>, 0x7f2c3edda64f <_PyEval_EvalFrameDefault+17807>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 
                0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3eddd618 <_PyEval_EvalFrameDefault+30040>, 0x7f2c3eddd3c0 <_PyEval_EvalFrameDefault+29440>, 
                0x7f2c3edd8a24 <_PyEval_EvalFrameDefault+10596>, 0x7f2c3edd787c <_PyEval_EvalFrameDefault+6076>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 
                0x7f2c3edd939a <_PyEval_EvalFrameDefault+13018>, 0x7f2c3eddd752 <_PyEval_EvalFrameDefault+30354>, 0x7f2c3eddd6af <_PyEval_EvalFrameDefault+30191>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 
                0x7f2c3edd842f <_PyEval_EvalFrameDefault+9071>, 0x7f2c3edd74ef <_PyEval_EvalFrameDefault+5167>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3edd7d3d <_PyEval_EvalFrameDefault+7293>, 
                0x7f2c3edd6e2c <_PyEval_EvalFrameDefault+3436>, 0x7f2c3edd702c <_PyEval_EvalFrameDefault+3948>, 0x7f2c3edd6a3d <_PyEval_EvalFrameDefault+2429>, 0x7f2c3edd857d <_PyEval_EvalFrameDefault+9405>, 
                0x7f2c3edd8621 <_PyEval_EvalFrameDefault+9569>, 0x7f2c3edd92f7 <_PyEval_EvalFrameDefault+12855>, 0x7f2c3edd9666 <_PyEval_EvalFrameDefault+13734>, 
                0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566> <repeats 20 times>, 0x7f2c3edda4f1 <_PyEval_EvalFrameDefault+17457>, 0x7f2c3edd97b1 <_PyEval_EvalFrameDefault+14065>, 
                0x7f2c3eddcfff <_PyEval_EvalFrameDefault+28479>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3edd72dc <_PyEval_EvalFrameDefault+4636>, 
                0x7f2c3edd924d <_PyEval_EvalFrameDefault+12685>, 0x7f2c3edd9707 <_PyEval_EvalFrameDefault+13895>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3eddd0e1 <_PyEval_EvalFrameDefault+28705>, 
                0x7f2c3edd718f <_PyEval_EvalFrameDefault+4303>, 0x7f2c3edd87c7 <_PyEval_EvalFrameDefault+9991>, 0x7f2c3edd8981 <_PyEval_EvalFrameDefault+10433>, 0x7f2c3edd80f9 <_PyEval_EvalFrameDefault+8249>, 
                0x7f2c3edd77d9 <_PyEval_EvalFrameDefault+5913>, 0x7f2c3edd8beb <_PyEval_EvalFrameDefault+11051>, 0x7f2c3edd84d8 <_PyEval_EvalFrameDefault+9240>, 0x7f2c3eddd251 <_PyEval_EvalFrameDefault+29073>, 
                0x7f2c3edd6fac <_PyEval_EvalFrameDefault+3820>, 0x7f2c3edd95ef <_PyEval_EvalFrameDefault+13615>, 0x7f2c3edda454 <_PyEval_EvalFrameDefault+17300>, 0x7f2c3edd9137 <_PyEval_EvalFrameDefault+12407>, 
                0x7f2c3edd7592 <_PyEval_EvalFrameDefault+5330>, 0x7f2c3edda312 <_PyEval_EvalFrameDefault+16978>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3edd88de <_PyEval_EvalFrameDefault+10270>, 
                0x7f2c3edda7ad <_PyEval_EvalFrameDefault+18157>, 0x7f2c3edda3ab <_PyEval_EvalFrameDefault+17131>, 0x7f2c3edd9545 <_PyEval_EvalFrameDefault+13445>, 0x7f2c3edd94a0 <_PyEval_EvalFrameDefault+13280>, 
                0x7f2c3edd7ffe <_PyEval_EvalFrameDefault+7998>, 0x7f2c3edd8239 <_PyEval_EvalFrameDefault+8569>, 0x7f2c3edd8313 <_PyEval_EvalFrameDefault+8787>, 0x7f2c3edd6710 <_PyEval_EvalFrameDefault+1616>, 
                0x7f2c3edd986c <_PyEval_EvalFrameDefault+14252>, 0x7f2c3eddd184 <_PyEval_EvalFrameDefault+28868>, 0x7f2c3edd6d81 <_PyEval_EvalFrameDefault+3265>, 0x7f2c3edd6db8 <_PyEval_EvalFrameDefault+3320>, 
                0x7f2c3edd7ca6 <_PyEval_EvalFrameDefault+7142>, 0x7f2c3edd86d1 <_PyEval_EvalFrameDefault+9745>, 0x7f2c3edd797c <_PyEval_EvalFrameDefault+6332>, 0x7f2c3edd9f6c <_PyEval_EvalFrameDefault+16044>, 
                0x7f2c3edd6bc1 <_PyEval_EvalFrameDefault+2817>, 0x7f2c3edd6890 <_PyEval_EvalFrameDefault+2000>, 0x7f2c3edd8b46 <_PyEval_EvalFrameDefault+10886>, 0x7f2c3edd6cde <_PyEval_EvalFrameDefault+3102>, 
                0x7f2c3edda5c9 <_PyEval_EvalFrameDefault+17673>, 0x7f2c3edd9ee4 <_PyEval_EvalFrameDefault+15908>, 0x7f2c3eddd48a <_PyEval_EvalFrameDefault+29642>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 
                0x7f2c3edd6510 <_PyEval_EvalFrameDefault+1104>, 0x7f2c3edd7c02 <_PyEval_EvalFrameDefault+6978>, 0x7f2c3edd6ad5 <_PyEval_EvalFrameDefault+2581>, 0x7f2c3edd7386 <_PyEval_EvalFrameDefault+4806>, 
                0x7f2c3edd9cd1 <_PyEval_EvalFrameDefault+15377>, 0x7f2c3edd7a20 <_PyEval_EvalFrameDefault+6496>, 0x7f2c3edd6480 <_PyEval_EvalFrameDefault+960>, 0x7f2c3edd6660 <_PyEval_EvalFrameDefault+1440>, 
                0x7f2c3edd8c8e <_PyEval_EvalFrameDefault+11214>, 0x7f2c3edd91c5 <_PyEval_EvalFrameDefault+12549>, 0x7f2c3edd6f5a <_PyEval_EvalFrameDefault+3738>, 0x7f2c3edd7913 <_PyEval_EvalFrameDefault+6227>, 
      ---Type <return> to continue, or q <return> to quit---
                0x7f2c3edd819e <_PyEval_EvalFrameDefault+8414>, 0x7f2c3edd6820 <_PyEval_EvalFrameDefault+1888>, 0x7f2c3edd6370 <_PyEval_EvalFrameDefault+688>, 0x7f2c3edd69c0 <_PyEval_EvalFrameDefault+2304>, 
                0x7f2c3edd62c0 <_PyEval_EvalFrameDefault+512>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3edd9cb0 <_PyEval_EvalFrameDefault+15344>, 
                0x7f2c3edd7027 <_PyEval_EvalFrameDefault+3943>, 0x7f2c3edd691a <_PyEval_EvalFrameDefault+2138>, 0x7f2c3edd6920 <_PyEval_EvalFrameDefault+2144>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 
                0x7f2c3edd6250 <_PyEval_EvalFrameDefault+400>, 0x7f2c3edd6580 <_PyEval_EvalFrameDefault+1216>, 0x7f2c3edd9414 <_PyEval_EvalFrameDefault+13140>, 0x7f2c3edda6b5 <_PyEval_EvalFrameDefault+17909>, 
                0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3edd8aa0 <_PyEval_EvalFrameDefault+10720>, 0x7f2c3edd63f0 <_PyEval_EvalFrameDefault+816>, 
                0x7f2c3edd76ff <_PyEval_EvalFrameDefault+5695>, 0x7f2c3edd70c4 <_PyEval_EvalFrameDefault+4100>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3edd83b9 <_PyEval_EvalFrameDefault+8953>, 
                0x7f2c3edd6ed7 <_PyEval_EvalFrameDefault+3607>, 0x7f2c3edd8864 <_PyEval_EvalFrameDefault+10148>, 0x7f2c3eddd59e <_PyEval_EvalFrameDefault+29918>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 
                0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3edd723f <_PyEval_EvalFrameDefault+4479>, 0x7f2c3edd7e5c <_PyEval_EvalFrameDefault+7580>, 0x7f2c3edd7add <_PyEval_EvalFrameDefault+6685>, 
                0x7f2c3edd69a0 <_PyEval_EvalFrameDefault+2272>, 0x7f2c3edd7413 <_PyEval_EvalFrameDefault+4947>, 0x7f2c3edd7f6d <_PyEval_EvalFrameDefault+7853>, 0x7f2c3edd9090 <_PyEval_EvalFrameDefault+12240>, 
                0x7f2c3edd9bed <_PyEval_EvalFrameDefault+15149>, 0x7f2c3edd8da9 <_PyEval_EvalFrameDefault+11497>, 0x7f2c3eddd300 <_PyEval_EvalFrameDefault+29248>, 0x7f2c3edd9a22 <_PyEval_EvalFrameDefault+14690>, 
                0x7f2c3edd8da9 <_PyEval_EvalFrameDefault+11497>, 0x7f2c3eddcf8b <_PyEval_EvalFrameDefault+28363>, 0x7f2c3eddd514 <_PyEval_EvalFrameDefault+29780>, 0x7f2c3edd9b21 <_PyEval_EvalFrameDefault+14945>, 
                0x7f2c3edda06f <_PyEval_EvalFrameDefault+16303>, 0x7f2c3edd9fea <_PyEval_EvalFrameDefault+16170>, 0x7f2c3edd92f2 <_PyEval_EvalFrameDefault+12850>, 
                0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566> <repeats 97 times>}
      #12 0x00007f2c3ed26653 in _PyEval_EvalCodeWithName () at /usr/src/debug/Python-3.6.2/Python/ceval.c:4139
              co = 0x7f2c3520e300
              f = Frame 0x560db8f10d48, for file /home/pavel/dev/src/perfrunner/env/lib/python3.6/site-packages/couchbase/bucket.py, line 391, in upsert (self=<Bucket at remote 0x7f2c33080408>, key='key', value={}, cas=0, ttl=0, format=None, persist_to=0, replicate_to=0)
              retval = 0x0
              fastlocals = 0x560db8f10ec0
              freevars = 0x560db8f10f00
              tstate = 0x560db8d09c10
              x = <optimized out>
              u = <optimized out>
              total_args = 8
              i = 0
              n = <optimized out>
              kwdict = <optimized out>
      #13 0x00007f2c3ed5b4c1 in fast_function () at /usr/src/debug/Python-3.6.2/Python/ceval.c:4950
              co = <optimized out>
              globals = <optimized out>
              argdefs = <optimized out>
              kwdefs = 0x0
              closure = 0x0
              name = <optimized out>
              qualname = 'Bucket.upsert'
              d = <optimized out>
              nkwargs = <optimized out>
              nd = <optimized out>
      #14 0x00007f2c3ed9918e in call_function () at /usr/src/debug/Python-3.6.2/Python/ceval.c:4830
              pfunc = 0x7f2c3f31ab98
              func = <function at remote 0x7f2c32560c80>
              x = <optimized out>
              w = <optimized out>
              nargs = 3
              stack = <optimized out>
      #15 0x00007f2c3edd640a in _PyEval_EvalFrameDefault () at /usr/src/debug/Python-3.6.2/Python/ceval.c:3295
              sp = 0x7f2c3f31abb0
              res = <optimized out>
              stack_pointer = <optimized out>
              next_instr = <optimized out>
              opcode = <optimized out>
      ---Type <return> to continue, or q <return> to quit---
              oparg = <optimized out>
              why = <optimized out>
              fastlocals = <optimized out>
              freevars = <optimized out>
              retval = <optimized out>
              tstate = 0x560db8d09c10
              co = <optimized out>
              instr_ub = -1
              instr_lb = 0
              instr_prev = -1
              first_instr = <optimized out>
              names = <optimized out>
              consts = <optimized out>
              opcode_targets = {0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3edd6600 <_PyEval_EvalFrameDefault+1344>, 0x7f2c3edd7495 <_PyEval_EvalFrameDefault+5077>, 
                0x7f2c3edd7dfd <_PyEval_EvalFrameDefault+7485>, 0x7f2c3edd76a0 <_PyEval_EvalFrameDefault+5600>, 0x7f2c3edda64f <_PyEval_EvalFrameDefault+17807>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 
                0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3eddd618 <_PyEval_EvalFrameDefault+30040>, 0x7f2c3eddd3c0 <_PyEval_EvalFrameDefault+29440>, 
                0x7f2c3edd8a24 <_PyEval_EvalFrameDefault+10596>, 0x7f2c3edd787c <_PyEval_EvalFrameDefault+6076>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 
                0x7f2c3edd939a <_PyEval_EvalFrameDefault+13018>, 0x7f2c3eddd752 <_PyEval_EvalFrameDefault+30354>, 0x7f2c3eddd6af <_PyEval_EvalFrameDefault+30191>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 
                0x7f2c3edd842f <_PyEval_EvalFrameDefault+9071>, 0x7f2c3edd74ef <_PyEval_EvalFrameDefault+5167>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3edd7d3d <_PyEval_EvalFrameDefault+7293>, 
                0x7f2c3edd6e2c <_PyEval_EvalFrameDefault+3436>, 0x7f2c3edd702c <_PyEval_EvalFrameDefault+3948>, 0x7f2c3edd6a3d <_PyEval_EvalFrameDefault+2429>, 0x7f2c3edd857d <_PyEval_EvalFrameDefault+9405>, 
                0x7f2c3edd8621 <_PyEval_EvalFrameDefault+9569>, 0x7f2c3edd92f7 <_PyEval_EvalFrameDefault+12855>, 0x7f2c3edd9666 <_PyEval_EvalFrameDefault+13734>, 
                0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566> <repeats 20 times>, 0x7f2c3edda4f1 <_PyEval_EvalFrameDefault+17457>, 0x7f2c3edd97b1 <_PyEval_EvalFrameDefault+14065>, 
                0x7f2c3eddcfff <_PyEval_EvalFrameDefault+28479>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3edd72dc <_PyEval_EvalFrameDefault+4636>, 
                0x7f2c3edd924d <_PyEval_EvalFrameDefault+12685>, 0x7f2c3edd9707 <_PyEval_EvalFrameDefault+13895>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3eddd0e1 <_PyEval_EvalFrameDefault+28705>, 
                0x7f2c3edd718f <_PyEval_EvalFrameDefault+4303>, 0x7f2c3edd87c7 <_PyEval_EvalFrameDefault+9991>, 0x7f2c3edd8981 <_PyEval_EvalFrameDefault+10433>, 0x7f2c3edd80f9 <_PyEval_EvalFrameDefault+8249>, 
                0x7f2c3edd77d9 <_PyEval_EvalFrameDefault+5913>, 0x7f2c3edd8beb <_PyEval_EvalFrameDefault+11051>, 0x7f2c3edd84d8 <_PyEval_EvalFrameDefault+9240>, 0x7f2c3eddd251 <_PyEval_EvalFrameDefault+29073>, 
                0x7f2c3edd6fac <_PyEval_EvalFrameDefault+3820>, 0x7f2c3edd95ef <_PyEval_EvalFrameDefault+13615>, 0x7f2c3edda454 <_PyEval_EvalFrameDefault+17300>, 0x7f2c3edd9137 <_PyEval_EvalFrameDefault+12407>, 
                0x7f2c3edd7592 <_PyEval_EvalFrameDefault+5330>, 0x7f2c3edda312 <_PyEval_EvalFrameDefault+16978>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3edd88de <_PyEval_EvalFrameDefault+10270>, 
                0x7f2c3edda7ad <_PyEval_EvalFrameDefault+18157>, 0x7f2c3edda3ab <_PyEval_EvalFrameDefault+17131>, 0x7f2c3edd9545 <_PyEval_EvalFrameDefault+13445>, 0x7f2c3edd94a0 <_PyEval_EvalFrameDefault+13280>, 
                0x7f2c3edd7ffe <_PyEval_EvalFrameDefault+7998>, 0x7f2c3edd8239 <_PyEval_EvalFrameDefault+8569>, 0x7f2c3edd8313 <_PyEval_EvalFrameDefault+8787>, 0x7f2c3edd6710 <_PyEval_EvalFrameDefault+1616>, 
                0x7f2c3edd986c <_PyEval_EvalFrameDefault+14252>, 0x7f2c3eddd184 <_PyEval_EvalFrameDefault+28868>, 0x7f2c3edd6d81 <_PyEval_EvalFrameDefault+3265>, 0x7f2c3edd6db8 <_PyEval_EvalFrameDefault+3320>, 
                0x7f2c3edd7ca6 <_PyEval_EvalFrameDefault+7142>, 0x7f2c3edd86d1 <_PyEval_EvalFrameDefault+9745>, 0x7f2c3edd797c <_PyEval_EvalFrameDefault+6332>, 0x7f2c3edd9f6c <_PyEval_EvalFrameDefault+16044>, 
                0x7f2c3edd6bc1 <_PyEval_EvalFrameDefault+2817>, 0x7f2c3edd6890 <_PyEval_EvalFrameDefault+2000>, 0x7f2c3edd8b46 <_PyEval_EvalFrameDefault+10886>, 0x7f2c3edd6cde <_PyEval_EvalFrameDefault+3102>, 
                0x7f2c3edda5c9 <_PyEval_EvalFrameDefault+17673>, 0x7f2c3edd9ee4 <_PyEval_EvalFrameDefault+15908>, 0x7f2c3eddd48a <_PyEval_EvalFrameDefault+29642>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 
                0x7f2c3edd6510 <_PyEval_EvalFrameDefault+1104>, 0x7f2c3edd7c02 <_PyEval_EvalFrameDefault+6978>, 0x7f2c3edd6ad5 <_PyEval_EvalFrameDefault+2581>, 0x7f2c3edd7386 <_PyEval_EvalFrameDefault+4806>, 
                0x7f2c3edd9cd1 <_PyEval_EvalFrameDefault+15377>, 0x7f2c3edd7a20 <_PyEval_EvalFrameDefault+6496>, 0x7f2c3edd6480 <_PyEval_EvalFrameDefault+960>, 0x7f2c3edd6660 <_PyEval_EvalFrameDefault+1440>, 
                0x7f2c3edd8c8e <_PyEval_EvalFrameDefault+11214>, 0x7f2c3edd91c5 <_PyEval_EvalFrameDefault+12549>, 0x7f2c3edd6f5a <_PyEval_EvalFrameDefault+3738>, 0x7f2c3edd7913 <_PyEval_EvalFrameDefault+6227>, 
                0x7f2c3edd819e <_PyEval_EvalFrameDefault+8414>, 0x7f2c3edd6820 <_PyEval_EvalFrameDefault+1888>, 0x7f2c3edd6370 <_PyEval_EvalFrameDefault+688>, 0x7f2c3edd69c0 <_PyEval_EvalFrameDefault+2304>, 
                0x7f2c3edd62c0 <_PyEval_EvalFrameDefault+512>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3edd9cb0 <_PyEval_EvalFrameDefault+15344>, 
                0x7f2c3edd7027 <_PyEval_EvalFrameDefault+3943>, 0x7f2c3edd691a <_PyEval_EvalFrameDefault+2138>, 0x7f2c3edd6920 <_PyEval_EvalFrameDefault+2144>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 
                0x7f2c3edd6250 <_PyEval_EvalFrameDefault+400>, 0x7f2c3edd6580 <_PyEval_EvalFrameDefault+1216>, 0x7f2c3edd9414 <_PyEval_EvalFrameDefault+13140>, 0x7f2c3edda6b5 <_PyEval_EvalFrameDefault+17909>, 
                0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3edd8aa0 <_PyEval_EvalFrameDefault+10720>, 0x7f2c3edd63f0 <_PyEval_EvalFrameDefault+816>, 
                0x7f2c3edd76ff <_PyEval_EvalFrameDefault+5695>, 0x7f2c3edd70c4 <_PyEval_EvalFrameDefault+4100>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3edd83b9 <_PyEval_EvalFrameDefault+8953>, 
                0x7f2c3edd6ed7 <_PyEval_EvalFrameDefault+3607>, 0x7f2c3edd8864 <_PyEval_EvalFrameDefault+10148>, 0x7f2c3eddd59e <_PyEval_EvalFrameDefault+29918>, 0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 
                0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566>, 0x7f2c3edd723f <_PyEval_EvalFrameDefault+4479>, 0x7f2c3edd7e5c <_PyEval_EvalFrameDefault+7580>, 0x7f2c3edd7add <_PyEval_EvalFrameDefault+6685>, 
                0x7f2c3edd69a0 <_PyEval_EvalFrameDefault+2272>, 0x7f2c3edd7413 <_PyEval_EvalFrameDefault+4947>, 0x7f2c3edd7f6d <_PyEval_EvalFrameDefault+7853>, 0x7f2c3edd9090 <_PyEval_EvalFrameDefault+12240>, 
                0x7f2c3edd9bed <_PyEval_EvalFrameDefault+15149>, 0x7f2c3edd8da9 <_PyEval_EvalFrameDefault+11497>, 0x7f2c3eddd300 <_PyEval_EvalFrameDefault+29248>, 0x7f2c3edd9a22 <_PyEval_EvalFrameDefault+14690>, 
                0x7f2c3edd8da9 <_PyEval_EvalFrameDefault+11497>, 0x7f2c3eddcf8b <_PyEval_EvalFrameDefault+28363>, 0x7f2c3eddd514 <_PyEval_EvalFrameDefault+29780>, 0x7f2c3edd9b21 <_PyEval_EvalFrameDefault+14945>, 
                0x7f2c3edda06f <_PyEval_EvalFrameDefault+16303>, 0x7f2c3edd9fea <_PyEval_EvalFrameDefault+16170>, 0x7f2c3edd92f2 <_PyEval_EvalFrameDefault+12850>, 
                0x7f2c3eddd43e <_PyEval_EvalFrameDefault+29566> <repeats 97 times>}
      #16 0x00007f2c3eda6357 in _PyEval_EvalCodeWithName (qualname=0x0, name=<optimized out>, closure=<optimized out>, kwdefs=<optimized out>, defcount=<optimized out>, defs=0x0, kwstep=2, kwcount=<optimized out>, 
          kwargs=0x8, kwnames=0x0, argcount=0, args=0x0, 
          locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='loop.py') at remote 0x7f2c3f2ac198>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7f2c3f36b638>, '__file__': 'loop.py', '__cached__': None, 'Bucket': <type at remote 0x560db8f14548>, 'connection_string': 'couchbase://172.23.99.203/bucket-1?password=password', 'b': <Bucket at remote 0x7f2c33080408>}, 
          globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='loop.py') at remote 0x7f2c3f2ac198>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7f2c3f36b638>, '__file__': 'loop.py', '__cached__': None, 'Bucket': <type at remote 0x560db8f14548>, 'connection_string': 'couchbase://172.23.99.203/bucket-1?password=password', 'b': <Bucket at remote 0x7f2c33080408>}, _co=<code at remote 0x7f2c3f233540>) at /usr/src/debug/Python-3.6.2/Python/ceval.c:4139
              co = <optimized out>
              retval = <optimized out>
              fastlocals = <optimized out>
              kwdict = <optimized out>
              tstate = <optimized out>
              x = <optimized out>
              u = <optimized out>
              n = <optimized out>
              f = <optimized out>
              freevars = <optimized out>
              total_args = <optimized out>
              i = <optimized out>
      #17 PyEval_EvalCodeEx () at /usr/src/debug/Python-3.6.2/Python/ceval.c:4160
      No locals.
      #18 0x00007f2c3eda70bb in PyEval_EvalCode (co=co@entry=<code at remote 0x7f2c3f233540>, 
          globals=globals@entry={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='loop.py') at remote 0x7f2c3f2ac198>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7f2c3f36b638>, '__file__': 'loop.py', '__cached__': None, 'Bucket': <type at remote 0x560db8f14548>, 'connection_string': 'couchbase://172.23.99.203/bucket-1?password=password', 'b': <Bucket at remote 0x7f2c33080408>}, 
          locals=locals@entry={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='loop.py') at remote 0x7f2c3f2ac198>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7f2c3f36b638>, '__file__': 'loop.py', '__cached__': None, 'Bucket': <type at remote 0x560db8f14548>, 'connection_string': 'couchbase://172.23.99.203/bucket-1?password=password', 'b': <Bucket at remote 0x7f2c33080408>}) at /usr/src/debug/Python-3.6.2/Python/ceval.c:695
      No locals.
      #19 0x00007f2c3ee2e2e2 in run_mod () at /usr/src/debug/Python-3.6.2/Python/pythonrun.c:980
              co = 0x7f2c3f233540
              v = <optimized out>
      #20 0x00007f2c3ee2ef3d in PyRun_FileExFlags () at /usr/src/debug/Python-3.6.2/Python/pythonrun.c:933
              ret = 0x0
              mod = 0x560db8da59e8
              arena = 0x7f2c3f3032a0
              filename = 'loop.py'
      #21 0x00007f2c3ee31177 in PyRun_SimpleFileExFlags () at /usr/src/debug/Python-3.6.2/Python/pythonrun.c:396
              m = <module at remote 0x7f2c3f2e2b88>
              d = {'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='loop.py') at remote 0x7f2c3f2ac198>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7f2c3f36b638>, '__file__': 'loop.py', '__cached__': None, 'Bucket': <type at remote 0x560db8f14548>, 'connection_string': 'couchbase://172.23.99.203/bucket-1?password=password', 'b': <Bucket at remote 0x7f2c33080408>}
              v = <optimized out>
              ext = <optimized out>
              set_file_name = 1
              ret = -1
              len = <optimized out>
      #22 0x00007f2c3ee31247 in PyRun_AnyFileExFlags () at /usr/src/debug/Python-3.6.2/Python/pythonrun.c:80
      No locals.
      #23 0x00007f2c3ee32173 in run_file (p_cf=0x7ffc04497d6c, filename=0x560db8d09280 L"loop.py", fp=0x560db8d4cf10) at /usr/src/debug/Python-3.6.2/Modules/main.c:342
              unicode = 'loop.py'
              bytes = b'loop.py'
              filename_str = <optimized out>
              run = <optimized out>
      #24 Py_Main () at /usr/src/debug/Python-3.6.2/Modules/main.c:813
              c = <optimized out>
              sts = -1
              command = 0x0
              filename = 0x560db8d09280 L"loop.py"
              module = 0x0
              fp = 0x560db8d4cf10
              p = <optimized out>
              skipfirstline = <optimized out>
              stdin_is_interactive = 1
              help = <optimized out>
              version = <optimized out>
              saw_unbuffered_flag = <optimized out>
              opt = <optimized out>
              cf = {cf_flags = 0}
              main_importer_path = <optimized out>
              warning_option = <optimized out>
              warning_options = <optimized out>
      #25 0x0000560db84dfcf5 in main ()
      

      The real problem is that it's impossible to register any custom signal handler in Python applications with Couchbase SDK. Client library crashes when any signal (e.g., SIGUSR1) is sent to the main thread.

      Attachments

        For Gerrit Dashboard: PYCBC-446
        # Subject Branch Project Status CR V

        Activity

          Ellis.Breen Ellis Breen added a comment -

          Does this still occur with 2.3.0?

          Ellis.Breen Ellis Breen added a comment - Does this still occur with 2.3.0?

          Unfortunately, it does.

          pavelpaulau Pavel Paulau (Inactive) added a comment - Unfortunately, it does.
          Ellis.Breen Ellis Breen added a comment - - edited

          Thanks. Just familiarising myself, but I think 'nremaining' is the number of remaining operations running in a 'multi' operation. Looks like this is not reaching zero before an 'end of job' signal is received (which would normally be sent when the last operation had completed), because the operations are never completed due to receiving the termination signal. Will look into this in more detail shortly.

          Ellis.Breen Ellis Breen added a comment - - edited Thanks. Just familiarising myself, but I think 'nremaining' is the number of remaining operations running in a 'multi' operation. Looks like this is not reaching zero before an 'end of job' signal is received (which would normally be sent when the last operation had completed), because the operations are never completed due to receiving the termination signal. Will look into this in more detail shortly.
          Ellis.Breen Ellis Breen added a comment -

          Pavel Paulau - have you attempted to register custom signal handlers? I was looking at how we could detect early termination due to SIGTERM, for example, and the obvious solution would seem to be registering a signal handler for that, and setting a flag which would bypass the self->nremaining check in such a situation. But if there are multiple signals that could cause early termination then all of those signals would have to be caught. Alternatively we could just skip this specific sanity check in release mode. Trying to think of a more elegant solution, but for the meantime this assertion can be bypassed by setting the "PYCBC_ASSERT_CONTINUE" environment flag.

          Ellis.Breen Ellis Breen added a comment - Pavel Paulau - have you attempted to register custom signal handlers? I was looking at how we could detect early termination due to SIGTERM, for example, and the obvious solution would seem to be registering a signal handler for that, and setting a flag which would bypass the self->nremaining check in such a situation. But if there are multiple signals that could cause early termination then all of those signals would have to be caught. Alternatively we could just skip this specific sanity check in release mode. Trying to think of a more elegant solution, but for the meantime this assertion can be bypassed by setting the "PYCBC_ASSERT_CONTINUE" environment flag.

          Hi Ellis,

          I did have custom handlers (via signal package) in my Python modules but they never get triggered. Usually SDK crashes before any signal handler is invoked.

          PYCBC_ASSERT_CONTINUE is what I am using as a workaround right now.

          pavelpaulau Pavel Paulau (Inactive) added a comment - Hi Ellis, I did have custom handlers (via signal package) in my Python modules but they never get triggered. Usually SDK crashes before any signal handler is invoked. PYCBC_ASSERT_CONTINUE is what I am using as a workaround right now.
          Ellis.Breen Ellis Breen added a comment -

          TODO: discuss solutions to clean/elegant signal handling. Overriding SIGABRT signal handler/fudging assertion is one solution, but probably not the best.

          Ellis.Breen Ellis Breen added a comment - TODO: discuss solutions to clean/elegant signal handling. Overriding SIGABRT signal handler/fudging assertion is one solution, but probably not the best.

          Sorry Pavel Paulau, we're going to have to push this out a bit.  Ellis Breen is going to sync up with you for the next cycle.

          ingenthr Matt Ingenthron added a comment - Sorry Pavel Paulau , we're going to have to push this out a bit.  Ellis Breen is going to sync up with you for the next cycle.

          Updated per schedule planning.

          ingenthr Matt Ingenthron added a comment - Updated per schedule planning.

          People

            Ellis.Breen Ellis Breen
            pavelpaulau Pavel Paulau (Inactive)
            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