pingcap / tiflow

This repo maintains DM (a data migration platform) and TiCDC (change data capture for TiDB)
Apache License 2.0
423 stars 281 forks source link

tiflash crash when query #11436

Closed Lily2025 closed 1 month ago

Lily2025 commented 1 month ago

What did you do?

1、set placement rule 2、query tiflash

What did you expect to see?

no crash

What did you see instead?

tiflash crash {"namespace":"pdms-sql-related-tps-7549516-1-774","pod":"tc-tiflash-0","container":"errorlog","time":"2024-07-29T03:37:48.040411009Z","stream":"stdout","log":"[2024/07/29 11:37:47.639 +08:00] [FATAL] [Exception.cpp:106] [\"Code: 81, e.displayText() = DB::Exception: Database db_170 doesn't exist, e.what() = DB::Exception, Stack trace:\n\n\n 0x56247118e553\tDB::Exception::Exception(std::1::basic_string<char, std::__1::char_traits, std::1::allocator> const&, int) [tiflash+32740691]\n \tdbms/src/Common/StackTrace.cpp:23\n 0x5624769c286a\tDB::Context::assertDatabaseExists(std::1::basic_string<char, std::__1::char_traits, std::1::allocator> const&, bool) const [tiflash+125229162]\n \tdbms/src/Interpreters/Context.cpp:865\n 0x5624769c255e\tDB::Context::getDatabase(std::1::basic_string<char, std::__1::char_traits, std::1::allocator> const&) const [tiflash+125228382]\n \tdbms/src/Interpreters/Context.cpp:507\n 0x562476c1cd8f\tDB::InterpreterRenameQuery::execute() [tiflash+127696271]\n \tdbms/src/Interpreters/InterpreterRenameQuery.cpp:171\n 0x5624778a886c\tDB::SchemaBuilder<DB::SchemaGetter, DB::SchemaNameMapper>::applyRenamePhysicalTable(long, std::1::basic_string<char, std::__1::char_traits, std::1::allocator> const&, TiDB::TableInfo const&, std::1::shared_ptr const&) [tiflash+140851308]\n \tdbms/src/TiDB/Schema/SchemaBuilder.cpp:749\n 0x56247789afe2\tDB::SchemaBuilder<DB::SchemaGetter, DB::SchemaNameMapper>::applyRenameTable(long, long) [tiflash+140795874]\n \tdbms/src/TiDB/Schema/SchemaBuilder.cpp:678\n 0x5624778962cb\tDB::SchemaBuilder<DB::SchemaGetter, DB::SchemaNameMapper>::applyDiff(DB::SchemaDiff const&) [tiflash+140776139]\n \tdbms/src/TiDB/Schema/SchemaBuilder.cpp:323\n 0x5624710cac31\tDB::TiDBSchemaSyncer<false, false>::syncSchemasByGetter(DB::Context&, DB::SchemaGetter&) [tiflash+31939633]\n \tdbms/src/TiDB/Schema/TiDBSchemaSyncer.cpp:194\n 0x5624710cbd0b\tDB::TiDBSchemaSyncer<false, false>::syncTableSchema(DB::Context&, long) [tiflash+31943947]\n \tdbms/src/TiDB/Schema/TiDBSchemaSyncer.cpp:277\n 0x562477f7615e\tstd::1::optional DB::writeRegionDataToStorage<std::1::vector<DB::RegionDataReadInfo, std::1::allocator>>(DB::Context&, DB::RegionPtrWithBlock const&, std::1::vector<DB::RegionDataReadInfo, std::1::allocator>&, std::1::shared_ptr const&) [tiflash+147984734]\n \tdbms/src/TiDB/Schema/TiDBSchemaManager.h:41\n 0x562477f75b09\tDB::RegionTable::writeCommittedByRegion(DB::Context&, DB::RegionPtrWithBlock const&, std::1::vector<DB::RegionDataReadInfo, std::1::allocator>&, std::1::shared_ptr const&, bool) [tiflash+147983113]\n \tdbms/src/Storages/KVStore/Decode/PartitionStreams.cpp:456\n 0x562477eee851\tDB::Region::handleWriteRaftCmd(DB::WriteCmdsView const&, unsigned long, unsigned long, DB::TMTContext&) [tiflash+147429457]\n \tdbms/src/Storages/KVStore/MultiRaft/RaftCommands.cpp:481\n 0x562477ef58d7\tDB::KVStore::handleWriteRaftCmdInner(DB::WriteCmdsView const&, unsigned long, unsigned long, unsigned long, DB::TMTContext&, std::1::optional&) [tiflash+147458263]\n \tdbms/src/Storages/KVStore/MultiRaft/RaftCommandsKVS.cpp:63\n 0x562477ef5744\tDB::KVStore::handleWriteRaftCmd(DB::WriteCmdsView const&, unsigned long, unsigned long, unsigned long, DB::TMTContext&) [tiflash+147457860]\n \tdbms/src/Storages/KVStore/MultiRaft/RaftCommandsKVS.cpp:42\n 0x562477e87765\tHandleWriteRaftCmd [tiflash+147007333]\n \tdbms/src/Storages/KVStore/FFI/ProxyFFI.cpp:98\n 0x7f73992bfea9\t_$LT$engine_store_ffi..observer..TiFlashObserver$LT$T$C$ER$GT$$u20$as$u20$raftstore..coprocessor..QueryObserver$GT$::post_exec_query::h240c2c3d84d2ee6f [libtiflash_proxy.so+28831401]\n \tcontrib/tiflash-proxy/proxy_components/engine_store_ffi/src/observer.rs:155\n 0x7f739a54336c\traftstore::store::fsm::apply::ApplyDelegate$LT$EK$GT$::apply_raft_cmd::hb8d12067eb11c51c [libtiflash_proxy.so+48243564]\n \tcontrib/tiflash-proxy/components/raftstore/src/store/fsm/apply.rs:1530\n 0x7f739a5557fe\traftstore::store::fsm::apply::ApplyDelegate$LT$EK$GT$::process_raft_cmd::hf829479500040f95 [libtiflash_proxy.so+48318462]\n \tcontrib/tiflash-proxy/components/raftstore/src/store/fsm/apply.rs:1399\n 0x7f739a5580e9\traftstore::store::fsm::apply::ApplyDelegate$LT$EK$GT$::handle_raft_committed_entries::hee24047b52360b75 [libtiflash_proxy.so+48328937]\n \tcontrib/tiflash-proxy/components/raftstore/src/store/fsm/apply.rs:1145\n 0x7f739a53373d\traftstore::store::fsm::apply::ApplyFsm$LT$EK$GT$::handle_apply::hca3398a59a64f6ce [libtiflash_proxy.so+48179005]\n \tcontrib/tiflash-proxy/components/raftstore/src/store/fsm/apply.rs:4068\n 0x7f739a537a01\traftstore::store::fsm::apply::ApplyFsm$LT$EK$GT$::handle_tasks::h17829962adcd7513 [libtiflash_proxy.so+48196097]\n \tcontrib/tiflash-proxy/components/raftstore/src/store/fsm/apply.rs:4423\n 0x7f739942ee55\t_$LT$raftstore..store..fsm..apply..ApplyPoller$LT$EK$GT$$u20$as$u20$batch_system..batch..PollHandler$LT$raftstore..store..fsm..apply..ApplyFsm$LT$EK$GT$$C$raftstore..store..fsm..apply..ControlFsm$GT$$GT$::handle_normal::hd7705b57f19da499 [libtiflash_proxy.so+30334549]\n \tcontrib/tiflash-proxy/components/raftstore/src/store/fsm/apply.rs:4712\n 0x7f73993515d6\tbatch_system::batch::Poller$LT$N$C$C$C$Handler$GT$::poll::h24e1fe1cc3f17aa1 [libtiflash_proxy.so+29427158]\n \tcontrib/tiflash-proxy/components/batch-system/src/batch.rs:380\n 0x7f739948ffbf\tstd::sys_common::backtrace::rust_begin_short_backtrace::h0d3b967cdfc91423 [libtiflash_proxy.so+30732223]\n \t/rustc/89e2160c4ca5808657ed55392620ed1dbbce78d1/library/std/src/sys_common/backtrace.rs:155\n 0x7f73994ee4f9\tcore::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h544bde9cf8936717 [libtiflash_proxy.so+31118585]\n \t/rustc/89e2160c4ca5808657ed55392620ed1dbbce78d1/library/core/src/ops/function.rs:250\n 0x7f739ae55186\tstd::sys::unix::thread::Thread::new::thread_start::hd01330a228cdd35d [libtiflash_proxy.so+57753990]\n \t/rustc/89e2160c4ca5808657ed55392620ed1dbbce78d1/library/std/src/sys/unix/thread.rs:108\n 0x7f7397411802\tstart_thread [libc.so.6+653314]\n 0x7f73973b1314\tclone [libc.so.6+258836]\"] [source=\"EngineStoreApplyRes DB::HandleWriteRaftCmd(const EngineStoreServerWrap *, WriteCmdsView, RaftCmdHeader)\"] [thread_id=39]\n"}

Versions of the cluster

v8.3.0 master

current status of DM cluster (execute query-status <task-name> in dmctl)

No response

Lily2025 commented 1 month ago

should record to tiflash repo