Bug #53786
openrbd diff crashes on a migrating image
0%
Description
reproduce steps:
- prepare migrate from raw format
- run rbd diff on the migrating image
ceph assertion fails:
../src/librbd/Utils.h: In function 'std::string librbd::util::data_object_name(I*, uint64_t) [with I = librbd::ImageCtx; std::string = std::__cxx11::basic_string<char>; uint64_t = long unsigned int]' thread 7f5a85cd0700 time 2022-01-06T06:38:50.369438-0600
../src/librbd/Utils.h: 160: FAILED ceph_assert(length < 96)
==406724== Process terminating with default action of signal 6 (SIGABRT)
406724 at 0x5F0724B: raise (raise.c:51)
406724 by 0x407E59: reraise_fatal (signal_handler.cc:88)
406724 by 0x407E59: handle_oneshot_fatal_signal(int) (signal_handler.cc:363)
406724 by 0x5F073BF: ??? (in /lib/x86_64-linux-gnu/libpthread-2.31.so)
406724 by 0x670B18A: _libc_signal_restore_set (internal-signals.h:86)
406724 by 0x670B18A: raise (raise.c:48)
406724 by 0x66EA858: abort (abort.c:79)
406724 by 0x55D22E3: ceph::_ceph_assert_fail(char const*, char const*, int, char const*) (assert.cc:75)
406724 by 0x55D246F: ceph::__ceph_assert_fail(ceph::assert_data const&) (assert.cc:80)
406724 by 0x4B27090: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > librbd::util::data_object_name<librbd::ImageCtx>(librbd::ImageCtx*, unsigned long) (Utils.h:160)
406724 by 0x4C8E784: librbd::io::ObjectListSnapsRequest<librbd::ImageCtx>::list_snaps() (ObjectRequest.cc:766)
406724 by 0x4C8EAFA: librbd::io::ObjectListSnapsRequest<librbd::ImageCtx>::send() (ObjectRequest.cc:755)
406724 by 0x4C7E86B: librbd::io::ObjectDispatch<librbd::ImageCtx>::list_snaps(unsigned long, std::vector<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long> > >&&, std::vector<unsigned long, std::allocator<unsigned long> >&&, int, ZTracer::Trace const&, std::map<std::pair<unsigned long, unsigned long>, interval_map<unsigned long, librbd::io::SparseExtent, librbd::io::SparseExtentSplitMerge>, std::less<std::pair<unsigned long, unsigned long> >, std::allocator<std::pair<std::pair<unsigned long, unsigned long> const, interval_map<unsigned long, librbd::io::SparseExtent, librbd::io::SparseExtentSplitMerge> > > >, int, librbd::io::DispatchResult*, Context**, Context*) (ObjectDispatch.cc:154)
406724 by 0x4B18AE9: operator() (ObjectDispatcher.cc:116)
406724 by 0x4B18AE9: internal_visit<librbd::io::ObjectDispatchSpec::ListSnapsRequest&> (variant.hpp:1028)
406724 by 0x4B18AE9: visitation_impl_invoke_impl<boost::detail::variant::invoke_visitor<const librbd::io::ObjectDispatcher<librbd::ImageCtx>::SendVisitor, false>, void*, librbd::io::ObjectDispatchSpec::ListSnapsRequest> (visitation_impl.hpp:119)
406724 by 0x4B18AE9: visitation_impl_invoke<boost::detail::variant::invoke_visitor<const librbd::io::ObjectDispatcher<librbd::ImageCtx>::SendVisitor, false>, void*, librbd::io::ObjectDispatchSpec::ListSnapsRequest, boost::variant<librbd::io::ObjectDispatchSpec::ReadRequest, librbd::io::ObjectDispatchSpec::DiscardRequest, librbd::io::ObjectDispatchSpec::WriteRequest, librbd::io::ObjectDispatchSpec::WriteSameRequest, librbd::io::ObjectDispatchSpec::CompareAndWriteRequest, librbd::io::ObjectDispatchSpec::FlushRequest, librbd::io::ObjectDispatchSpec::ListSnapsRequest>::has_fallback_type_> (visitation_impl.hpp:157)
406724 by 0x4B18AE9: visitation_impl<mpl_::int_<0>, boost::detail::variant::visitation_impl_step<boost::mpl::l_iter<boost::mpl::l_item<mpl_::long_<7>, librbd::io::ObjectDispatchSpec::ReadRequest, boost::mpl::l_item<mpl_::long_<6>, librbd::io::ObjectDispatchSpec::DiscardRequest, boost::mpl::l_item<mpl_::long_<5>, librbd::io::ObjectDispatchSpec::WriteRequest, boost::mpl::l_item<mpl_::long_<4>, librbd::io::ObjectDispatchSpec::WriteSameRequest, boost::mpl::l_item<mpl_::long_<3>, librbd::io::ObjectDispatchSpec::CompareAndWriteRequest, boost::mpl::l_item<mpl_::long_<2>, librbd::io::ObjectDispatchSpec::FlushRequest, boost::mpl::l_item<mpl_::long_<1>, librbd::io::ObjectDispatchSpec::ListSnapsRequest, boost::mpl::l_end> > > > > > > >, boost::mpl::l_iter<boost::mpl::l_end> >, boost::detail::variant::invoke_visitor<const librbd::io::ObjectDispatcher<librbd::ImageCtx>::SendVisitor, false>, void*, boost::variant<librbd::io::ObjectDispatchSpec::ReadRequest, librbd::io::ObjectDispatchSpec::DiscardRequest, librbd::io::ObjectDispatchSpec::WriteRequest, librbd::io::ObjectDispatchSpec::WriteSameRequest, librbd::io::ObjectDispatchSpec::CompareAndWriteRequest, librbd::io::ObjectDispatchSpec::FlushRequest, librbd::io::ObjectDispatchSpec::ListSnapsRequest>::has_fallback_type_> (visitation_impl.hpp:238)
406724 by 0x4B18AE9: internal_apply_visitor_impl<boost::detail::variant::invoke_visitor<const librbd::io::ObjectDispatcher<librbd::ImageCtx>::SendVisitor, false>, void*> (variant.hpp:2337)
406724 by 0x4B18AE9: internal_apply_visitor<boost::detail::variant::invoke_visitor<const librbd::io::ObjectDispatcher<librbd::ImageCtx>::SendVisitor, false> > (variant.hpp:2349)
406724 by 0x4B18AE9: apply_visitor<const librbd::io::ObjectDispatcher<librbd::ImageCtx>::SendVisitor> (variant.hpp:2393)
406724 by 0x4B18AE9: apply_visitor<librbd::io::ObjectDispatcher<librbd::ImageCtx>::SendVisitor, boost::variant<librbd::io::ObjectDispatchSpec::ReadRequest, librbd::io::ObjectDispatchSpec::DiscardRequest, librbd::io::ObjectDispatchSpec::WriteRequest, librbd::io::ObjectDispatchSpec::WriteSameRequest, librbd::io::ObjectDispatchSpec::CompareAndWriteRequest, librbd::io::ObjectDispatchSpec::FlushRequest, librbd::io::ObjectDispatchSpec::ListSnapsRequest>&> (apply_visitor_unary.hpp:68)
406724 by 0x4B18AE9: librbd::io::ObjectDispatcher<librbd::ImageCtx>::send_dispatch(librbd::io::ObjectDispatchInterface*, librbd::io::ObjectDispatchSpec*) (ObjectDispatcher.cc:200)
This is a symptom of a bug in ObjectListSnapsRequest<I>::list_from_parent
, which directly cuts to ImageListSnapsRequest
, instead of going through all image dispatches, thus missing the migration image dispatch.
Updated by Ilya Dryomov 6 months ago
- Status changed from New to Fix Under Review
- Assignee set to Or Ozeri
- Pull request ID set to 44484