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

MagmaMemoryTest.bloom_filter_mem is failing intermittently

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • None
    • storage-engine

    Description

      Job link to one instance of the failure - https://cv.jenkins.couchbase.com/job/magma-ASan-UBSan/11919/testReport/junit/(root)/projectroot/magma_gtest_MagmaMemoryTest/

      =================================================================
      ==104095==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x63200014e828 at pc 0x000000568b83 bp 0x7ffe971ff820 sp 0x7ffe971ff818
      READ of size 8 at 0x63200014e828 thread T0
          #0 0x568b82 in std::__shared_ptr<magma::KVStore, (__gnu_cxx::_Lock_policy)2>::operator bool() const /opt/gcc-10.2.0/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/bits/shared_ptr_base.h:1329:16
          #1 0xcc3842 in magma::KVStoreSet::KVStoreInstance::GetKVStore(unsigned int) /home/couchbase/jenkins/workspace/magma-ASan-UBSan/magma/magma/kvstore_set.cc:190:9
          #2 0xcc5712 in magma::KVStoreSet::KVStoreExists(unsigned short, unsigned int) /home/couchbase/jenkins/workspace/magma-ASan-UBSan/magma/magma/kvstore_set.cc:98:27
          #3 0xd3a0d3 in magma::Magma::Impl::createKVStore(unsigned short, unsigned int, std::shared_ptr<magma::KVStore>&) /home/couchbase/jenkins/workspace/magma-ASan-UBSan/magma/magma/db.cc:325:18
          #4 0xd6f51a in magma::Magma::Impl::WriteDocs(unsigned short, std::vector<magma::Magma::WriteOperation, std::allocator<magma::Magma::WriteOperation> > const&, unsigned int, std::function<void (magma::Magma::WriteOperation const&, bool, magma::Slice)>, std::function<std::pair<magma::Status, std::vector<magma::Magma::WriteOperation, std::allocator<magma::Magma::WriteOperation> > const*> ()>, std::function<bool (magma::Magma::WriteOperation const&, magma::Magma::WriteOperation&)>, magma::Magma::HistoryMode) /home/couchbase/jenkins/workspace/magma-ASan-UBSan/magma/magma/db_write.cc:43:18
          #5 0xd6fdd4 in magma::Magma::WriteDocs(unsigned short, std::vector<magma::Magma::WriteOperation, std::allocator<magma::Magma::WriteOperation> > const&, unsigned int, std::function<void (magma::Magma::WriteOperation const&, bool, magma::Slice)>, std::function<std::pair<magma::Status, std::vector<magma::Magma::WriteOperation, std::allocator<magma::Magma::WriteOperation> > const*> ()>, std::function<bool (magma::Magma::WriteOperation const&, magma::Magma::WriteOperation&)>, magma::Magma::HistoryMode) /home/couchbase/jenkins/workspace/magma-ASan-UBSan/magma/magma/db_write.cc:71:18
          #6 0xf33a4d in magma::TestHarness::Write(magma::Magma&, std::vector<magma::Magma::WriteOperation, std::allocator<magma::Magma::WriteOperation> > const&, magma::Magma::HistoryMode, std::function<void ()>, std::function<bool (magma::Magma::WriteOperation const&, magma::Magma::WriteOperation&)>) /home/couchbase/jenkins/workspace/magma-ASan-UBSan/magma/tests/test_harness.cc:326:15
          #7 0xbe5a96 in MagmaMemoryTest_bloom_filter_mem_Test::TestBody()::$_12::operator()(unsigned long) const /home/couchbase/jenkins/workspace/magma-ASan-UBSan/magma/tests/basic_test.cc:800:13
          #8 0xbe4f4f in MagmaMemoryTest_bloom_filter_mem_Test::TestBody() /home/couchbase/jenkins/workspace/magma-ASan-UBSan/magma/tests/basic_test.cc:829:9
          #9 0x106c5be in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/googletest/googletest-prefix/src/googletest/googletest/src/gtest.cc:2612:29
          #10 0x106c5be in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/googletest/googletest-prefix/src/googletest/googletest/src/gtest.cc:2648:52
          #11 0x105efff in testing::Test::Run() (.part.0) /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/googletest/googletest-prefix/src/googletest/googletest/src/gtest.cc:2687:5
          #12 0x105f269 in testing::Test::Run() /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/googletest/googletest-prefix/src/googletest/googletest/src/gtest.cc:2678:27
          #13 0x105f269 in testing::TestInfo::Run() /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/googletest/googletest-prefix/src/googletest/googletest/src/gtest.cc:2836:14
          #14 0x106135a in testing::TestSuite::Run() (.part.0) /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/googletest/googletest-prefix/src/googletest/googletest/src/gtest.cc:3015:20
          #15 0x10647e3 in testing::TestSuite::Run() /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/googletest/googletest-prefix/src/googletest/googletest/src/gtest.cc:2969:22
          #16 0x10647e3 in testing::internal::UnitTestImpl::RunAllTests() /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/googletest/googletest-prefix/src/googletest/googletest/src/gtest.cc:5920:47
          #17 0x106ca0e in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/googletest/googletest-prefix/src/googletest/googletest/src/gtest.cc:2612:29
          #18 0x106ca0e in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/googletest/googletest-prefix/src/googletest/googletest/src/gtest.cc:2648:52
          #19 0x105f32f in testing::UnitTest::Run() /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/googletest/googletest-prefix/src/googletest/googletest/src/gtest.cc:5484:36
          #20 0xbcb9f5 in main /home/couchbase/jenkins/workspace/magma-ASan-UBSan/magma/tests/tests_main.cc:50:12
          #21 0x7f8d9fb4d554 in __libc_start_main /usr/src/debug/glibc-2.17-c758a686/csu/../csu/libc-start.c:266
          #22 0x4844fd in _start (/home/couchbase/jenkins/workspace/magma-ASan-UBSan/build/magma/magma_gtest+0x4844fd)
       
      0x63200014e828 is located 40 bytes to the right of 90112-byte region [0x632000138800,0x63200014e800)
      allocated by thread T0 here:
          #0 0x557a37 in operator new(unsigned long) /tmp/llvm-project/compiler-rt/lib/asan/asan_new_delete.cc:99:3
          #1 0xd9ad06 in std::_Vector_base<magma::KVStoreSet::KVStoreInstance, std::allocator<magma::KVStoreSet::KVStoreInstance> >::_M_create_storage(unsigned long) /opt/gcc-10.2.0/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/bits/stl_vector.h:361:33
          #2 0xd9a944 in std::_Vector_base<magma::KVStoreSet::KVStoreInstance, std::allocator<magma::KVStoreSet::KVStoreInstance> >::_Vector_base(unsigned long, std::allocator<magma::KVStoreSet::KVStoreInstance> const&) /opt/gcc-10.2.0/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/bits/stl_vector.h:305:9
          #3 0xd9a6e0 in std::vector<magma::KVStoreSet::KVStoreInstance, std::allocator<magma::KVStoreSet::KVStoreInstance> >::vector(unsigned long, std::allocator<magma::KVStoreSet::KVStoreInstance> const&) /opt/gcc-10.2.0/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/bits/stl_vector.h:511:9
          #4 0xd83d4f in magma::KVStoreSet::KVStoreSet(magma::Magma::Config const&, magma::Logger*) /home/couchbase/jenkins/workspace/magma-ASan-UBSan/magma/magma/kvstore_set.h:34:11
          #5 0xd340f2 in magma::Magma::Impl::Impl(magma::Magma::Config&) /home/couchbase/jenkins/workspace/magma-ASan-UBSan/magma/magma/db.cc:51:7
          #6 0xd3530c in magma::Magma::Magma(magma::Magma::Config&) /home/couchbase/jenkins/workspace/magma-ASan-UBSan/magma/magma/db.cc:97:16
          #7 0xbe54df in MagmaMemoryTest_bloom_filter_mem_Test::TestBody()::$_12::operator()(unsigned long) const /home/couchbase/jenkins/workspace/magma-ASan-UBSan/magma/tests/basic_test.cc:788:15
          #8 0xbe4f4f in MagmaMemoryTest_bloom_filter_mem_Test::TestBody() /home/couchbase/jenkins/workspace/magma-ASan-UBSan/magma/tests/basic_test.cc:829:9
          #9 0x106c5be in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/googletest/googletest-prefix/src/googletest/googletest/src/gtest.cc:2612:29
          #10 0x106c5be in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/googletest/googletest-prefix/src/googletest/googletest/src/gtest.cc:2648:52
       
      SUMMARY: AddressSanitizer: heap-buffer-overflow /opt/gcc-10.2.0/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/bits/shared_ptr_base.h:1329:16 in std::__shared_ptr<magma::KVStore, (__gnu_cxx::_Lock_policy)2>::operator bool() const
      Shadow bytes around the buggy address:
        0x0c6480021cb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
        0x0c6480021cc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
        0x0c6480021cd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
        0x0c6480021ce0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
        0x0c6480021cf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      =>0x0c6480021d00: fa fa fa fa fa[fa]fa fa fa fa fa fa fa fa fa fa
        0x0c6480021d10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
        0x0c6480021d20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
        0x0c6480021d30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
        0x0c6480021d40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
        0x0c6480021d50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
      Shadow byte legend (one shadow byte represents 8 application bytes):
        Addressable:           00
        Partially addressable: 01 02 03 04 05 06 07 
        Heap left redzone:       fa
        Freed heap region:       fd
        Stack left redzone:      f1
        Stack mid redzone:       f2
        Stack right redzone:     f3
        Stack after return:      f5
        Stack use after scope:   f8
        Global redzone:          f9
        Global init order:       f6
        Poisoned by user:        f7
        Container overflow:      fc
        Array cookie:            ac
        Intra object redzone:    bb
        ASan internal:           fe
        Left alloca redzone:     ca
        Right alloca redzone:    cb
        Shadow gap:              cc
      ==104095==ABORTING
      

      Attachments

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

        Activity

          People

            apaar.gupta Apaar Gupta
            apaar.gupta Apaar Gupta
            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