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

Node js throws parent cluster object has been closed when doing KV or Query ops

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 3.2.0
    • 3.1.3
    • None
    • None
    • 1

    Description

      While running a node js application (Greenboard) on 3.1.3, we are seeing following error while running any KV operation or query operations at times.

      1. Clone this repo: https://github.com/bharath-gp/greenboard.git
      2. Checkout sdk3 branch (Important)
      3. Build the project using following commands:
      4. npm install
      5. cd app
      6. npm install
      7. bower install
      8. ./node_modules/.bin/grunt
      9. cd ..
      10. cat << EOF > jenkinsCredentials.json

      {

          "http://qa.sc.couchbase.com":

      {         "username": "qeinfra",         "password": "2090b7e100a0c3f0ce4d48ae83ebc08b"     }

      }

      EOF

      1. Run the project from source folder by running “node index.js”
      2. Go to http://127.0.0.1:8205

       

      The above project is already pointing to the cluster with 7.0 RC5 build installed and all the required buckets in them. The cluster can be found at http://172.23.120.147:8091/ (Username: Administrator password: password).

       

      Error seen:

      Error: parent cluster object has been closed
          at Connection._maybeBFwd (/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/lib/connection.js:227:13)
          at Connection.get (/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/lib/connection.js:272:10)
          at /Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/lib/collection.js:228:18
          at /Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/lib/promisehelper.js:30:7
          at new Promise (<anonymous>)
          at Function.wrap (/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/lib/promisehelper.js:29:12)
          at Collection.get (/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/lib/collection.js:227:26)
          at _getmulti (/Users/bharathgp/greenboard/bharath/greenboard/cbclient.js:113:30)
          at getJobs (/Users/bharathgp/greenboard/bharath/greenboard/cbclient.js:287:24)
          at Object.jobsForBuild (/Users/bharathgp/greenboard/bharath/greenboard/cbclient.js:508:24)
      #
      # Fatal error in , line 0
      # Check failed: AllowJavascriptExecution::IsAllowed(isolate).
      #
      #
      #
      #FailureMessage Object: 0x7ffeefbf5980
       1: 0x1000da6cc node::NodePlatform::GetStackTracePrinter()::$_3::__invoke() [/usr/local/bin/node]
       2: 0x100db0962 V8_Fatal(char const*, ...) [/usr/local/bin/node]
       3: 0x1002afdc9 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/usr/local/bin/node]
       4: 0x1002af86b v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) [/usr/local/bin/node]
       5: 0x1001a3420 v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) [/usr/local/bin/node]
       6: 0x100001b22 node::InternalMakeCallback(node::Environment*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context) [/usr/local/bin/node]
       7: 0x100001d1e node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context) [/usr/local/bin/node]
       8: 0x103d0b5ff Nan::Callback::Call_(v8::Isolate*, v8::Local<v8::Object>, int, v8::Local<v8::Value>*, Nan::AsyncResource*) const [/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/build/Release/couchbase_impl.node]
       9: 0x103d16aba couchnode::Logger::handler(unsigned int, char const*, int, char const*, int, char const*, __va_list_tag*) [/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/build/Release/couchbase_impl.node]
      10: 0x103d165ed couchnode::Logger::lcbHandler(lcb_LOGGER_ const*, unsigned long long, char const*, lcb_LOG_SEVERITY, char const*, int, char const*, __va_list_tag*) [/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/build/Release/couchbase_impl.node]
      11: 0x103d76e83 lcb_log [/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/build/Release/couchbase_impl.node]
      12: 0x103d37f07 lcb::Server::finalize_errored_ctx() [/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/build/Release/couchbase_impl.node]
      13: 0x103d738da lcb_destroy [/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/build/Release/couchbase_impl.node]
      14: 0x103d13470 couchnode::Connection::~Connection() [/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/build/Release/couchbase_impl.node]
      15: 0x103d1355a couchnode::Connection::~Connection() [/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/build/Release/couchbase_impl.node]
      16: 0x1002dbaaf unsigned long v8::internal::GlobalHandles::InvokeFirstPassWeakCallbacks<v8::internal::GlobalHandles::Node>(std::__1::vector<std::__1::pair<v8::internal::GlobalHandles::Node*, v8::internal::GlobalHandles::PendingPhantomCallback>, std::__1::allocator<std::__1::pair<v8::internal::GlobalHandles::Node*, v8::internal::GlobalHandles::PendingPhantomCallback> > >*) [/usr/local/bin/node]
      17: 0x1002dba03 v8::internal::GlobalHandles::InvokeFirstPassWeakCallbacks() [/usr/local/bin/node]
      18: 0x100312150 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/local/bin/node]
      19: 0x10031026e v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/bin/node]
      20: 0x10031c13a v8::internal::Heap::AllocateRawWithLightRetry(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/bin/node]
      21: 0x10031c1c1 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/bin/node]
      22: 0x1002ebe6f v8::internal::Factory::NewRawOneByteString(int, v8::internal::AllocationType) [/usr/local/bin/node]
      23: 0x1002ebf86 v8::internal::Factory::NewStringFromUtf8(v8::internal::Vector<char const> const&, v8::internal::AllocationType) [/usr/local/bin/node]
      24: 0x1001a8e82 v8::String::NewFromUtf8(v8::Isolate*, char const*, v8::NewStringType, int) [/usr/local/bin/node]
      25: 0x103d16a0d couchnode::Logger::handler(unsigned int, char const*, int, char const*, int, char const*, __va_list_tag*) [/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/build/Release/couchbase_impl.node]
      26: 0x103d165ed couchnode::Logger::lcbHandler(lcb_LOGGER_ const*, unsigned long long, char const*, lcb_LOG_SEVERITY, char const*, int, char const*, __va_list_tag*) [/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/build/Release/couchbase_impl.node]
      27: 0x103d76e83 lcb_log [/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/build/Release/couchbase_impl.node]
      28: 0x103d1f0eb lcb::clconfig::Confmon::do_set_next(lcb::clconfig::ConfigInfo*, bool) [/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/build/Release/couchbase_impl.node]
      29: 0x103d1f75c lcb::clconfig::Confmon::provider_got_config(lcb::clconfig::Provider*, lcb::clconfig::ConfigInfo*) [/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/build/Release/couchbase_impl.node]
      30: 0x103d18905 CccpProvider::update(char const*, char const*) [/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/build/Release/couchbase_impl.node]
      31: 0x103d18bff lcb::clconfig::cccp_update(void const*, lcb_STATUS, void const*, unsigned long, lcb_host_st const*) [/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/build/Release/couchbase_impl.node]
      32: 0x103d6c477 ext_callback_proxy(mc_pipeline_st*, mc_packet_st*, lcb_STATUS, void const*) [/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/build/Release/couchbase_impl.node]
      33: 0x103d6cdea mcreq_dispatch_response [/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/build/Release/couchbase_impl.node]
      34: 0x103d364a5 lcb::Server::try_read(lcbio_CTX*, rdb_IOROPE*) [/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/build/Release/couchbase_impl.node]
      35: 0x103d375cd on_read(lcbio_CTX*, unsigned int) [/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/build/Release/couchbase_impl.node]
      36: 0x103d2eac9 Cr_handler(lcb_sockdata_st*, long, void*) [/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/build/Release/couchbase_impl.node]
      37: 0x103d18015 read_cb(uv_stream_s*, long, uv_buf_t const*) [/Users/bharathgp/greenboard/bharath/greenboard/node_modules/couchbase/build/Release/couchbase_impl.node]
      38: 0x1008f13f0 uv__stream_io [/usr/local/bin/node]
      39: 0x1008f85a2 uv__io_poll [/usr/local/bin/node]
      40: 0x1008e91d6 uv_run [/usr/local/bin/node]
      41: 0x1000ba22e node::NodeMainInstance::Run() [/usr/local/bin/node]
      42: 0x100061d41 node::Start(int, char**) [/usr/local/bin/node]
      43: 0x7fff203ccf3d start [/usr/lib/system/libdyld.dylib]
      44: 0x2 
       
      
      

      This is blocking the greenboard systems to be upgraded to the latest 7.0 build.

      Attachments

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

        Activity

          People

            brett19 Brett Lawson
            bharath.gp Bharath G P
            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