Uploaded image for project: 'Couchbase node.js Client Library'
  1. Couchbase node.js Client Library
  2. JSCBC-673

SEGFAULT after `cluster.close()`

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 3.0.1
    • 3.0.0
    • library
    • None
    • nodejs 12.13.1
    • 1
    • Critical

    Description

      Scope, Collection and Bucket classes holds a reference to Connection. When all the connections are closed on the cluster, these classes mantains the reference to a destroyed connection, causing a SEGFAULT.

      ```javascript 

      const cluster = new cb.Cluster('...');
      const bucket = cluster.bucket('default');
      const collection = bucket.defaultCollection()

      const r1 = await collection.get('...')
      console.log('response 1', r1)

      await cluster.close(); // close all connections

      //await cluster._connect() // <--- SEGFAULT here

      const r2 = await collection.get('...') // <--- SEGFAULT here
      console.log('response 2', r2)

      ```

      Attachments

        Activity

          People

            brett19 Brett Lawson
            jdavidls J.David Luque Sanguino
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty