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

[Dynamic Regions] bucket refresh panic #14506

Closed
tonyxuqqi opened this issue Apr 2, 2023 · 0 comments · Fixed by #14526
Closed

[Dynamic Regions] bucket refresh panic #14506

tonyxuqqi opened this issue Apr 2, 2023 · 0 comments · Fixed by #14526
Assignees
Labels

Comments

@tonyxuqqi
Copy link
Contributor

Bug Report

[2023/04/02 20:23:26.650 +00:00] [FATAL] [lib.rs:497] ["called Option::unwrap() on a None value"] [backtrace=" 0: tikv_util::set_panic_hook::{{closure}}\n 1: <alloc::boxed::Box<F,A> as core::ops::function::Fn>::call\n at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/alloc/src/boxed.rs:2032:9\n std::panicking::rust_panic_with_hook\n at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/std/src/panicking.rs:692:13\n 2: std::panicking::begin_panic_handler::{{closure}}\n at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/std/src/panicking.rs:577:13\n 3: std::sys_common::backtrace::__rust_end_short_backtrace\n at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/std/src/sys_common/backtrace.rs:137:18\n 4: rust_begin_unwind\n at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/std/src/panicking.rs:575:5\n 5: core::panicking::panic_fmt\n at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/core/src/panicking.rs:65:14\n 6: core::panicking::panic\n at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/core/src/panicking.rs:114:5\n 7: raftstore_v2::operation::bucket::<impl raftstore_v2::fsm::peer::PeerFsmDelegate<EK,ER,T>>::on_refresh_region_buckets\n 8: raftstore_v2::fsm::peer::PeerFsmDelegate<EK,ER,T>::on_msgs\n 9: <raftstore_v2::batch::store::StorePoller<EK,ER,T> as batch_system::batch::PollHandler<raftstore_v2::fsm::peer::PeerFsm<EK,ER>,raftstore_v2::fsm::store::StoreFsm>>::handle_normal\n 10: batch_system::batch::Poller<N,C,Handler>::poll\n 11: std::sys_common::backtrace::__rust_begin_short_backtrace\n 12: core::ops::function::FnOnce::call_once{{vtable.shim}}\n 13: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once\n at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/alloc/src/boxed.rs:2000:9\n <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once\n at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/alloc/src/boxed.rs:2000:9\n std::sys::unix::thread::Thread::new::thread_start\n at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/std/src/sys/unix/thread.rs:108:17\n 14: start_thread\n 15: __clone\n"] [location=/data4/qixu/l/tikv/components/raftstore-v2/src/operation/bucket.rs:262] [thread_name=rs-3-0]

What version of TiKV are you using?

What operating system and CPU are you using?

Steps to reproduce

What did you expect?

What did happened?

@tonyxuqqi tonyxuqqi added type/bug Type: Issue - Confirmed a bug feature/developing labels Apr 2, 2023
@tonyxuqqi tonyxuqqi self-assigned this Apr 4, 2023
ti-chi-bot pushed a commit that referenced this issue Apr 8, 2023
…on_buckets (#14526)

close #14506

check apply_scheduler before using it in on_refresh_region_buckets.
This is to solve the race condition when the peer is just created by split meanwhile a refresh bucket is called immediately.

Signed-off-by: tonyxuqqi <tonyxuqi@outlook.com>

Co-authored-by: buffer <doufuxiaowangzi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants