yugabyte / yugabyte-db

YugabyteDB - the cloud native distributed SQL database for mission-critical applications.
https://www.yugabyte.com
Other
9.04k stars 1.08k forks source link

[DocDB] undefined behavior in AutomaticTabletSplitITest.AutomaticTabletSplittingMovesToNextPhase #14229

Closed bmatican closed 2 years ago

bmatican commented 2 years ago

Jira Link: DB-3689

Description

https://detective-gcp.dev.yugabyte.com/stability/test?branch=master&build_type=all&class=AutomaticTabletSplitITest&fail_tag=undefined_behavior&name=AutomaticTabletSplittingMovesToNextPhase&platform=linux

../../src/yb/integration-tests/tablet-split-itest-base.cc:289:5: runtime error: member call on null pointer of type 'yb::tablet::Tablet'
    #0 0x7f04e8592c69 in yb::TabletSplitITest::WaitForTableIntentsApplied(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_1::operator()() const ${BUILD_ROOT}/../../src/yb/integration-tests/tablet-split-itest-base.cc:289:5
    #1 0x7f04e8592c69 in decltype(static_cast<yb::TabletSplitITest::WaitForTableIntentsApplied(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_1&>(fp)()) std::__1::__invoke<yb::TabletSplitITest::WaitForTableIntentsApplied(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_1&>(yb::TabletSplitITest::WaitForTableIntentsApplied(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_1&) /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20220924220949-f77b91747b-almalinux8-x86_64-clang13/installed/asan/libcxx/include/c++/v1/type_traits:3918:1
    #2 0x7f04e8592951 in yb::Result<bool> std::__1::__invoke_void_return_wrapper<yb::Result<bool>, false>::__call<yb::TabletSplitITest::WaitForTableIntentsApplied(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_1&>(yb::TabletSplitITest::WaitForTableIntentsApplied(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_1&) /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20220924220949-f77b91747b-almalinux8-x86_64-clang13/installed/asan/libcxx/include/c++/v1/__functional/invoke.h:30:16
    #3 0x7f04e8592951 in std::__1::__function::__alloc_func<yb::TabletSplitITest::WaitForTableIntentsApplied(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_1, std::__1::allocator<yb::TabletSplitITest::WaitForTableIntentsApplied(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_1>, yb::Result<bool> ()>::operator()() /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20220924220949-f77b91747b-almalinux8-x86_64-clang13/installed/asan/libcxx/include/c++/v1/__functional/function.h:171:16
    #4 0x7f04e8592951 in std::__1::__function::__func<yb::TabletSplitITest::WaitForTableIntentsApplied(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_1, std::__1::allocator<yb::TabletSplitITest::WaitForTableIntentsApplied(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_1>, yb::Result<bool> ()>::operator()() /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20220924220949-f77b91747b-almalinux8-x86_64-clang13/installed/asan/libcxx/include/c++/v1/__functional/function.h:345:12
    #5 0x7f04da257e4d in std::__1::__function::__value_func<yb::Result<bool> ()>::operator()() const /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20220924220949-f77b91747b-almalinux8-x86_64-clang13/installed/asan/libcxx/include/c++/v1/__functional/function.h:498:16
    #6 0x7f04da25420d in std::__1::function<yb::Result<bool> ()>::operator()() const /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20220924220949-f77b91747b-almalinux8-x86_64-clang13/installed/asan/libcxx/include/c++/v1/__functional/function.h:1175:12
    #7 0x7f04da25420d in yb::Wait(std::__1::function<yb::Result<bool> ()> const&, std::__1::chrono::time_point<yb::CoarseMonoClock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::MonoDelta, double, yb::MonoDelta) ${BUILD_ROOT}/../../src/yb/util/test_util.cc:283:26
    #8 0x7f04da254a5c in yb::Wait(std::__1::function<yb::Result<bool> ()> const&, yb::MonoTime, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::MonoDelta, double, yb::MonoDelta) ${BUILD_ROOT}/../../src/yb/util/test_util.cc:312:10
    #9 0x7f04da254f95 in yb::WaitFor(std::__1::function<yb::Result<bool> ()> const&, yb::MonoDelta, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::MonoDelta, double, yb::MonoDelta) ${BUILD_ROOT}/../../src/yb/util/test_util.cc:337:10
    #10 0x7f04e857e009 in yb::TabletSplitITest::WaitForTableIntentsApplied(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) ${BUILD_ROOT}/../../src/yb/integration-tests/tablet-split-itest-base.cc:289:5
    #11 0x7f04e85a2fe3 in yb::TabletSplitITestBase<yb::MiniCluster>::WriteRowsAndFlush(yb::client::TableHandle*, unsigned int, int, bool) ${BUILD_ROOT}/../../src/yb/integration-tests/tablet-split-itest-base.cc:318:5
    #12 0x7f04e85a349c in yb::TabletSplitITestBase<yb::MiniCluster>::WriteRowsAndFlush(unsigned int, int, bool) ${BUILD_ROOT}/../../src/yb/integration-tests/tablet-split-itest-base.cc:328:10
    #13 0x2fda06 in yb::AutomaticTabletSplitITest_AutomaticTabletSplittingMovesToNextPhase_Test::TestBody() ${BUILD_ROOT}/../../src/yb/integration-tests/tablet-split-itest.cc:1348:5
    #14 0x7f04da0d32ef in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20220924220949-f77b91747b-almalinux8-x86_64-clang13/src/googletest-1.12.1/googletest/src/gtest.cc:2599:10
    #15 0x7f04da0d32ef in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20220924220949-f77b91747b-almalinux8-x86_64-clang13/src/googletest-1.12.1/googletest/src/gtest.cc:2635:14
    #16 0x7f04da086bc2 in testing::Test::Run() /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20220924220949-f77b91747b-almalinux8-x86_64-clang13/src/googletest-1.12.1/googletest/src/gtest.cc:2674:5
    #17 0x7f04da08890f in testing::TestInfo::Run() /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20220924220949-f77b91747b-almalinux8-x86_64-clang13/src/googletest-1.12.1/googletest/src/gtest.cc:2853:11
    #18 0x7f04da08aea0 in testing::TestSuite::Run() /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20220924220949-f77b91747b-almalinux8-x86_64-clang13/src/googletest-1.12.1/googletest/src/gtest.cc:3012:30
    #19 0x7f04da0b2736 in testing::internal::UnitTestImpl::RunAllTests() /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20220924220949-f77b91747b-almalinux8-x86_64-clang13/src/googletest-1.12.1/googletest/src/gtest.cc:5870:44
    #20 0x7f04da0d7e3a in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20220924220949-f77b91747b-almalinux8-x86_64-clang13/src/googletest-1.12.1/googletest/src/gtest.cc:2599:10
    #21 0x7f04da0d7e3a in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20220924220949-f77b91747b-almalinux8-x86_64-clang13/src/googletest-1.12.1/googletest/src/gtest.cc:2635:14
    #22 0x7f04da0b136c in testing::UnitTest::Run() /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20220924220949-f77b91747b-almalinux8-x86_64-clang13/src/googletest-1.12.1/googletest/src/gtest.cc:5444:10
    #23 0x7f04e93726e0 in RUN_ALL_TESTS() /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20220924220949-f77b91747b-almalinux8-x86_64-clang13/installed/asan/include/gtest/gtest.h:2293:73
    #24 0x7f04e93726e0 in main ${BUILD_ROOT}/../../src/yb/util/test_main.cc:109:13
    #25 0x7f04d4dafcf2 in __libc_start_main (/lib64/libc.so.6+0x3acf2)
    #26 0x2c9fdd in _start (${BUILD_ROOT}/tests-integration-tests/tablet-split-itest+0x2c9fdd)
bmatican commented 2 years ago

Passing to @yusong-yan as he was investigating an unrelated test issue, but observed the same stack already

yusong-yan commented 2 years ago

Fixed issue [Github Commit]