Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-54161

[IOBuf.cpp:1049] Check failed: !isSharedOne() in ASyncClientConnection

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • master
    • master
    • memcached
    • None
    • Untriaged
    • 1
    • Unknown

    Description

      As part of testing pause / resume and use of folly CancellationToken, I rebuilt folly with Debug assertions enabled, and linked to the debug version when building CB Server with Build Type == Debug (see MB-54162).

      When doing so I see the following failure in serverless test:

      [==========] Running 376 tests from 5 test suites.
      [----------] Global test environment set-up.
      [----------] 2 tests from ConfigOnlyTest
      [ RUN      ] ConfigOnlyTest.SetClusterConfigCreatesBucket
      [       OK ] ConfigOnlyTest.SetClusterConfigCreatesBucket (141 ms)
      [ RUN      ] ConfigOnlyTest.DeleteClusterConfigBucket
      [       OK ] ConfigOnlyTest.DeleteClusterConfigBucket (21 ms)
      [----------] 2 tests from ConfigOnlyTest (163 ms total)
       
      [----------] 2 tests from DcpTest
      [ RUN      ] DcpTest.DcpDrainNoMeterNoThrottle
      F1017 14:34:26.187288 43943424 IOBuf.cpp:1049] Check failed: !isSharedOne() 
      *** Check failure stack trace: ***
          @        0x1007f173f  google::LogMessageFatal::~LogMessageFatal()
          @        0x1007ee1e9  google::LogMessageFatal::~LogMessageFatal()
          @        0x1005bc152  folly::IOBuf::reserveSlow()
          @        0x1002a0805  folly::IOBuf::reserve()
          @        0x1002630ff  AsyncClientConnectionImpl::getReadBuffer()
          @        0x10060c79e  folly::AsyncSocket::prepareReadBuffer()
          @        0x10060daa2  folly::AsyncSocket::processNormalRead()
          @        0x10060ef2e  folly::AsyncSocket::handleRead()
          @        0x10060b8fa  folly::AsyncSocket::ioReady()
          @        0x100615e97  folly::AsyncSocket::IoHandler::handlerReady()
          @        0x10066153c  folly::EventHandler::libeventCallback()
          @        0x10d926a75  event_process_active_single_queue
          @        0x10d92339e  event_base_loop
          @        0x10064862f  (anonymous namespace)::EventBaseBackend::eb_event_base_loop()
          @        0x10063c0ff  folly::EventBase::loopBody()
          @        0x10063ba67  folly::EventBase::loop()
          @        0x10063e332  folly::EventBase::loopForever()
          @        0x100263d69  AsyncClientConnectionImpl::execute()
          @        0x100264a13  AsyncClientConnection::authenticate()
          @        0x1000433e4  cb::test::DcpDrain::drain()
          @        0x1000536b0  cb::test::DcpTest_DcpDrainNoMeterNoThrottle_Test::TestBody()
          @        0x1003fbd98  testing::internal::HandleExceptionsInMethodIfSupported<>()
          @        0x1003fbced  testing::Test::Run()
          @        0x1003fd0ff  testing::TestInfo::Run()
          @        0x1003fdae7  testing::TestSuite::Run()
          @        0x10040ef57  testing::internal::UnitTestImpl::RunAllTests()
          @        0x10040e858  testing::internal::HandleExceptionsInMethodIfSupported<>()
          @        0x10040e7dc  testing::UnitTest::Run()
          @        0x10006feb1  RUN_ALL_TESTS()
          @        0x10006fac5  main
      

      Note: To see the backtrace here one needs to initialise folly fully:

      diff --git a/tests/testapp_serverless/main.cc b/tests/testapp_serverless/main.cc
      index a22ba0040..1677e01aa 100644
      --- a/tests/testapp_serverless/main.cc
      +++ b/tests/testapp_serverless/main.cc
      @@ -14,6 +14,7 @@
       #include <cluster_framework/bucket.h>
       #include <cluster_framework/cluster.h>
       #include <event2/thread.h>
      +#include <folly/init/Init.h>
       #include <folly/portability/GTest.h>
       #include <folly/portability/Stdlib.h>
       #include <getopt.h>
      @@ -185,6 +186,12 @@ int main(int argc, char** argv) {
           setupWindowsDebugCRTAssertHandling();
           cb::net::initialize();
       
      +    folly::InitOptions follyOptions;
      +    follyOptions.fatalSignals(0);
      +    follyOptions.useGFlags(false);
      +    folly::init(0, nullptr, follyOptions);
      +
      +
       #if defined(EVTHREAD_USE_WINDOWS_THREADS_IMPLEMENTED)
           const auto failed = evthread_use_windows_threads() == -1;
       #elif defined(EVTHREAD_USE_PTHREADS_IMPLEMENTED)
      

      Attachments

        For Gerrit Dashboard: MB-54161
        # Subject Branch Project Status CR V

        Activity

          People

            drigby Dave Rigby (Inactive)
            drigby Dave Rigby (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty