pingcap / pingcap/tiflash

Segmentation fault (core dumped) when executing unit test `gtests_dbms`

Open
#4,337 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

affects-6.0 affects-6.1 component/storage severity/minor type/bug
Dominant language
C++
Stars
1k
Forks
423
Avg merge
1d 15h
Merged PRs (30d)
24

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)
cmake ~/projects/tics -DCMAKE_BUILD_TYPE=DEBUG -DENABLE_TESTS=ON
make tiflash -j
make gtests_dbms
./dbms/gtests_dbms
2. What did you expect to see? (Required)

Pass all unit tests

3. What did you see instead (Required)
...
[ RUN      ] DatabaseTiFlashTest.RenameTableBetweenDatabase
[2022/03/17 21:19:56.741 +08:00] [INFO] [DatabaseTiFlash.cpp:106] ["DatabaseTiFlash (db_1):Total 0 tables in database db_1"] [thread_id=1]
[2022/03/17 21:19:56.741 +08:00] [INFO] [DatabasesCommon.cpp:353] ["DatabaseTiFlash (db_1):Starting up 0 tables."] [thread_id=1]
[2022/03/17 21:19:56.742 +08:00] [INFO] [DatabaseTiFlash.cpp:106] ["DatabaseTiFlash (db_2):Total 0 tables in database db_2"] [thread_id=1]
[2022/03/17 21:19:56.742 +08:00] [INFO] [DatabasesCommon.cpp:353] ["DatabaseTiFlash (db_2):Starting up 0 tables."] [thread_id=1]
[2022/03/17 21:19:56.745 +08:00] [INFO] [StorageDeltaMerge.cpp:93] ["StorageDeltaMerge:updateTableColumnInfo: TableName t_111 ordinary columns format version: 1\n3 columns:\n`c_custkey` Int32\n`c_acctbal` Decimal(15,2)\n`c_comment` String\n materialized columns format version: 1\n0 columns:\n"] [thread_id=1]
[2022/03/17 21:19:56.747 +08:00] [INFO] [DeltaMergeStore.cpp:201] ["DeltaMergeStore[db_1.t_111]:Restore DeltaMerge Store start [db_1.t_111]"] [thread_id=1]
[2022/03/17 21:19:56.747 +08:00] [DEBUG] [DeltaMergeStore.cpp:2143] ["DeltaMergeStore[db_1.t_111]:Loading dt files"] [thread_id=1]
[2022/03/17 21:19:56.748 +08:00] [INFO] [PageStorage.cpp:186] ["PageStorage:db_1.t_111.log begin to restore data from disk. [path=/data1/qiuyang/ti/tmp/data/t_111/log] [num_writers=4]"] [thread_id=1]
[2022/03/17 21:19:56.748 +08:00] [DEBUG] [PageStorage.cpp:438] ["PageStorage:db_1.t_111.log create new PageFile_1_0 for write [path=/data1/qiuyang/ti/tmp/data/t_111/log]"] [thread_id=1]
[2022/03/17 21:19:56.748 +08:00] [DEBUG] [PageStorage.cpp:438] ["PageStorage:db_1.t_111.log create new PageFile_2_0 for write [path=/data1/qiuyang/ti/tmp/data/t_111/log]"] [thread_id=1]
[2022/03/17 21:19:56.749 +08:00] [DEBUG] [PageStorage.cpp:438] ["PageStorage:db_1.t_111.log create new PageFile_3_0 for write [path=/data1/qiuyang/ti/tmp/data/t_111/log]"] [thread_id=1]
[2022/03/17 21:19:56.749 +08:00] [DEBUG] [PageStorage.cpp:438] ["PageStorage:db_1.t_111.log create new PageFile_4_0 for write [path=/data1/qiuyang/ti/tmp/data/t_111/log]"] [thread_id=1]
[2022/03/17 21:19:56.749 +08:00] [INFO] [PageStorage.cpp:340] ["PageStorage:db_1.t_111.log restore 0 pages, write batch sequence: 0, 0 puts and 0 refs and 0 deletes and 0 upserts"] [thread_id=1]
[2022/03/17 21:19:56.749 +08:00] [INFO] [PageStorage.cpp:186] ["PageStorage:db_1.t_111.data begin to restore data from disk. [path=/data1/qiuyang/ti/tmp/data/t_111/data] [num_writers=1]"] [thread_id=1]
[2022/03/17 21:19:56.750 +08:00] [DEBUG] [PageStorage.cpp:438] ["PageStorage:db_1.t_111.data create new PageFile_1_0 for write [path=/data1/qiuyang/ti/tmp/data/t_111/data]"] [thread_id=1]
[2022/03/17 21:19:56.750 +08:00] [INFO] [PageStorage.cpp:340] ["PageStorage:db_1.t_111.data restore 0 pages, write batch sequence: 0, 0 puts and 0 refs and 0 deletes and 0 upserts"] [thread_id=1]
[2022/03/17 21:19:56.750 +08:00] [INFO] [PageStorage.cpp:186] ["PageStorage:db_1.t_111.meta begin to restore data from disk. [path=/data1/qiuyang/ti/tmp/data/t_111/meta] [num_writers=2]"] [thread_id=1]
[2022/03/17 21:19:56.750 +08:00] [DEBUG] [PageStorage.cpp:438] ["PageStorage:db_1.t_111.meta create new PageFile_1_0 for write [path=/data1/qiuyang/ti/tmp/data/t_111/meta]"] [thread_id=1]
[2022/03/17 21:19:56.751 +08:00] [DEBUG] [PageStorage.cpp:438] ["PageStorage:db_1.t_111.meta create new PageFile_2_0 for write [path=/data1/qiuyang/ti/tmp/data/t_111/meta]"] [thread_id=1]
[2022/03/17 21:19:56.751 +08:00] [INFO] [PageStorage.cpp:340] ["PageStorage:db_1.t_111.meta restore 0 pages, write batch sequence: 0, 0 puts and 0 refs and 0 deletes and 0 upserts"] [thread_id=1]
[2022/03/17 21:19:56.751 +08:00] [TRACE] [<unknown>] [DeltaTree:create] [thread_id=1]
Segmentation fault (core dumped)
4. What is your TiFlash version? (Required)

commit d733a9e9640050b2abbba1d1de27ba22245760ef

5. Other dependency

CentOS Linux release 7.9.2009 (Core)
cmake3 version 3.17.5
GNU Make 3.82
rustc 1.61.0-nightly
Clang version 14.0.0
TiFlash Development Environment:release-centos7-llvm/env

6. Debug the dumped core file
> lldb dbms/gtests_dbms
(lldb) r
...
[ RUN      ] DatabaseTiFlashTest.RenameTableBetweenDatabase
[2022/03/17 21:07:00.218 +08:00] [INFO] [DatabaseTiFlash.cpp:106] ["DatabaseTiFlash (db_1):Total 0 tables in database db_1"] [thread_id=1]
[2022/03/17 21:07:00.218 +08:00] [INFO] [DatabasesCommon.cpp:353] ["DatabaseTiFlash (db_1):Starting up 0 tables."] [thread_id=1]
[2022/03/17 21:07:00.219 +08:00] [INFO] [DatabaseTiFlash.cpp:106] ["DatabaseTiFlash (db_2):Total 0 tables in database db_2"] [thread_id=1]
[2022/03/17 21:07:00.219 +08:00] [INFO] [DatabasesCommon.cpp:353] ["DatabaseTiFlash (db_2):Starting up 0 tables."] [thread_id=1]
[2022/03/17 21:07:00.222 +08:00] [INFO] [StorageDeltaMerge.cpp:93] ["StorageDeltaMerge:updateTableColumnInfo: TableName t_111 ordinary columns format version: 1\n3 columns:\n`c_custkey` Int32\n`c_acctbal` Decimal(15,2)\n`c_comment` String\n materialized columns format version: 1\n0 columns:\n"] [thread_id=1]
[2022/03/17 21:07:00.229 +08:00] [INFO] [DeltaMergeStore.cpp:201] ["DeltaMergeStore[db_1.t_111]:Restore DeltaMerge Store start [db_1.t_111]"] [thread_id=1]
[2022/03/17 21:07:00.229 +08:00] [DEBUG] [DeltaMergeStore.cpp:2143] ["DeltaMergeStore[db_1.t_111]:Loading dt files"] [thread_id=1]
[2022/03/17 21:07:00.229 +08:00] [INFO] [PageStorage.cpp:186] ["PageStorage:db_1.t_111.log begin to restore data from disk. [path=/data1/qiuyang/ti/tmp/data/t_111/log] [num_writers=4]"] [thread_id=1]
[2022/03/17 21:07:00.230 +08:00] [DEBUG] [PageStorage.cpp:438] ["PageStorage:db_1.t_111.log create new PageFile_1_0 for write [path=/data1/qiuyang/ti/tmp/data/t_111/log]"] [thread_id=1]
[2022/03/17 21:07:00.230 +08:00] [DEBUG] [PageStorage.cpp:438] ["PageStorage:db_1.t_111.log create new PageFile_2_0 for write [path=/data1/qiuyang/ti/tmp/data/t_111/log]"] [thread_id=1]
[2022/03/17 21:07:00.231 +08:00] [DEBUG] [PageStorage.cpp:438] ["PageStorage:db_1.t_111.log create new PageFile_3_0 for write [path=/data1/qiuyang/ti/tmp/data/t_111/log]"] [thread_id=1]
[2022/03/17 21:07:00.231 +08:00] [DEBUG] [PageStorage.cpp:438] ["PageStorage:db_1.t_111.log create new PageFile_4_0 for write [path=/data1/qiuyang/ti/tmp/data/t_111/log]"] [thread_id=1]
[2022/03/17 21:07:00.232 +08:00] [INFO] [PageStorage.cpp:340] ["PageStorage:db_1.t_111.log restore 0 pages, write batch sequence: 0, 0 puts and 0 refs and 0 deletes and 0 upserts"] [thread_id=1]
[2022/03/17 21:07:00.232 +08:00] [INFO] [PageStorage.cpp:186] ["PageStorage:db_1.t_111.data begin to restore data from disk. [path=/data1/qiuyang/ti/tmp/data/t_111/data] [num_writers=1]"] [thread_id=1]
[2022/03/17 21:07:00.233 +08:00] [DEBUG] [PageStorage.cpp:438] ["PageStorage:db_1.t_111.data create new PageFile_1_0 for write [path=/data1/qiuyang/ti/tmp/data/t_111/data]"] [thread_id=1]
[2022/03/17 21:07:00.233 +08:00] [INFO] [PageStorage.cpp:340] ["PageStorage:db_1.t_111.data restore 0 pages, write batch sequence: 0, 0 puts and 0 refs and 0 deletes and 0 upserts"] [thread_id=1]
[2022/03/17 21:07:00.233 +08:00] [INFO] [PageStorage.cpp:186] ["PageStorage:db_1.t_111.meta begin to restore data from disk. [path=/data1/qiuyang/ti/tmp/data/t_111/meta] [num_writers=2]"] [thread_id=1]
[2022/03/17 21:07:00.234 +08:00] [DEBUG] [PageStorage.cpp:438] ["PageStorage:db_1.t_111.meta create new PageFile_1_0 for write [path=/data1/qiuyang/ti/tmp/data/t_111/meta]"] [thread_id=1]
[2022/03/17 21:07:00.234 +08:00] [DEBUG] [PageStorage.cpp:438] ["PageStorage:db_1.t_111.meta create new PageFile_2_0 for write [path=/data1/qiuyang/ti/tmp/data/t_111/meta]"] [thread_id=1]
[2022/03/17 21:07:00.235 +08:00] [INFO] [PageStorage.cpp:340] ["PageStorage:db_1.t_111.meta restore 0 pages, write batch sequence: 0, 0 puts and 0 refs and 0 deletes and 0 upserts"] [thread_id=1]
[2022/03/17 21:07:00.235 +08:00] [TRACE] [<unknown>] [DeltaTree:create] [thread_id=1]
Process 8134 stopped
* thread #1: tid = 8134, 0x000000000efd86f0 gtests_dbms`long std::__1::__cxx_atomic_fetch_add<long>(__a=0x0003ffff183901b8, __delta=8391248, __order=memory_order_relaxed) + 80, name = 'gtests_dbms', stop reason = invalid address (fault address: 0x0)
    frame #0: 0x000000000efd86f0 gtests_dbms`long std::__1::__cxx_atomic_fetch_add<long>(__a=0x0003ffff183901b8, __delta=8391248, __order=memory_order_relaxed) + 80
gtests_dbms`long std::__1::__cxx_atomic_fetch_add<long>(std::__1::__cxx_atomic_base_impl<long>*, long, std::__1::memory_order) + 80:
-> 0xefd86f0:  lock   
   0xefd86f1:  xaddq  %rax, (%rcx)
   0xefd86f5:  movq   %rax, -0x28(%rbp)
   0xefd86f9:  jmpq   0xefd8751                 ; long std::__1::__cxx_atomic_fetch_add<long>(std::__1::__cxx_atomic_base_impl<long>*, long, std::__1::memory_order) + 177
   
 (lldb) bt
 * thread #1: tid = 8134, 0x000000000efd86f0 gtests_dbms`long std::__1::__cxx_atomic_fetch_add<long>(__a=0x0003ffff183901b8, __delta=8391248, __order=memory_order_relaxed) + 80, name = 'gtests_dbms', stop reason = invalid address (fault address: 0x0)
  * frame #0: 0x000000000efd86f0 gtests_dbms`long std::__1::__cxx_atomic_fetch_add<long>(__a=0x0003ffff183901b8, __delta=8391248, __order=memory_order_relaxed) + 80
    frame #1: 0x000000000efd8693 gtests_dbms`std::__1::__atomic_base<long, true>::fetch_add(this=0x0003ffff183901b8, __op=8391248, __m=memory_order_relaxed) + 35
    frame #2: 0x00000000103443cd gtests_dbms`CurrentMetrics::add(metric=140736950724353, value=8391248) + 45
    frame #3: 0x0000000017a5fa05 gtests_dbms`MemoryTracker::alloc(this=0x00007fffdff466c8, size=8391248) + 117
    frame #4: 0x0000000017a601bb gtests_dbms`CurrentMemoryTracker::alloc(long) [inlined] CurrentMemoryTracker::checkSubmitAndUpdateLocalDelta(updated_local_delta=8391248) + 84
    frame #5: 0x0000000017a60167 gtests_dbms`CurrentMemoryTracker::alloc(size=1048576) + 39
    frame #6: 0x0000000017a35800 gtests_dbms`Allocator<false>::alloc(this=0x00007f50cb4d0cd8, size=1048576, alignment=0) + 32
    frame #7: 0x000000000f18e134 gtests_dbms`DB::Memory::alloc(this=0x00007f50cb4d0cd8) + 132
    frame #8: 0x000000000f18e31b gtests_dbms`DB::Memory::Memory(this=0x00007f50cb4d0cd8, size_=1048576, alignment_=0) + 59
    frame #9: 0x000000000f372845 gtests_dbms`DB::BufferWithOwnMemory<DB::WriteBuffer>::BufferWithOwnMemory(this=0x00007f50cb4d0ca0, size=1048576, existing_memory=0x0000000000000000, alignment=0) + 117
    frame #10: 0x0000000017b05840 gtests_dbms`DB::CompressedWriteBuffer<false>::CompressedWriteBuffer(this=0x00007f50cb4d0ca0, out_=0x00007f50cb4d0c00, compression_settings_=CompressionSettings at 0x00007fffdff39418, buf_size=1048576) + 48
    frame #11: 0x0000000010513d13 gtests_dbms`DB::DM::DMFileWriter::Stream::Stream(this=0x00007f50cb599210, dmfile=0x00007f50cb58bbd8, file_base_name=0x00007fffdff39898, type=0x00007fffdff39cd8, compression_settings=CompressionSettings at 0x00007fffdff396f8, max_compress_block_size=1048576, file_provider=0x00007f50cb58bc50, write_limiter_=0x00007f50cb58bc60, do_index=true) + 627
    frame #12: 0x00000000105139a8 gtests_dbms`std::__1::__unique_if<DB::DM::DMFileWriter::Stream>::__unique_single std::__1::make_unique<DB::DM::DMFileWriter::Stream, std::__1::shared_ptr<DB::DM::DMFile>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<DB::IDataType const>&, DB::CompressionSettings&, unsigned long&, std::__1::shared_ptr<DB::FileProvider>&, std::__1::shared_ptr<DB::WriteLimiter>&, bool>(__args=0x00007f50cb58bbd8, __args=0x00007fffdff39898, __args=0x00007fffdff39cd8, __args=0x00007f50cb58bc00, __args=0x00007f50cb58bc10, __args=0x00007f50cb58bc50, __args=0x00007f50cb58bc60, __args=0x00007fffdff3988f) + 264
    frame #13: 0x00000000104ffe90 gtests_dbms`DB::DM::DMFileWriter::addStreams(this=0x00007f50cb599c08, substream_path=0x00007fffdff39a98)::$_2::operator()(std::__1::vector<DB::IDataType::Substream, std::__1::allocator<DB::IDataType::Substream> > const&) const + 272
    frame #14: 0x00000000104ffd5d gtests_dbms`decltype (__f=0x00007f50cb599c08, __args=0x00007fffdff39a98)::$_2&>({parm#1}))(static_cast<std::__1::vector<DB::IDataType::Substream, std::__1::allocator<DB::IDataType::Substream> > const&>({parm#2}))) std::__1::__invoke<DB::DM::DMFileWriter::addStreams(long, std::__1::shared_ptr<DB::IDataType const>, bool)::$_2&, std::__1::vector<DB::IDataType::Substream, std::__1::allocator<DB::IDataType::Substream> > const&>(DB::DM::DMFileWriter::addStreams(long, std::__1::shared_ptr<DB::IDataType const>, bool)::$_2&, std::__1::vector<DB::IDataType::Substream, std::__1::allocator<DB::IDataType::Substream> > const&) + 29
    frame #15: 0x00000000104ffd12 gtests_dbms`void std::__1::__invoke_void_return_wrapper<void, true>::__call<DB::DM::DMFileWriter::addStreams(__args=0x00007f50cb599c08, __args=0x00007fffdff39a98)::$_2&, std::__1::vector<DB::IDataType::Substream, std::__1::allocator<DB::IDataType::Substream> > const&>(DB::DM::DMFileWriter::addStreams(long, std::__1::shared_ptr<DB::IDataType const>, bool)::$_2&, std::__1::vector<DB::IDataType::Substream, std::__1::allocator<DB::IDataType::Substream> > const&) + 50
    frame #16: 0x00000000104ffcd2 gtests_dbms`std::__1::__function::__alloc_func<DB::DM::DMFileWriter::addStreams(this=0x00007f50cb599c08, __arg=0x00007fffdff39a98)::$_2, std::__1::allocator<DB::DM::DMFileWriter::addStreams(long, std::__1::shared_ptr<DB::IDataType const>, bool)::$_2>, void (std::__1::vector<DB::IDataType::Substream, std::__1::allocator<DB::IDataType::Substream> > const&)>::operator()(std::__1::vector<DB::IDataType::Substream, std::__1::allocator<DB::IDataType::Substream> > const&) + 50
    frame #17: 0x00000000104fefa1 gtests_dbms`std::__1::__function::__func<DB::DM::DMFileWriter::addStreams(this=0x00007f50cb599c00, __arg=0x00007fffdff39a98)::$_2, std::__1::allocator<DB::DM::DMFileWriter::addStreams(long, std::__1::shared_ptr<DB::IDataType const>, bool)::$_2>, void (std::__1::vector<DB::IDataType::Substream, std::__1::allocator<DB::IDataType::Substream> > const&)>::operator()(std::__1::vector<DB::IDataType::Substream, std::__1::allocator<DB::IDataType::Substream> > const&) + 49
    frame #18: 0x000000000d668c8a gtests_dbms`std::__1::__function::__value_func<void (this=0x00007fffdff39ad0, __args=0x00007fffdff39a98)>::operator()(std::__1::vector<DB::IDataType::Substream, std::__1::allocator<DB::IDataType::Substream> > const&) const + 74
    frame #19: 0x000000000d668c2d gtests_dbms`std::__1::function<void (this=0x00007fffdff39ad0, __arg=0x00007fffdff39a98)>::operator()(std::__1::vector<DB::IDataType::Substream, std::__1::allocator<DB::IDataType::Substream> > const&) const + 45
    frame #20: 0x000000000d667bf1 gtests_dbms`DB::IDataType::enumerateStreams(this=0x00007f50cb82c6d8, callback=0x00007fffdff39ad0, path=0x00007fffdff39a98)> const&, std::__1::vector<DB::IDataType::Substream, std::__1::allocator<DB::IDataType::Substream> >&) const + 33
    frame #21: 0x00000000102f6226 gtests_dbms`DB::IDataType::enumerateStreams(this=0x00007f50cb82c6d8, callback=0x00007fffdff39ad0, path=0x00007fffdff39a98)> const&, std::__1::vector<DB::IDataType::Substream, std::__1::allocator<DB::IDataType::Substream> >&&) const + 38
    frame #22: 0x00000000104fc318 gtests_dbms`DB::DM::DMFileWriter::addStreams(this=0x00007f50cb58bbd8, col_id=-1025, type=DB::DataTypePtr at 0x00007fffdff39cd8, do_index=true) + 184
    frame #23: 0x00000000104fc0ab gtests_dbms`DB::DM::DMFileWriter::DMFileWriter(this=0x00007f50cb58bbd8, dmfile_=0x00007fffdff3a490, write_columns_=0x00007f50cb5991c8, file_provider_=0x00007fffdff39f68, write_limiter_=0x00007fffdff39f58, options_=0x00007fffdff39f28) + 2523
    frame #24: 0x000000000e9a279e gtests_dbms`DB::DM::DMFileBlockOutputStream::DMFileBlockOutputStream(this=0x00007f50cb58bbd8, context=0x00007f50cb487e00, dmfile=0x00007fffdff3a490, write_columns=0x00007f50cb5991c8, flags=DB::DM::DMFileBlockOutputStream::Flags at 0x00007fffdff39f98) + 334
    frame #25: 0x00000000104348f1 gtests_dbms`std::__1::__shared_ptr_emplace<DB::DM::DMFileBlockOutputStream, std::__1::allocator<DB::DM::DMFileBlockOutputStream> >::__shared_ptr_emplace<DB::Context const&, std::__1::shared_ptr<DB::DM::DMFile>&, std::__1::vector<DB::DM::ColumnDefine, std::__1::allocator<DB::DM::ColumnDefine> >&, DB::DM::DMFileWriter::Flags&>(this=0x00007f50cb58bbc0, __a=allocator<DB::DM::DMFileBlockOutputStream> at 0x00007fffdff3a028, __args=0x00007f50cb487e00, __args=0x00007fffdff3a490, __args=0x00007f50cb5991c8, __args=0x00007fffdff3a330) + 193
    frame #26: 0x00000000104347a5 gtests_dbms`std::__1::shared_ptr<DB::DM::DMFileBlockOutputStream> std::__1::allocate_shared<DB::DM::DMFileBlockOutputStream, std::__1::allocator<DB::DM::DMFileBlockOutputStream>, DB::Context const&, std::__1::shared_ptr<DB::DM::DMFile>&, std::__1::vector<DB::DM::ColumnDefine, std::__1::allocator<DB::DM::ColumnDefine> >&, DB::DM::DMFileWriter::Flags&, void>(__a=0x00007fffdff3a130, __args=0x00007f50cb487e00, __args=0x00007fffdff3a490, __args=0x00007f50cb5991c8, __args=0x00007fffdff3a330) + 181
    frame #27: 0x000000001042a5ac gtests_dbms`std::__1::shared_ptr<DB::DM::DMFileBlockOutputStream> std::__1::make_shared<DB::DM::DMFileBlockOutputStream, DB::Context const&, std::__1::shared_ptr<DB::DM::DMFile>&, std::__1::vector<DB::DM::ColumnDefine, std::__1::allocator<DB::DM::ColumnDefine> >&, DB::DM::DMFileWriter::Flags&, void>(__args=0x00007f50cb487e00, __args=0x00007fffdff3a490, __args=0x00007f50cb5991c8, __args=0x00007fffdff3a330) + 124
    frame #28: 0x000000001040abd3 gtests_dbms`DB::DM::writeIntoNewDMFile(dm_context=0x00007f50cb58c280, schema_snap=0x00007f50cb598150, input_stream=0x00007fffdff3a588, file_id=1, parent_path=0x00007fffdff3a4c0, flags=DB::DM::DMFileBlockOutputStream::Flags at 0x00007fffdff3a330) + 275
    frame #29: 0x000000001040b0ee gtests_dbms`DB::DM::createNewStable(context=0x00007f50cb58c280, schema_snap=0x00007f50cb598150, input_stream=0x00007fffdff3a588, stable_id=3, wbs=0x00007fffdff3a5d8) + 286
    frame #30: 0x000000001040b683 gtests_dbms`DB::DM::Segment::newSegment(context=0x00007f50cb58c280, schema=0x00007f50cb598150, range=0x00007fffdff3abb8, segment_id=1, next_segment_id=0, delta_id=2, stable_id=3) + 291
    frame #31: 0x000000001040bbce gtests_dbms`DB::DM::Segment::newSegment(context=0x00007f50cb58c280, schema=0x00007f50cb598150, rowkey_range=0x00007fffdff3abb8, segment_id=1, next_segment_id=0) + 158
    frame #32: 0x00000000103a75ac gtests_dbms`DB::DM::DeltaMergeStore::DeltaMergeStore(this=0x00007f50cb597e20, db_context=0x00007f50cb487e00, data_path_contains_database_name=false, db_name_=0x00007f50cb4c9d60, table_name_=0x00007f50cb4c9d78, table_id_=-1, columns=0x00007f50cb4c9da0, handle=0x00007f50cb4c9dc0, is_common_handle_=false, rowkey_column_size_=1, settings_=0x00007fffdff3b2d0, physical_table_id=-1) + 3964
    frame #33: 0x00000000102bd171 gtests_dbms`std::__1::__shared_ptr_emplace<DB::DM::DeltaMergeStore, std::__1::allocator<DB::DM::DeltaMergeStore> >::__shared_ptr_emplace<DB::Context&, bool const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, long&, std::__1::vector<DB::DM::ColumnDefine, std::__1::allocator<DB::DM::ColumnDefine> >, DB::DM::ColumnDefine, bool&, unsigned long&, DB::DM::DeltaMergeStore::Settings, long&>(this=0x00007f50cb597e00, __a=allocator<DB::DM::DeltaMergeStore> at 0x00007fffdff3aff8, __args=0x00007f50cb487e00, __args=0x00007f50cb5933e8, __args=0x00007f50cb4c9d60, __args=0x00007f50cb4c9d78, __args=0x00007f50cb593478, __args=0x00007f50cb4c9da0, __args=0x00007f50cb4c9dc0, __args=0x00007f50cb593450, __args=0x00007f50cb593458, __args=0x00007fffdff3b2d0, __args=0x00007f50cb593478) + 401
    frame #34: 0x00000000102bcf4e gtests_dbms`std::__1::shared_ptr<DB::DM::DeltaMergeStore> std::__1::allocate_shared<DB::DM::DeltaMergeStore, std::__1::allocator<DB::DM::DeltaMergeStore>, DB::Context&, bool const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, long&, std::__1::vector<DB::DM::ColumnDefine, std::__1::allocator<DB::DM::ColumnDefine> >, DB::DM::ColumnDefine, bool&, unsigned long&, DB::DM::DeltaMergeStore::Settings, long&, void>(__a=0x00007fffdff3b1d8, __args=0x00007f50cb487e00, __args=0x00007f50cb5933e8, __args=0x00007f50cb4c9d60, __args=0x00007f50cb4c9d78, __args=0x00007f50cb593478, __args=0x00007f50cb4c9da0, __args=0x00007f50cb4c9dc0, __args=0x00007f50cb593450, __args=0x00007f50cb593458, __args=0x00007fffdff3b2d0, __args=0x00007f50cb593478) + 382
    frame #35: 0x00000000102b4446 gtests_dbms`std::__1::shared_ptr<DB::DM::DeltaMergeStore> std::__1::make_shared<DB::DM::DeltaMergeStore, DB::Context&, bool const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, long&, std::__1::vector<DB::DM::ColumnDefine, std::__1::allocator<DB::DM::ColumnDefine> >, DB::DM::ColumnDefine, bool&, unsigned long&, DB::DM::DeltaMergeStore::Settings, long&, void>(__args=0x00007f50cb487e00, __args=0x00007f50cb5933e8, __args=0x00007f50cb4c9d60, __args=0x00007f50cb4c9d78, __args=0x00007f50cb593478, __args=0x00007f50cb4c9da0, __args=0x00007f50cb4c9dc0, __args=0x00007f50cb593450, __args=0x00007f50cb593458, __args=0x00007fffdff3b2d0, __args=0x00007f50cb593478) + 310
    frame #36: 0x000000001029ba43 gtests_dbms`DB::StorageDeltaMerge::getAndMaybeInitStore(this=0x00007f50cb593318) + 419
    frame #37: 0x00000000102a43a2 gtests_dbms`DB::StorageDeltaMerge::rename(this=0x00007f50cb593318, new_path_to_db=0x00007fffdff3b940, new_database_name=0x00007f50cb4c9e70, new_table_name=0x00007fffdff44768, new_display_table_name=0x00007fffdff44768) + 1138
    frame #38: 0x000000000f0aba9f gtests_dbms`DB::DatabaseTiFlash::renameTable(this=0x00007f50cb4c9c98, context=0x00007fffdff45920, table_name=0x00007fffdff44a28, to_database=0x00007f50cb4c9e58, to_table_name=0x00007fffdff44768, (null)=0x00007fffdff466f8, display_table=0x00007fffdff44768) + 4895
    frame #39: 0x000000000d812d9b gtests_dbms`DB::tests::DatabaseTiFlashTest_RenameTableBetweenDatabase_Test::TestBody(this=0x00007f50cb565480) + 8203
    frame #40: 0x0000000016c9baeb gtests_dbms`void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(object=0x00007f50cb565480, method=21 00 00 00 00 00 00 00, location=0x0000000009f468df)(), char const*) + 123
    frame #41: 0x0000000016c8b23a gtests_dbms`void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(object=0x00007f50cb565480, method=21 00 00 00 00 00 00 00, location=0x0000000009f468df)(), char const*) + 106
    frame #42: 0x0000000016c74dfc gtests_dbms`testing::Test::Run(this=0x00007f50cb565480) + 188
    frame #43: 0x0000000016c75925 gtests_dbms`testing::TestInfo::Run(this=0x00007f50cbe4c900) + 213
    frame #44: 0x0000000016c75ee3 gtests_dbms`testing::TestCase::Run(this=0x00007f50cbe4c700) + 227
    frame #45: 0x0000000016c7c7da gtests_dbms`testing::internal::UnitTestImpl::RunAllTests(this=0x00007f50cbe12200) + 810
    frame #46: 0x0000000016c9f1cb gtests_dbms`bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(object=0x00007f50cbe12200, method=b0 c4 c7 16 00 00 00 00, location=0x0000000009d89c11)(), char const*) + 123
    frame #47: 0x0000000016c8d0da gtests_dbms`bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(object=0x00007f50cbe12200, method=b0 c4 c7 16 00 00 00 00, location=0x0000000009d89c11)(), char const*) + 106
    frame #48: 0x0000000016c7c456 gtests_dbms`testing::UnitTest::Run(this=0x00000000189089a0) + 198
    frame #49: 0x000000000ef2dc51 gtests_dbms`RUN_ALL_TESTS() + 17
    frame #50: 0x000000000ef2b9a9 gtests_dbms`main(argc=1, argv=0x00007fffdff46f98) + 185
    frame #51: 0x00007f50cc239555 libc.so.6`__libc_start_main + 245

Notice that:

frame #2: 0x00000000103443cd gtests_dbms`CurrentMetrics::add(metric=140736950724353, value=8391248) + 45

metric is too large as an index.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Build and run gtests_dbms using the reported CMake and make commands, then reproduce DatabaseTiFlashTest.RenameTableBetweenDatabase under lldb. Start with the stack frames through DatabaseTiFlash.cpp, StorageDeltaMerge.cpp, PageStorage.cpp, and DMFileWriter::Stream. Done means identifying and fixing the crash so the test completes without a segmentation fault.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system, databases, testing-qa
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.