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

tiflash crash when executing queries group by vector type #9485

Closed
JaySon-Huang opened this issue Sep 27, 2024 · 1 comment · Fixed by #9477
Closed

tiflash crash when executing queries group by vector type #9485

JaySon-Huang opened this issue Sep 27, 2024 · 1 comment · Fixed by #9477
Labels
component/compute severity/major type/bug The issue is confirmed as a bug.

Comments

@JaySon-Huang
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

> show create table tb9c253d8;
+-----------+--------------------------------------------------------------------+
| Table     | Create Table                                                       |
+-----------+--------------------------------------------------------------------+
| tb9c253d8 | CREATE TABLE `tb9c253d8` (                                         |
|           |   `col_48` vector NOT NULL,                                        |
|           |   `col_49` float NOT NULL DEFAULT '4182.465',                      |
|           |   `col_50` decimal(53,12) NOT NULL,                                |
|           |   PRIMARY KEY (`col_49`) /*T![clustered_index] NONCLUSTERED */     |
|           | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci |
+-----------+--------------------------------------------------------------------+

> SELECT `tb9c253d8`.`col_48` FROM `tb9c253d8` GROUP BY `tb9c253d8`.`col_48`
> explain SELECT `tb9c253d8`.`col_48` FROM `tb9c253d8` GROUP BY `tb9c253d8`.`col_48`
+------------------------------+---------+--------------+-----------------+-----------------------------------------------------------------------------------------------------------+
| id                           | estRows | task         | access object   | operator info                                                                                             |
+------------------------------+---------+--------------+-----------------+-----------------------------------------------------------------------------------------------------------+
| TableReader_40               | 108.80  | root         |                 | MppVersion: 2, data:ExchangeSender_39                                                                     |
| └─ExchangeSender_39          | 108.80  | mpp[tiflash] |                 | ExchangeType: PassThrough                                                                                 |
|   └─Projection_34            | 108.80  | mpp[tiflash] |                 | test.tb9c253d8.col_48                                                                                     |
|     └─HashAgg_32             | 108.80  | mpp[tiflash] |                 | group by:test.tb9c253d8.col_48, funcs:firstrow(test.tb9c253d8.col_48)->test.tb9c253d8.col_48              |
|       └─ExchangeReceiver_18  | 136.00  | mpp[tiflash] |                 |                                                                                                           |
|         └─ExchangeSender_17  | 136.00  | mpp[tiflash] |                 | ExchangeType: HashPartition, Compression: FAST, Hash Cols: [name: test.tb9c253d8.col_48, collate: binary] |
|           └─TableFullScan_16 | 136.00  | mpp[tiflash] | table:tb9c253d8 | keep order:false                                                                                          |
+------------------------------+---------+--------------+-----------------+-----------------------------------------------------------------------------------------------------------+

2. What did you expect to see? (Required)

3. What did you see instead (Required)

[2024/09/26 18:04:21.806 +08:00] [ERROR] [BaseDaemon.cpp:560] ["
  0x56308521691a    faultSignalHandler(int, siginfo_t*, void*) [tiflash+211568922]
                    libs/libdaemon/src/BaseDaemon.cpp:211
  0x7fd478b28d90    <unknown symbol> [libc.so.6+347536]
  0x5630865ef476    DB::ColumnVector<float>::serializeValueIntoArena(unsigned long, DB::Arena&, char const*&, TiDB::ITiDBCollator const* const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) const [tiflash+232379510]
                    dbms/src/Columns/ColumnVector.cpp:52
  0x56308629f26f    DB::ColumnArray::serializeValueIntoArena(unsigned long, DB::Arena&, char const*&, TiDB::ITiDBCollator const* const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) const [tiflash+228905583]
                    dbms/src/Columns/ColumnArray.cpp:204
  0x5630858412c7    std::__1::optional<DB::AggregationMethodSerialized<HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, DefaultHash<StringRef, void>, HashTableNoState>, DefaultHash<StringRef, void>, HashTableGrower<8ul>, Allocator<true>>>::EmplaceOrFindKeyResult<false>::ResultType> DB::Aggregator::emplaceOrFindKey<false, DB::AggregationMethodSerialized<HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, DefaultHash<StringRef, void>, HashTableNoState>, DefaultHash<StringRef, void>, HashTableGrower<8ul>, Allocator<true>>>>(DB::AggregationMethodSerialized<HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, DefaultHash<StringRef, void>, HashTableNoState>, DefaultHash<StringRef, void>, HashTableGrower<8ul>, Allocator<true>>>&, DB::AggregationMethodSerialized<HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, DefaultHash<StringRef, void>, HashTableNoState>, DefaultHash<StringRef, void>, HashTableGrower<8ul>, Allocator<true>>>::State&, unsigned long, DB::Arena&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>&) const [tiflash+218034887]
                    dbms/src/Interpreters/AggregationCommon.h:355
  0x563085817728    void DB::Aggregator::executeImpl<false, false, DB::AggregationMethodSerialized<HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, DefaultHash<StringRef, void>, HashTableNoState>, DefaultHash<StringRef, void>, HashTableGrower<8ul>, Allocator<true>>>>(DB::AggregationMethodSerialized<HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, DefaultHash<StringRef, void>, HashTableNoState>, DefaultHash<StringRef, void>, HashTableGrower<8ul>, Allocator<true>>>&, DB::Arena*, DB::Aggregator::AggProcessInfo&, std::__1::vector<TiDB::ITiDBCollator const*, std::__1::allocator<TiDB::ITiDBCollator const*>>&) const [tiflash+217863976]
                    dbms/src/Interpreters/Aggregator.cpp:793
  0x5630857cdee9    bool DB::Aggregator::executeOnBlockImpl<false, false>(DB::Aggregator::AggProcessInfo&, DB::AggregatedDataVariants&, unsigned long) [tiflash+217562857]
                    dbms/src/Interpreters/Aggregator.cpp:1039
  0x5630857965cd    DB::Aggregator::executeOnBlock(DB::Aggregator::AggProcessInfo&, DB::AggregatedDataVariants&, unsigned long) [tiflash+217335245]
                    dbms/src/Interpreters/Aggregator.cpp:961
  0x563087739927    DB::AggregateContext::buildOnLocalData(unsigned long) [tiflash+250509607]
                    dbms/src/Operators/AggregateContext.cpp:48
  0x563087739c72    DB::AggregateContext::buildOnBlock(unsigned long, DB::Block const&) [tiflash+250510450]
                    dbms/src/Operators/AggregateContext.cpp:79
  0x563087733328    DB::LocalAggregateTransform::transformImpl(DB::Block&) [tiflash+250483496]
                    dbms/src/Operators/LocalAggregateTransform.cpp:64
  0x5630874eef6f    DB::TransformOp::transform(DB::Block&) [tiflash+248106863]
                    dbms/src/Operators/Operator.cpp:129
  0x5630874ece38    DB::PipelineExec::executeImpl() [tiflash+248098360]
                    dbms/src/Flash/Pipeline/Exec/PipelineExec.cpp:141
  0x5630874ea235    DB::PipelineExec::execute() [tiflash+248087093]
                    dbms/src/Flash/Pipeline/Exec/PipelineExec.cpp:109
  0x5630875059cf    DB::PipelineTaskBase::runExecute() [tiflash+248199631]
                    dbms/src/Flash/Pipeline/Schedule/Tasks/Impls/PipelineTaskBase.h:76
  0x56308750581c    DB::PipelineTask::executeImpl() [tiflash+248199196]
                    dbms/src/Flash/Pipeline/Schedule/Tasks/Impls/PipelineTask.h:38
  0x563087514c05    DB::Task::execute() [tiflash+248261637]
                    dbms/src/Flash/Pipeline/Schedule/Tasks/Task.cpp:128
  0x56308752028d    DB::CPUImpl::exec(std::__1::unique_ptr<DB::Task, std::__1::default_delete<DB::Task>>&) [tiflash+248308365]
                    dbms/src/Flash/Pipeline/Schedule/ThreadPool/TaskThreadPoolImpl.h:32
  0x563087520007    DB::TaskThreadPool<DB::CPUImpl>::handleTask(std::__1::unique_ptr<DB::Task, std::__1::default_delete<DB::Task>>&) [tiflash+248307719]
                    dbms/src/Flash/Pipeline/Schedule/ThreadPool/TaskThreadPool.cpp:104
  0x56308751fc5e    DB::TaskThreadPool<DB::CPUImpl>::doLoop(unsigned long) [tiflash+248306782]
                    dbms/src/Flash/Pipeline/Schedule/ThreadPool/TaskThreadPool.cpp:83
  0x56308751f481    DB::TaskThreadPool<DB::CPUImpl>::loop(unsigned long) [tiflash+248304769]
                    dbms/src/Flash/Pipeline/Schedule/ThreadPool/TaskThreadPool.cpp:62
  0x563087521bd4    decltype(*std::declval<DB::TaskThreadPool<DB::CPUImpl>*>().*std::declval<void (DB::TaskThreadPool<DB::CPUImpl>::*)(unsigned long)>()(std::declval<unsigned long>())) std::__1::__invoke[abi:ue170006]<void (DB::TaskThreadPool<DB::CPUImpl>::*)(unsigned long), DB::TaskThreadPool<DB::CPUImpl>*, unsigned long, void>(void (DB::TaskThreadPool<DB::CPUImpl>::*&&)(unsigned long), DB::TaskThreadPool<DB::CPUImpl>*&&, unsigned long&&) [tiflash+248314836]
                    /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__type_traits/invoke.h:308
  0x563087521b4f    void std::__1::__thread_execute[abi:ue170006]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (DB::TaskThreadPool<DB::CPUImpl>::*)(unsigned long), DB::TaskThreadPool<DB::CPUImpl>*, unsigned long, 2ul, 3ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (DB::TaskThreadPool<DB::CPUImpl>::*)(unsigned long), DB::TaskThreadPool<DB::CPUImpl>*, unsigned long>&, std::__1::__tuple_indices<2ul, 3ul>) [tiflash+248314703]
                    /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__thread/thread.h:221
  0x563087521902    void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (DB::TaskThreadPool<DB::CPUImpl>::*)(unsigned long), DB::TaskThreadPool<DB::CPUImpl>*, unsigned long>>(void*) [tiflash+248314114]
                    /DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__thread/thread.h:232
  0x7fd478b73802    start_thread [libc.so.6+653314]"] [source=BaseDaemon] [thread_id=1316]

4. What is your TiFlash version? (Required)

master

@JaySon-Huang
Copy link
Contributor Author

close as #9477 is merged into the feature/vector-index branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/compute severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant