Skip to content

Pipeline suck #57728

Closed

Description

@azat

Important: This issue was automatically generated and is used by CI for matching failures. DO NOT modify the body content. DO NOT remove labels.

Test name: Logical error: 'Pipeline stuck. Current state: (STID: 3833-2f20)
CI report: AST fuzzer (amd_debug)
Failing test history: cidb

Test output:

Error:
Logical error: 'Pipeline stuck. Current state:
digraph
{
  rankdir="LR";
  { node [shape = rect]
    n0[label="NumbersRange_0:(13 jobs, execution time: 0 sec., preparation time: 0.000010597 sec.) (PortFull)"];
    n1[label="NumbersRange_1:(92 jobs, execution time: 0 sec., preparation time: 0.000089961 sec.) (Finished)"];
    n2[label="NumbersRange_2:(99 jobs, execution time: 0 sec., preparation time: 0.000096734 sec.) (Finished)"];
    n3[label="NumbersRange_3:(87 jobs, execution time: 0 sec., preparation time: 0.000074075 sec.) (Finished)"];
    n4[label="NumbersRange_4:(113 jobs, execution time: 0 sec., preparation time: 0.000110756 sec.) (Finished)"];
---

Failed query:
SELECT sum(a[length(a)]) FROM (SELECT groupArray(number) IGNORE NULLS OVER (PARTITION BY modulo(number, 11) ORDER BY modulo(number, 1111) ASC, number ASC) AS a FROM numbers_mt(10000)) SETTINGS max_block_size = 7
---

Reproduce commands (auto-generated; may require manual adjustment):
SELECT sum(a[length(a)]) FROM (SELECT groupArray(number) IGNORE NULLS OVER (PARTITION BY modulo(number, 11) ORDER BY modulo(number, 1111) ASC, number ASC) AS a FROM numbers_mt(10000)) SETTINGS max_block_size = 7;
DROP TABLE IF EXISTS numbers_mt(10000);
---

Stack trace:
__pthread_kill @ 0x00000000000969fd
raise @ 0x0000000000042476
__lgamma_r_finite@GLIBC_2.15 @ 0x00000000000287f3
/ClickHouse/src/Common/Exception.cpp:57:5: DB::abortOnFailedAssertion(String const&, std::basic_string_view<char, std::char_traits<char>>, void* const*, unsigned long, unsigned long) @ 0x0000000016569d1d
/ClickHouse/src/Common/Exception.cpp:90:13: DB::handle_error_code(String const&, std::basic_string_view<char, std::char_traits<char>>, int, bool, std::vector<void*, std::allocator<void*>> const&) @ 0x000000001656b10d
/ClickHouse/src/Common/Exception.cpp:143:19: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000001656b3f9
/ClickHouse/src/Common/Exception.h:172:100: DB::Exception::Exception(String&&, int, String, bool) @ 0x000000000db48894
/ClickHouse/src/Common/Exception.h:58:54: DB::Exception::Exception(PreformattedMessage&&, int) @ 0x000000000db48391
/ClickHouse/src/Common/Exception.h:190:77: DB::Exception::Exception<String, String>(int, FormatStringHelperImpl<std::type_identity<String>::type, std::type_identity<String>::type>, String&&, String&&) @ 0x000000000db467c6
/ClickHouse/src/Processors/Executors/PipelineExecutor.cpp:274:15: DB::PipelineExecutor::finalizeExecution() @ 0x000000002032b131
/ClickHouse/src/Processors/Executors/PipelineExecutor.cpp:161:5: DB::PipelineExecutor::execute(unsigned long, bool) @ 0x0000000020329f44
inlined from /ClickHouse/src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:76: DB::threadFunction(DB::PullingAsyncPipelineExecutor::Data&, std::shared_ptr<DB::ThreadGroup>, unsigned long, bool)
inlined from /ClickHouse/src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:102: operator()
inlined from /ClickHouse/contrib/llvm-project/libcxx/include/__type_traits/invoke.h:87: std::__invoke_result_impl<void, DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&>::type std::__invoke[abi:se210105]<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&)
inlined from /ClickHouse/contrib/llvm-project/libcxx/include/tuple:1380: decltype(auto) std::__apply_tuple_impl[abi:se210105]<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::tuple<>&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::tuple<>&, std::__tuple_indices<...>)
inlined from /ClickHouse/contrib/llvm-project/libcxx/include/tuple:1384: decltype(auto) std::apply[abi:se210105]<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::tuple<>&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::tuple<>&)
inlined from /ClickHouse/src/Common/ThreadPool.h:312: operator()
inlined from /ClickHouse/contrib/llvm-project/libcxx/include/__type_traits/invoke.h:87: std::__invoke_result_impl<void, ThreadFromGlobalPoolImpl<true, true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&>::type std::__invoke[abi:se210105]<ThreadFromGlobalPoolImpl<true, true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<true, true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&)
inlined from /ClickHouse/contrib/llvm-project/libcxx/include/__type_traits/invoke.h:342: void std::__invoke_void_return_wrapper<void, true>::__call[abi:se210105]<ThreadFromGlobalPoolImpl<true, true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<true, true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&)
inlined from /ClickHouse/contrib/llvm-project/libcxx/include/__type_traits/invoke.h:348: DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0 std::__invoke_r[abi:se210105]<void, ThreadFromGlobalPoolImpl<true, true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&>()
/ClickHouse/contrib/llvm-project/libcxx/include/__functional/function.h:450:24: ? @ 0x0000000020341bd7
inlined from /ClickHouse/contrib/llvm-project/libcxx/include/__functional/function.h:508: ?
inlined from /ClickHouse/contrib/llvm-project/libcxx/include/__functional/function.h:772: ?
/ClickHouse/src/Common/ThreadPool.cpp:811:12: ThreadPoolImpl<std::thread>::ThreadFromThreadPool::worker() @ 0x00000000166b7943
inlined from /ClickHouse/contrib/llvm-project/libcxx/include/__type_traits/invoke.h:0: std::__invoke_result_impl<void, void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>::type std::__invoke[abi:se210105]<void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>(void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*&&)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*&&)
inlined from /ClickHouse/contrib/llvm-project/libcxx/include/__thread/thread.h:159: void std::__thread_execute[abi:se210105]<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*, 2ul>(std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>&, std::__tuple_indices<2ul>)
/ClickHouse/contrib/llvm-project/libcxx/include/__thread/thread.h:168: void* std::__thread_proxy[abi:se210105]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>>(void*) @ 0x00000000166be4ce
start_thread @ 0x0000000000094ac3
clone3 @ 0x00000000001268c0

Version info

Activity

  1. added
    fuzz
    on Dec 10, 2023
  2. al13n321 commented on Aug 16, 2024

    @al13n321
    Contributor

    https://s3.amazonaws.com/clickhouse-test-reports/68433/253188381759d062967c9bb3b9d0907f30eab61a/stateless_tests__tsan__[2_4].html

    2024.08.16 18:06:22.880623 [ 27372 ] {47425965-4495-442d-86ce-93f47f25096e} <Debug> executeQuery: (from [::1]:52246) (comment: 01732_race_condition_storage_join_long.sh) SELECT * FROM ( SELECT number AS x FROM numbers(10) ) AS t1 ALL FULL JOIN storage_join_race USING (x) FORMAT Null; (stage: Complete)
    ...
    2024.08.16 18:06:24.157017 [ 2503 ] {47425965-4495-442d-86ce-93f47f25096e} <Fatal> : Logical error: 'Pipeline stuck. Current state:
    digraph
    {
      rankdir="LR";
      { node [shape = rect]
        n0[label="NumbersRange:(0 jobs) (Ready)"];
        n1[label="ExpressionTransform:(0 jobs) (NeedData)"];
        n2[label="JoiningTransform:(0 jobs) (NeedData)"];
        n3[label="ExpressionTransform:(0 jobs) (NeedData)"];
        n4[label="LimitsCheckingTransform:(0 jobs) (NeedData)"];
        n5[label="NullSource:(0 jobs) (NeedData)"];
        n6[label="NullSource:(0 jobs) (NeedData)"];
        n7[label="LazyOutputFormat:(0 jobs) (NeedData)"];
      }
      n0 -> n1;
      n1 -> n2;
      n2 -> n3;
      n3 -> n4;
      n4 -> n7;
      n5 -> n7;
      n6 -> n7;
    }
    '.
    

    graphviz

    Also https://s3.amazonaws.com/clickhouse-test-reports/68433/253188381759d062967c9bb3b9d0907f30eab61a/stateless_tests__tsan__[4_4].html with a different test and query and smaller graph:

    graphviz

  3. PedroTadim commented on Jun 6, 2025

    @PedroTadim
    Member

    Simplified here: https://fiddle.clickhouse.com/170afd79-f40b-470a-a2de-ccb7e9fc72e9. The issue doesn't always happen, so it may be a race condition somewhere. Also, the result is not deterministic.

  4. added
    bug
    on Jun 6, 2025
  5. nickitat commented on Jan 26, 2026

    @nickitat
    Member

    There were a few errors recently: link

  6. added
    testing
    on Feb 11, 2026
  7. added 2 commits that reference this issue on Feb 28, 2026
    9d79504
    48200cc
  8. alexey-milovidov commented on Mar 2, 2026

    @alexey-milovidov
    Member

    Tested the fiddle from comments on current master (ed6302e) with clickhouse-local. The issue appears to be fixed — the query completes successfully without pipeline getting stuck:

    SELECT sum(a[length(a)]) FROM (SELECT groupArray(number) OVER (...) AS a
        FROM numbers_mt(10000)) SETTINGS max_block_size = 8, max_rows_to_sort = 100,
        sort_overflow_mode = 'break', ...;
    -- Returns: 758582 (completes normally)

    No pipeline stall. This can be closed once a regression test is added.

  9. changed the title [-]Pipeline stuck[/-] [+]Pipeline suck[/+] on Mar 2, 2026
  10. alexey-milovidov commented on Mar 2, 2026

    @alexey-milovidov
    Member

    Not fixed!

  11. added a commit that references this issue on Mar 3, 2026
    5c8f601
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

    bugfuzztesting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions