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

db_upgrader crash when upgrade storage data #3782

Closed
HarrisChu opened this issue Jan 21, 2022 · 2 comments
Closed

db_upgrader crash when upgrade storage data #3782

HarrisChu opened this issue Jan 21, 2022 · 2 comments
Assignees
Labels
type/bug Type: something is unexpected
Milestone

Comments

@HarrisChu
Copy link
Contributor

HarrisChu commented Jan 21, 2022

  1. use copy v2.6.1 cluster
  2. replace bin folder
  3. start metad
  4. run command
nebula1/bin/db_upgrader --src_db_path=/data/nebula/nebula_multiple_harris/nebula1/data/storage \
                --dst_db_path=/data/nebula/nebula_multiple_tmp/nebula1/data/storage/ \
                --upgrade_meta_server=192.168.15.13:1552,192.168.15.13:2552,192.168.15.13:3552 \
                --upgrade_version=2:3

db_upgrader crashed

[vesoft@vesoft-192-168-15-13 nebula_multiple_harris]$ nebula1/bin/nebula-graphd -version
nebula-graphd version Git: a06b059a, Build Time: Jan 21 2022 22:42:26
This source code is licensed under Apache 2.0 License.
(gdb) bt
#0  0x0000000001d24fc0 in rocksdb::DBImpl::NewIterator(rocksdb::ReadOptions const&, rocksdb::ColumnFamilyHandle*) ()
#1  0x00000000013f9d7d in nebula::kvstore::RocksEngine::prefixWithoutExtractor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void const*, std::unique_ptr<nebula::kvstore::KVIterator, std::default_delete<nebula::kvstore::KVIterator> >*) ()
#2  0x0000000001d0a7d7 in nebula::storage::UpgraderSpace::runPartV3() ()
#3  0x00000000024429f8 in folly::ThreadPoolExecutor::runTask(std::shared_ptr<folly::ThreadPoolExecutor::Thread> const&, folly::ThreadPoolExecutor::Task&&) ()
#4  0x000000000243520f in ?? ()
#5  0x00000000024ada81 in bool folly::AtomicNotificationQueue<folly::Function<void ()> >::drive<folly::EventBase::FuncRunner&>(folly::EventBase::FuncRunner&) ()
#6  0x00000000024aeaad in non-virtual thunk to folly::EventBaseAtomicNotificationQueue<folly::Function<void ()>, folly::EventBase::FuncRunner>::handlerReady(unsigned short) ()
#7  0x0000000002569993 in ?? ()
#8  0x000000000256a067 in event_base_loop ()
#9  0x00000000024a802e in folly::EventBase::loopBody(int, bool) ()
#10 0x00000000024a891e in folly::EventBase::loop() ()
#11 0x00000000024ab558 in folly::EventBase::loopForever() ()
#12 0x0000000002435bf9 in folly::IOThreadPoolExecutor::threadRun(std::shared_ptr<folly::ThreadPoolExecutor::Thread>) ()
#13 0x0000000002444167 in void folly::detail::function::FunctionTraits<void ()>::callBig<std::_Bind<void (folly::ThreadPoolExecutor::*(folly::ThreadPoolExecutor*, std::shared_ptr<folly::ThreadPoolExecutor::Thread>))(std::shared_ptr<folly::ThreadPoolExecutor::Thread>)> >(folly::detail::function::Data&) ()
#14 0x0000000002a59ea0 in execute_native_thread_routine ()
#15 0x00007fe66f616ea5 in start_thread () from /lib64/libpthread.so.0
#16 0x00007fe66f33fb0d in clone () from /lib64/libc.so.6
@HarrisChu HarrisChu added the type/bug Type: something is unexpected label Jan 21, 2022
@HarrisChu
Copy link
Contributor Author

so confused

@SuperYoko
Copy link
Contributor

SuperYoko commented Jan 23, 2022

so confused

Sorry for my careless commit, prefix has 2 parameters first
I first change it to

  nebula::cpp2::ErrorCode prefix(const std::string& prefix,
                                 const void* snapshot ,
                                 std::unique_ptr<KVIterator>* iter) override;

and then change it to

  nebula::cpp2::ErrorCode prefix(const std::string& prefix,
                                 std::unique_ptr<KVIterator>* iter,
                                 const void* snapshot = nullptr) override;

and I forget to clear code in db updater. and remain it as

auto retCode = readEngine_->prefix(prefix, nullptr, &iter);

while it can still work...

I fixed it in #3785

Maybe void* is a bad idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Type: something is unexpected
Projects
None yet
Development

No branches or pull requests

3 participants