Skip to content

AddressSanitizer: container-overflow DB::(anonymous namespace)::SparseGramsHashes<true>::executeImpl #78286

Closed as not planned

Description

@pamarcos

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=78176&sha=3def5d06f4cf3eab714becba2f33d9b839ef6037&name_0=PR&name_1=AST%20fuzzer%20%28asan%29

==176==ERROR: AddressSanitizer: container-overflow on address 0x50c002136450 at pc 0x5612d7d3fc0d bp 0x7f85303f7970 sp 0x7f85303f7968
READ of size 8 at 0x50c002136450 thread T716 (QueryPipelineEx)
    #0 0x5612d7d3fc0c in DB::(anonymous namespace)::SparseGramsHashes<true>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const sparseGrams.cpp
    #1 0x5612e4f36934 in DB::FunctionToExecutableFunctionAdaptor::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const build_docker/./src/Functions/IFunctionAdaptors.cpp:10:22
    #2 0x5612e4f27985 in DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const (/workspace/clickhouse+0x25817985) (BuildId: 924bd72b5d9f2d397f74402afb090a1cdc0a189d)
    #3 0x5612e4f2ac78 in DB::IExecutableFunction::executeWithoutSparseColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const (/workspace/clickhouse+0x2581ac78) (BuildId: 924bd72b5d9f2d397f74402afb090a1cdc0a189d)
    #4 0x5612e4f2d215 in DB::IExecutableFunction::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const (/workspace/clickhouse+0x2581d215) (BuildId: 924bd72b5d9f2d397f74402afb090a1cdc0a189d)
    #5 0x5612e8d2d7e1 in DB::executeAction(DB::ExpressionActions::Action const&, DB::(anonymous namespace)::ExecutionContext&, bool, bool) build_docker/./src/Interpreters/ExpressionActions.cpp:636:60
    #6 0x5612e8d2d7e1 in DB::ExpressionActions::execute(DB::Block&, unsigned long&, bool, bool) const build_docker/./src/Interpreters/ExpressionActions.cpp:770:13
    #7 0x5612efafd755 in DB::ExpressionTransform::transform(DB::Chunk&) build_docker/./src/Processors/Transforms/ExpressionTransform.cpp:25:17
    #8 0x5612e0c2795e in DB::ISimpleTransform::transform(DB::Chunk&, DB::Chunk&) build_docker/./src/Processors/ISimpleTransform.h:33:9
    #9 0x5612ef4ac1c2 in DB::ISimpleTransform::work() build_docker/./src/Processors/ISimpleTransform.cpp:89:9
    #10 0x5612ef4f1053 in DB::executeJob(DB::ExecutingGraph::Node*, DB::ReadProgressCallback*) build_docker/./src/Processors/Executors/ExecutionThreadContext.cpp:53:26
    #11 0x5612ef4f1053 in DB::ExecutionThreadContext::executeTask() build_docker/./src/Processors/Executors/ExecutionThreadContext.cpp:102:9
    #12 0x5612ef4d1b9f in DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) build_docker/./src/Processors/Executors/PipelineExecutor.cpp:296:26
    #13 0x5612ef4d45dc in DB::PipelineExecutor::executeSingleThread(unsigned long) build_docker/./src/Processors/Executors/PipelineExecutor.cpp:262:5
    #14 0x5612ef4d45dc in DB::PipelineExecutor::spawnThreadsImpl()::$_0::operator()() const build_docker/./src/Processors/Executors/PipelineExecutor.cpp:416:17
    #15 0x5612ef4d45dc in decltype(std::declval<DB::PipelineExecutor::spawnThreadsImpl()::$_0&>()()) std::__1::__invoke[abi:ne190107]<DB::PipelineExecutor::spawnThreadsImpl()::$_0&>(DB::PipelineExecutor::spawnThreadsImpl()::$_0&) build_docker/./contrib/llvm-project/libcxx/include/__type_traits/invoke.h:149:25
    #16 0x5612ef4d45dc in void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:ne190107]<DB::PipelineExecutor::spawnThreadsImpl()::$_0&>(DB::PipelineExecutor::spawnThreadsImpl()::$_0&) build_docker/./contrib/llvm-project/libcxx/include/__type_traits/invoke.h:224:5
    #17 0x5612ef4d45dc in std::__1::__function::__default_alloc_func<DB::PipelineExecutor::spawnThreadsImpl()::$_0, void ()>::operator()[abi:ne190107]() build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:210:12
    #18 0x5612ef4d45dc in void std::__1::__function::__policy_invoker<void ()>::__call_impl[abi:ne190107]<std::__1::__function::__default_alloc_func<DB::PipelineExecutor::spawnThreadsImpl()::$_0, void ()>>(std::__1::__function::__policy_storage const*) build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:610:12
    #19 0x5612db5bc511 in std::__1::__function::__policy_func<void ()>::operator()[abi:ne190107]() const build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:716:12
    #20 0x5612db5bc511 in std::__1::function<void ()>::operator()() const build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:989:10
    #21 0x5612db5bc511 in ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::worker() build_docker/./src/Common/ThreadPool.cpp:799:17
    #22 0x5612db5ca462 in decltype(*std::declval<ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*&>().*std::declval<void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&)()>()()) std::__1::__invoke[abi:ne190107]<void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&)(), ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*&, void>(void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&)(), ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*&) build_docker/./contrib/llvm-project/libcxx/include/__type_traits/invoke.h:117:25
    #23 0x5612db5ca462 in decltype(auto) std::__1::__apply_tuple_impl[abi:ne190107]<void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&)(), std::__1::tuple<ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*>&, 0ul>(void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&)(), std::__1::tuple<ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*>&, std::__1::__tuple_indices<0ul>) build_docker/./contrib/llvm-project/libcxx/include/tuple:1354:5
    #24 0x5612db5ca462 in decltype(auto) std::__1::apply[abi:ne190107]<void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&)(), std::__1::tuple<ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*>&>(void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&)(), std::__1::tuple<ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*>&) build_docker/./contrib/llvm-project/libcxx/include/tuple:1358:5
    #25 0x5612db5ca462 in ThreadFromGlobalPoolImpl<false, true>::ThreadFromGlobalPoolImpl<void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*)(), ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*>(void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&&)(), ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*&&)::'lambda'()::operator()() build_docker/./src/Common/ThreadPool.h:312:13
    #26 0x5612db5b6cf0 in std::__1::__function::__policy_func<void ()>::operator()[abi:ne190107]() const build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:716:12
    #27 0x5612db5b6cf0 in std::__1::function<void ()>::operator()() const build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:989:10
    #28 0x5612db5b6cf0 in ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::worker() build_docker/./src/Common/ThreadPool.cpp:809:17
    #29 0x5612db5c514f in decltype(*std::declval<ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool*>().*std::declval<void (ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::*)()>()()) std::__1::__invoke[abi:ne190107]<void (ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool*, void>(void (ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::*&&)(), ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool*&&) build_docker/./contrib/llvm-project/libcxx/include/__type_traits/invoke.h:117:25
    #30 0x5612db5c514f in void std::__1::__thread_execute[abi:ne190107]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool*, 2ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool*>&, std::__1::__tuple_indices<2ul>) build_docker/./contrib/llvm-project/libcxx/include/__thread/thread.h:192:3
    #31 0x5612db5c514f in void* std::__1::__thread_proxy[abi:ne190107]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool*>>(void*) build_docker/./contrib/llvm-project/libcxx/include/__thread/thread.h:201:3
    #32 0x5612cb940e76 in asan_thread_start(void*) crtstuff.c
    #33 0x7f86288abac2 in start_thread nptl/pthread_create.c:442:8
    #34 0x7f862893d84f  misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Activity

  1. added
    fuzz
    testing
    on Mar 26, 2025
  2. Algunenano commented on Mar 26, 2025

    @Algunenano
    Member

    That is literally the code introduced in the PR

  3. pamarcos commented on Mar 26, 2025

    @pamarcos
    MemberAuthor

    That is literally the code introduced in the PR

    Right, I cross-posted it there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    fuzztesting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions