-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Logical error: Sort order of blocks violated for column #76866
Copy link
Copy link
Closed
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasefuzzProblem found by one of the fuzzersProblem found by one of the fuzzers
Description
Describe the bug
I can't reproduce it on Fiddle, so I am leaving the reproducible steps on my local setup with the current master on debug build.
How to reproduce
Run:
CREATE TABLE t0 (c0 Int, c1 Bool) ENGINE = SummingMergeTree((c0)) ORDER BY (c0 % 41963);
INSERT INTO TABLE t0 (c1, c0) VALUES (TRUE, 81615314);
INSERT INTO TABLE t0 (c1, c0) VALUES (TRUE, 187022644);
INSERT INTO TABLE t0 (c0, c1) VALUES (-395997223, FALSE);
INSERT INTO TABLE t0 (c0, c1) VALUES (724680820, TRUE);
INSERT INTO TABLE t0 (c1, c0) VALUES (TRUE, -206182759);
INSERT INTO TABLE t0 (c0, c1) VALUES (1840266799, FALSE), (511836162, TRUE), (1472754845, FALSE), (-629147868, TRUE);
SELECT * FROM t0 FINAL;Error message and/or stacktrace
Stack trace:
<Fatal> : Logical error: 'Sort order of blocks violated for column number 1, left: Int64_13451, right: Int64_-11452. Chunk 0, rows read 5.'.
<Fatal> : Stack trace (when copying this message, always include the lines below):
0. contrib/llvm-project/libcxx/include/__exception/exception.h:106: Poco::Exception::Exception(String const&, int) @ 0x000000001a701f72
1. src/Common/Exception.cpp:108: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000f8645f9
2. src/Common/Exception.h:114: DB::Exception::Exception(PreformattedMessage&&, int) @ 0x0000000009e7d8ac
3. src/Common/Exception.h:132: DB::Exception::Exception<unsigned long&, String, String, unsigned long&, unsigned long&, String>(int, FormatStringHelperImpl<std::type_identity<unsigned long&>::type, std::type_identity<String>::type, std::type_identity<String>::type, std::type_identity<unsigned long&>::type, std::type_identity<unsigned long&>::type, std::type_identity<String>::type>, unsigned long&, String&&, String&&, unsigned long&, unsigned long&, String&&) @ 0x00000000167a4759
4. src/Processors/Transforms/CheckSortedTransform.cpp:45: DB::CheckSortedTransform::transform(DB::Chunk&)::$_0::operator()(std::vector<COW<DB::IColumn>::immutable_ptr<DB::IColumn>, std::allocator<COW<DB::IColumn>::immutable_ptr<DB::IColumn>>> const&, unsigned long, std::vector<COW<DB::IColumn>::immutable_ptr<DB::IColumn>, std::allocator<COW<DB::IColumn>::immutable_ptr<DB::IColumn>>> const&, unsigned long) const @ 0x00000000167a44b8
5. src/Processors/Transforms/CheckSortedTransform.cpp:73: DB::CheckSortedTransform::transform(DB::Chunk&) @ 0x00000000167a401c
6. src/Processors/ISimpleTransform.h:33: DB::ISimpleTransform::transform(DB::Chunk&, DB::Chunk&) @ 0x00000000116c75b3
7. src/Processors/ISimpleTransform.cpp:89: DB::ISimpleTransform::work() @ 0x0000000016545560
8. src/Processors/Executors/ExecutionThreadContext.cpp:53: DB::ExecutionThreadContext::executeTask() @ 0x000000001656282f
9. src/Processors/Executors/PipelineExecutor.cpp:296: DB::PipelineExecutor::executeStepImpl(unsigned long, std::atomic<bool>*) @ 0x0000000016557925
10. src/Processors/Executors/PipelineExecutor.cpp:170: DB::PipelineExecutor::executeStep(std::atomic<bool>*) @ 0x0000000016556ec7
11. src/Processors/Executors/PullingPipelineExecutor.cpp:54: DB::PullingPipelineExecutor::pull(DB::Chunk&) @ 0x00000000165661fc
12. src/Processors/Executors/PullingPipelineExecutor.cpp:65: DB::PullingPipelineExecutor::pull(DB::Block&) @ 0x0000000016566358
13. src/Storages/MergeTree/MergeTask.cpp:880: DB::MergeTask::ExecuteAndFinalizeHorizontalPart::executeImpl() const @ 0x0000000015e7ef02
14. src/Storages/MergeTree/MergeTask.cpp:710: DB::MergeTask::ExecuteAndFinalizeHorizontalPart::execute() @ 0x0000000015e7d759
15. src/Storages/MergeTree/MergeTask.cpp:1484: DB::MergeTask::execute() @ 0x0000000015e83b2a
16. src/Storages/MergeTree/MergePlainMergeTreeTask.cpp:57: DB::MergePlainMergeTreeTask::executeStep() @ 0x0000000016223465
17. src/Storages/MergeTree/MergeTreeBackgroundExecutor.cpp:318: DB::MergeTreeBackgroundExecutor<DB::DynamicRuntimeQueue>::routine(std::shared_ptr<DB::TaskRuntimeData>) @ 0x0000000015ea4510
18. src/Storages/MergeTree/MergeTreeBackgroundExecutor.cpp:363: DB::MergeTreeBackgroundExecutor<DB::DynamicRuntimeQueue>::threadFunction() @ 0x0000000015ea4e53
19. contrib/llvm-project/libcxx/include/__functional/function.h:716: ? @ 0x000000000f927973
20. contrib/llvm-project/libcxx/include/__type_traits/invoke.h:117: 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()() @ 0x000000000f92d763
21. contrib/llvm-project/libcxx/include/__functional/function.h:716: ? @ 0x000000000f9250b2
22. contrib/llvm-project/libcxx/include/__type_traits/invoke.h:117: void* std::__thread_proxy[abi:se190107]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>>(void*) @ 0x000000000f92b320
23. ? @ 0x00007ffff7ca1e2e
24. ? @ 0x00007ffff7d33a4c
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasefuzzProblem found by one of the fuzzersProblem found by one of the fuzzers