Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

branch-2.0 asan crash #1690

Closed
wanpengfei-git opened this issue Nov 29, 2021 · 2 comments
Closed

branch-2.0 asan crash #1690

wanpengfei-git opened this issue Nov 29, 2021 · 2 comments
Assignees
Labels
type/bug Something isn't working

Comments

@wanpengfei-git
Copy link
Collaborator

wanpengfei-git commented Nov 29, 2021

Steps to reproduce the behavior (Required)

1.DROP DATABASE IF EXISTS g7;
CREATE DATABASE g7;
USE g7;
admin set frontend config ("enable_decimal_v3" = "true");
CREATE TABLE t0 (c_0_0 VARCHAR(11) NOT NULL ,c_0_1 BOOLEAN NOT NULL ,c_0_2 BOOLEAN NULL ,c_0_3 SMALLINT NOT NULL ,c_0_4 BIGINT NULL ,c_0_5 DATETIME NOT NULL ,c_0_6 DECIMAL128(30, 6) NULL ,c_0_7 LARGEINT NOT NULL ,c_0_8 LARGEINT NOT NULL ,c_0_9 DECIMAL128(32, 5) NOT NULL ,c_0_10 FLOAT NULL ,c_0_11 SMALLINT NULL ,c_0_12 DECIMAL64(17, 13) NOT NULL ,c_0_13 VARCHAR(11) NOT NULL ,c_0_14 DECIMAL(6, 3) NULL ) DUPLICATE KEY (c_0_0,c_0_1,c_0_2,c_0_3,c_0_4,c_0_5,c_0_6) DISTRIBUTED BY HASH (c_0_1) properties("replication_num"="1") ;
CREATE TABLE t1 (c_1_0 DECIMAL128(26, 15) NOT NULL ,c_1_1 BOOLEAN NULL ,c_1_2 DATE NULL ,c_1_3 DECIMAL64(9, 6) NULL ,c_1_4 DECIMAL128(25, 18) NOT NULL ,c_1_5 DOUBLE NOT NULL ,c_1_6 DECIMAL64(3, 2) NULL ,c_1_7 DECIMAL128(4, 4) NULL ,c_1_8 INT NULL ,c_1_9 DECIMAL128(15, 3) NULL ,c_1_10 SMALLINT NULL ,c_1_11 BOOLEAN NULL ,c_1_12 BOOLEAN NULL ,c_1_13 BOOLEAN NOT NULL ,c_1_14 DECIMAL128(10, 5) NULL ,c_1_15 DATE NULL ,c_1_16 FLOAT NOT NULL ,c_1_17 CHAR(21) NULL ,c_1_18 DATETIME NOT NULL ) UNIQUE KEY (c_1_0,c_1_1,c_1_2,c_1_3,c_1_4) DISTRIBUTED BY HASH (c_1_1,c_1_3) properties("replication_num"="1") ;
CREATE TABLE t2 (c_2_0 DECIMAL(17, 9) NOT NULL ,c_2_1 DECIMAL128(26, 10) NOT NULL ,c_2_2 TINYINT NULL ,c_2_3 DECIMAL128(6, 6) NULL ,c_2_4 DECIMAL64(5, 3) MAX NULL ,c_2_5 DECIMAL(14, 4) REPLACE_IF_NOT_NULL NULL ) AGGREGATE KEY (c_2_0,c_2_1,c_2_2,c_2_3) DISTRIBUTED BY HASH (c_2_0) properties("replication_num"="1") ;
INSERT INTO t1 VALUES (0.000032667987361, false, "1970-01-01", 0.000063, 8.454642E-12, 0.4901171930938878, 0.05, 0.0008, NULL, 816696809.392, 3, false, false, false, 0.65652, "1970-01-01", 0.829095434054464, "0ewmN", "1970-01-01 08:00:00");
INSERT INTO t2 VALUES (0.043475657, 152910.7771444000, 6, 0.000000, 0.019, 789072.3100), (0.069231157, 240344.5915980656, 7, 0.000007, NULL, 673081.7219), (0.011701622, 110831.5819884472, 5, 0.000008, 0.030, 311204.7748);
INSERT INTO t0 VALUES ("u8cjP", false, false, 4, 1613285642, "1970-01-01 08:00:00", 608445059518931685.736845, 1244851966, -349246139, 8804105359954318976711.81786, -9.57383818E8, 2, 2.110E-10, "jZZ", NULL);
INSERT INTO t0 VALUES ("W4", false, false, 13, -1122373562, "1970-01-01 08:00:00", 658844075180962107.651885, 969712006, -1671449617, 121834485128237557383.10183, 0.7642100137647996, 14, 3.851E-10, "O", NULL), ("uA00z7FR", true, true, 9, -681688143, "1970-01-01 08:00:00", 486569005597846882.026249, -1671449617, -962164510, 8380032284330939273964.13391, NULL, 6, 1.22E-11, "x", 0.435), ("TB", true, true, 3, -2110330155, "1970-01-01 08:00:00", 587643251266801058.827738, -1827528416, 838352829, 132188149603744364846.13625, 0.9020681584305665, 4, 5.952E-10, "JwN", 0.792);
TRUNCATE TABLE t1;
INSERT INTO t2 VALUES (0.033415683, 764129.9360679043, NULL, 0.000000, 0.014, 530637.6248);
INSERT INTO t2 VALUES (0.018035927, 570980.7410795662, 5, NULL, 0.006, 924428.6281);
INSERT INTO t2 VALUES (0.095547209, 857184.3182059134, 3, 0.000003, 0.070, 401011.7467);
INSERT INTO t2 VALUES (0.035982338, 754786.3938130807, 3, 0.000004, 0.008, 926310.7007), (0.002538916, 908070.8912676664, 2, 0.000004, NULL, 717758.3299), (0.073328726, 421143.7240979405, NULL, 0.000007, 0.095, 102466.4377), (0.033609302, 216434.3819310604, 0, 0.000004, 0.003, 794138.6802);
INSERT INTO t2 VALUES (0.049548123, 811214.8522995686, 5, 0.000000, 0.083, NULL), (0.077531651, 774993.9453082190, 6, 0.000001, 0.088, 981830.7158);
2. SELECT t0.c_0_0, t0.c_0_9, t0.c_0_2, t0.c_0_12, t0.c_0_10, t0.c_0_14, t0.c_0_8, t0.c_0_5, t0.c_0_1, t0.c_0_6, t0.c_0_13, t0.c_0_3, t0.c_0_4, t0.c_0_11, t0.c_0_7, DENSE_RANK() OVER ( ORDER BY t0.c_0_14, t0.c_0_2, t0.c_0_8, t0.c_0_13, t0.c_0_4, t0.c_0_7, t0.c_0_0, t0.c_0_6, t0.c_0_5, t0.c_0_1, t0.c_0_9, t0.c_0_10) FROM t0 WHERE false GROUP BY t0.c_0_0, t0.c_0_9, t0.c_0_2, t0.c_0_12, t0.c_0_10, t0.c_0_14, t0.c_0_8, t0.c_0_5, t0.c_0_1, t0.c_0_6, t0.c_0_13, t0.c_0_3, t0.c_0_4, t0.c_0_11, t0.c_0_7 UNION SELECT t0.c_0_0, t0.c_0_9, t0.c_0_2, t0.c_0_12, t0.c_0_10, t0.c_0_14, t0.c_0_8, t0.c_0_5, t0.c_0_1, t0.c_0_6, t0.c_0_13, t0.c_0_3, t0.c_0_4, t0.c_0_11, t0.c_0_7, DENSE_RANK() OVER ( ORDER BY t0.c_0_14, t0.c_0_2, t0.c_0_8, t0.c_0_13, t0.c_0_4, t0.c_0_7, t0.c_0_0, t0.c_0_6, t0.c_0_5, t0.c_0_1, t0.c_0_9, t0.c_0_10) FROM t0 WHERE (NOT (false)) GROUP BY t0.c_0_0, t0.c_0_9, t0.c_0_2, t0.c_0_12, t0.c_0_10, t0.c_0_14, t0.c_0_8, t0.c_0_5, t0.c_0_1, t0.c_0_6, t0.c_0_13, t0.c_0_3, t0.c_0_4, t0.c_0_11, t0.c_0_7 UNION SELECT t0.c_0_0, t0.c_0_9, t0.c_0_2, t0.c_0_12, t0.c_0_10, t0.c_0_14, t0.c_0_8, t0.c_0_5, t0.c_0_1, t0.c_0_6, t0.c_0_13, t0.c_0_3, t0.c_0_4, t0.c_0_11, t0.c_0_7, DENSE_RANK() OVER ( ORDER BY t0.c_0_14, t0.c_0_2, t0.c_0_8, t0.c_0_13, t0.c_0_4, t0.c_0_7, t0.c_0_0, t0.c_0_6, t0.c_0_5, t0.c_0_1, t0.c_0_9, t0.c_0_10) FROM t0 WHERE ((false) IS NULL) GROUP BY t0.c_0_0, t0.c_0_9, t0.c_0_2, t0.c_0_12, t0.c_0_10, t0.c_0_14, t0.c_0_8, t0.c_0_5, t0.c_0_1, t0.c_0_6, t0.c_0_13, t0.c_0_3, t0.c_0_4, t0.c_0_11, t0.c_0_7;

  1. crash:
    ==196461==ERROR: AddressSanitizer: use-after-poison on address 0x625003a1e228 at pc 0x000003ae586e bp 0x7fce51385650 sp 0x7fce51385648
    READ of size 1 at 0x625003a1e228 thread T158 (FragmentMgrThre)
    0 0x3ae586d in void __gnu_cxx::new_allocator::construct<unsigned char, unsigned char const&>(unsigned char*, unsigned char const&) /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/ext/new_allocator.h:150
    1 0x3adf6e4 in void std::allocator_traits<std::allocator >::construct<unsigned char, unsigned char const&>(std::allocator&, unsigned char*, unsigned char const&) /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/alloc_traits.h:512
    2 0x3ae9d15 in void starrocks::raw::RawAllocator<unsigned char, 16ul, std::allocator >::construct<unsigned char, unsigned char const&>(unsigned char*, unsigned char const&) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/util/raw_container.h:63
    3 0x3ae41e3 in std::enable_if<std::_and<std::allocator_traits<starrocks::raw::RawAllocator<unsigned char, 16ul, std::allocator > >::__construct_helper<unsigned char, unsigned char const&>::type>::value, void>::type std::allocator_traits<starrocks::raw::RawAllocator<unsigned char, 16ul, std::allocator > >::_S_construct<unsigned char, unsigned char const&>(starrocks::raw::RawAllocator<unsigned char, 16ul, std::allocator >&, unsigned char*, unsigned char const&) /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/alloc_traits.h:247
    4 0x3ade625 in decltype (_S_construct({parm#1}, {parm#2}, (forward<unsigned char const&>)({parm#3}))) std::allocator_traits<starrocks::raw::RawAllocator<unsigned char, 16ul, std::allocator > >::construct<unsigned char, unsigned char const&>(starrocks::raw::RawAllocator<unsigned char, 16ul, std::allocator >&, unsigned char*, unsigned char const&) /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/alloc_traits.h:360
    5 0x3ce7b90 in unsigned char* std::__uninitialized_copy_a<unsigned char const*, unsigned char*, starrocks::raw::RawAllocator<unsigned char, 16ul, std::allocator > >(unsigned char const*, unsigned char const*, unsigned char*, starrocks::raw::RawAllocator<unsigned char, 16ul, std::allocator >&) /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/stl_uninitialized.h:311
    6 0x3ce6b54 in void std::vector<unsigned char, starrocks::raw::RawAllocator<unsigned char, 16ul, std::allocator > >::_M_range_insert<unsigned char const*>(__gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, starrocks::raw::RawAllocator<unsigned char, 16ul, std::allocator > > >, unsigned char const*, unsigned char const*, std::forward_iterator_tag) /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/vector.tcc:778
    7 0x3ce3970 in void std::vector<unsigned char, starrocks::raw::RawAllocator<unsigned char, 16ul, std::allocator > >::_M_insert_dispatch<unsigned char const*>(__gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, starrocks::raw::RawAllocator<unsigned char, 16ul, std::allocator > > >, unsigned char const*, unsigned char const*, std::__false_type) /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/stl_vector.h:1665
    8 0x3ce0124 in __gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, starrocks::raw::RawAllocator<unsigned char, 16ul, std::allocator > > > std::vector<unsigned char, starrocks::raw::RawAllocator<unsigned char, 16ul, std::allocator > >::insert<unsigned char const*, void>(__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, starrocks::raw::RawAllocator<unsigned char, 16ul, std::allocator > > >, unsigned char const*, unsigned char const*) /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/stl_vector.h:1383
    9 0x3cdae71 in starrocks::vectorized::BinaryColumn::deserialize_and_append(unsigned char const*) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/column/binary_column.cpp:362
    10 0x5906d46 in starrocks::vectorized::AggHashSetOfSerializedKey<phmap::parallel_flat_hash_set<starrocks::vectorized::TSliceWithHash<(starrocks::vectorized::PhmapSeed)0>, starrocks::vectorized::THashOnSliceWithHash<(starrocks::vectorized::PhmapSeed)0>, starrocks::vectorized::TEqualOnSliceWithHash<(starrocks::vectorized::PhmapSeed)0>, std::allocatorstarrocks::Slice, 4ul, phmap::NullMutex, true> >::insert_keys_to_columns(std::vector<starrocks::Slice, std::allocatorstarrocks::Slice >&, std::vector<std::shared_ptrstarrocks::vectorized::Column, std::allocator<std::shared_ptrstarrocks::vectorized::Column > > const&, int) (/home/disk1/dorisdb/sqlancer_branch_asan/be/lib/starrocks_be+0x5906d46)
    11 0x58c7045 in void starrocks::Aggregator::convert_hash_set_to_chunk<starrocks::vectorized::AggHashSetOfSerializedKey<phmap::parallel_flat_hash_set<starrocks::vectorized::TSliceWithHash<(starrocks::vectorized::PhmapSeed)0>, starrocks::vectorized::THashOnSliceWithHash<(starrocks::vectorized::PhmapSeed)0>, starrocks::vectorized::TEqualOnSliceWithHash<(starrocks::vectorized::PhmapSeed)0>, std::allocatorstarrocks::Slice, 4ul, phmap::NullMutex, true> > >(starrocks::vectorized::AggHashSetOfSerializedKey<phmap::parallel_flat_hash_set<starrocks::vectorized::TSliceWithHash<(starrocks::vectorized::PhmapSeed)0>, starrocks::vectorized::THashOnSliceWithHash<(starrocks::vectorized::PhmapSeed)0>, starrocks::vectorized::TEqualOnSliceWithHash<(starrocks::vectorized::PhmapSeed)0>, std::allocatorstarrocks::Slice, 4ul, phmap::NullMutex, true> >&, int, std::shared_ptrstarrocks::vectorized::Chunk) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/exec/vectorized/aggregator.h:403
    12 0x59b5b93 in starrocks::vectorized::DistinctStreamingNode::_output_chunk_from_hash_set(std::shared_ptrstarrocks::vectorized::Chunk
    ) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/exec/vectorized/aggregate/distinct_streaming_node.cpp:209
    13 0x59b0208 in starrocks::vectorized::DistinctStreamingNode::get_next(starrocks::RuntimeState*, std::shared_ptrstarrocks::vectorized::Chunk, bool) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/exec/vectorized/aggregate/distinct_streaming_node.cpp:169
    14 0x4b342a2 in starrocks::PlanFragmentExecutor::_get_next_internal_vectorized(std::shared_ptrstarrocks::vectorized::Chunk) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/runtime/plan_fragment_executor.cpp:368
    15 0x4b325e5 in starrocks::PlanFragmentExecutor::_open_internal_vectorized() /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/runtime/plan_fragment_executor.cpp:256
    16 0x4b31806 in starrocks::PlanFragmentExecutor::open() /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/runtime/plan_fragment_executor.cpp:225
    17 0x49baffb in starrocks::FragmentExecState::execute() /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/runtime/fragment_mgr.cpp:194
    18 0x49bff44 in starrocks::FragmentMgr::exec_actual(std::shared_ptrstarrocks::FragmentExecState
    , std::function<void (starrocks::PlanFragmentExecutor*)> const&) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/runtime/fragment_mgr.cpp:379
    19 0x49c07a8 in operator() /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/runtime/fragment_mgr.cpp:431
    20 0x49c936b in __invoke_impl<void, starrocks::FragmentMgr::exec_plan_fragment(const starrocks::TExecPlanFragmentParams&, const FinishCallback&)::<lambda()>&> /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/invoke.h:60
    21 0x49c9024 in __invoke_r<void, starrocks::FragmentMgr::exec_plan_fragment(const starrocks::TExecPlanFragmentParams&, const FinishCallback&)::<lambda()>&> /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/invoke.h:110
    22 0x49c897b in _M_invoke /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/std_function.h:291
    23 0x3ad50b1 in std::function<void ()>::operator()() const /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/std_function.h:622
    24 0x4dd535b in starrocks::FunctionRunnable::run() /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/util/threadpool.cpp:45
    25 0x4dd1c5f in starrocks::ThreadPool::dispatch_thread() /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/util/threadpool.cpp:514
    26 0x4def491 in void std::__invoke_impl<void, void (starrocks::ThreadPool::&)(), starrocks::ThreadPool&>(std::__invoke_memfun_deref, void (starrocks::ThreadPool::&)(), starrocks::ThreadPool&) /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/invoke.h:73
    27 0x4deed74 in std::__invoke_result<void (starrocks::ThreadPool::&)(), starrocks::ThreadPool&>::type std::__invoke<void (starrocks::ThreadPool::&)(), starrocks::ThreadPool&>(void (starrocks::ThreadPool::&)(), starrocks::ThreadPool&) /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/invoke.h:95
    28 0x4dee18b in void std::_Bind<void (starrocks::ThreadPool::(starrocks::ThreadPool))()>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/functional:416
    29 0x4decce9 in void std::_Bind<void (starrocks::ThreadPool::(starrocks::ThreadPool))()>::operator()<, void>() /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/functional:499
    30 0x4de9bcf in void std::__invoke_impl<void, std::_Bind<void (starrocks::ThreadPool::(starrocks::ThreadPool))()>&>(std::__invoke_other, std::_Bind<void (starrocks::ThreadPool::(starrocks::ThreadPool))()>&) /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/invoke.h:60
    31 0x4de7b97 in std::enable_if<is_invocable_r_v<void, std::_Bind<void (starrocks::ThreadPool::(starrocks::ThreadPool))()>&>, void>::type std::__invoke_r<void, std::_Bind<void (starrocks::ThreadPool::(starrocks::ThreadPool))()>&>(std::_Bind<void (starrocks::ThreadPool::(starrocks::ThreadPool))()>&) /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/invoke.h:110
    32 0x4de3332 in std::_Function_handler<void (), std::_Bind<void (starrocks::ThreadPool::(starrocks::ThreadPool))()> >::_M_invoke(std::_Any_data const&) /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/std_function.h:291
    33 0x3ad50b1 in std::function<void ()>::operator()() const /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/std_function.h:622
    34 0x4e0397a in starrocks::Thread::supervise_thread(void*) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/util/thread.cpp:304
    35 0x7fce8f5f5e64 in start_thread (/lib64/libpthread.so.0+0x7e64)
    36 0x7fce8e9fa88c in clone (/lib64/libc.so.6+0xfe88c)

0x625003a1e228 is located 552 bytes inside of 4096-byte region [0x625003a1e000,0x625003a1f000)
allocated by thread T89 here:
0 0x3a4832c in __interceptor_posix_memalign ../../../../libsanitizer/asan/asan_malloc_linux.cpp:226
1 0x4bc839b in starrocks::SystemAllocator::allocate_via_malloc(unsigned long) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/runtime/memory/system_allocator.cpp:62
2 0x4bc80d4 in starrocks::SystemAllocator::allocate(starrocks::MemTracker*, unsigned long) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/runtime/memory/system_allocator.cpp:41
3 0x4a8e481 in starrocks::ChunkAllocator::allocate(unsigned long, starrocks::Chunk*) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/runtime/memory/chunk_allocator.cpp:178
4 0x499214d in starrocks::MemPool::find_chunk(unsigned long, bool) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/runtime/mem_pool.cpp:122
5 0x3fcd991 in unsigned char* starrocks::MemPool::allocate(long, int) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/runtime/mem_pool.h:232
6 0x3fcd991 in starrocks::MemPool::allocate(long) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/runtime/mem_pool.h:108
7 0x562071a in starrocks::vectorized::datum_from_string(starrocks::TypeInfo*, starrocks::vectorized::Datum*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, starrocks::MemPool*) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/column/datum_convert.cpp:74
8 0x4334d51 in starrocks::vectorized::TabletReader::_to_seek_tuple(starrocks::TabletSchema const&, starrocks::OlapTuple const&, starrocks::vectorized::SeekTuple*) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/storage/vectorized/tablet_reader.cpp:282
9 0x433581a in starrocks::vectorized::TabletReader::_parse_seek_range(starrocks::vectorized::TabletReaderParams const&, std::vector<starrocks::vectorized::SeekRange, std::allocatorstarrocks::vectorized::SeekRange >) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/storage/vectorized/tablet_reader.cpp:304
10 0x4330699 in starrocks::vectorized::TabletReader::_init_collector(starrocks::vectorized::TabletReaderParams const&) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/storage/vectorized/tablet_reader.cpp:70
11 0x432fb35 in starrocks::vectorized::TabletReader::open(starrocks::vectorized::TabletReaderParams const&) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/storage/vectorized/tablet_reader.cpp:48
12 0x62ffb95 in starrocks::vectorized::TabletScanner::open(starrocks::RuntimeState
) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/exec/vectorized/tablet_scanner.cpp:68
13 0x5a0f3d2 in starrocks::vectorized::OlapScanNode::_scanner_thread(starrocks::vectorized::TabletScanner*) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/exec/vectorized/olap_scan_node.cpp:218
14 0x5a159bf in operator() /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/exec/vectorized/olap_scan_node.cpp:433
15 0x5a19755 in __invoke_impl<void, starrocks::vectorized::OlapScanNode::_submit_scanner(starrocks::vectorized::TabletScanner*, bool)::<lambda()>&> /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/invoke.h:60
16 0x5a195f6 in __invoke_r<void, starrocks::vectorized::OlapScanNode::_submit_scanner(starrocks::vectorized::TabletScanner*, bool)::<lambda()>&> /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/invoke.h:110
17 0x5a1945e in _M_invoke /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/std_function.h:291
18 0x3ad50b1 in std::function<void ()>::operator()() const /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/std_function.h:622
19 0x4900d2d in starrocks::PriorityThreadPool::work_thread(int) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/util/priority_thread_pool.hpp:177
20 0x4929c3a in void std::__invoke_impl<void, void (starrocks::PriorityThreadPool::* const&)(int), starrocks::PriorityThreadPool*&, int&>(std::__invoke_memfun_deref, void (starrocks::PriorityThreadPool::* const&)(int), starrocks::PriorityThreadPool*&, int&) /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/invoke.h:73
21 0x4929a7a in std::__invoke_result<void (starrocks::PriorityThreadPool::* const&)(int), starrocks::PriorityThreadPool*&, int&>::type std::__invoke<void (starrocks::PriorityThreadPool::* const&)(int), starrocks::PriorityThreadPool*&, int&>(void (starrocks::PriorityThreadPool::* const&)(int), starrocks::PriorityThreadPool*&, int&) /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/invoke.h:95
22 0x4929a24 in decltype (__invoke((this)._M_pmf, (forwardstarrocks::PriorityThreadPool*&)({parm#1}), (forward<int&>)({parm#1}))) std::_Mem_fn_base<void (starrocks::PriorityThreadPool::)(int), true>::operator()<starrocks::PriorityThreadPool*&, int&>(starrocks::PriorityThreadPool*&, int&) const /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/functional:122
23 0x49299d5 in void std::__invoke_impl<void, std::_Mem_fn<void (starrocks::PriorityThreadPool::)(int)>&, starrocks::PriorityThreadPool&, int&>(std::__invoke_other, std::_Mem_fn<void (starrocks::PriorityThreadPool::)(int)>&, starrocks::PriorityThreadPool&, int&) /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/invoke.h:60
24 0x492992c in std::enable_if<is_invocable_r_v<void, std::_Mem_fn<void (starrocks::PriorityThreadPool::)(int)>&, starrocks::PriorityThreadPool&, int&>, void>::type std::__invoke_r<void, std::_Mem_fn<void (starrocks::PriorityThreadPool::)(int)>&, starrocks::PriorityThreadPool&, int&>(std::_Mem_fn<void (starrocks::PriorityThreadPool::)(int)>&, starrocks::PriorityThreadPool&, int&) /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/bits/invoke.h:110
25 0x4928705 in void std::_Bind_result<void, std::_Mem_fn<void (starrocks::PriorityThreadPool::)(int)> (starrocks::PriorityThreadPool, int)>::__call<void, , 0ul, 1ul>(std::tuple<>&&, std::_Index_tuple<0ul, 1ul>) /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/functional:566
26 0x4925a4f in void std::_Bind_result<void, std::_Mem_fn<void (starrocks::PriorityThreadPool::)(int)> (starrocks::PriorityThreadPool, int)>::operator()<>() /home/disk1/doris-deps/toolchain/installed/gcc-10.3.0/include/c++/10.3.0/functional:625
27 0x49246d7 in boost::detail::thread_data<std::_Bind_result<void, std::_Mem_fn<void (starrocks::PriorityThreadPool::)(int)> (starrocks::PriorityThreadPool, int)> >::run() /home/disk1/doris-deps/thirdparty-branch-2-0/installed/include/boost/thread/detail/thread.hpp:120
28 0x87a8796 in thread_proxy (/home/disk1/dorisdb/sqlancer_branch_asan/be/lib/starrocks_be+0x87a8796)

Thread T158 (FragmentMgrThre) created by T0 here:
0 0x39f2c32 in __interceptor_pthread_create ../../../../libsanitizer/asan/asan_interceptors.cpp:214
1 0x4e02e6a in starrocks::Thread::start_thread(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::function<void ()> const&, unsigned long, scoped_refptrstarrocks::Thread) /home/disk1/jenkins/workspace/sqlancer_branch_asan/cluster-management/resource/starrocks/be/src/util/thread.cpp:258
2 0x4dd99c0 in starrocks::Status starrocks::Thread::create<void (starrocks::ThreadPool::

Expected behavior (Required)

Real behavior (Required)

crash

StarRocks version (Required)

  • You can get the StarRocks version by executing SQL select current_version()
  • branch-2.0 asan
@wanpengfei-git wanpengfei-git added the type/bug Something isn't working label Nov 29, 2021
@trueeyu trueeyu self-assigned this Nov 29, 2021
@dirtysalt
Copy link
Contributor

dirtysalt commented Nov 29, 2021

A simpler SQL could reproduce this crash. I guess it's highly related to global dictionary.

And if we running in debug mode, that SQL will give random results.

-- set cbo_enable_low_cardinality_optimize = true;
SELECT t0.c_0_0,
         Dense_rank() OVER ( ORDER BY t0.c_0_2)
FROM     t0
WHERE    false
GROUP BY t0.c_0_0,
          t0.c_0_2
UNION
SELECT t0.c_0_0,
         Dense_rank() OVER ( ORDER BY t0.c_0_2)
FROM     t0
WHERE    (
                  NOT (
                           false))
GROUP BY t0.c_0_0,
          t0.c_0_2

@stdpain
Copy link
Contributor

stdpain commented Nov 30, 2021

mini reproduce

SELECT t0.c_0_0,
         Dense_rank() OVER ( ORDER BY t0.c_0_2)
FROM     t0
UNION
SELECT t0.c_0_0,
         Dense_rank() OVER ( ORDER BY t0.c_0_2)
FROM     t0;

caneGuy pushed a commit to caneGuy/starrocks that referenced this issue Mar 28, 2023
* broken link in create table

* Update CREATE TABLE.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants