Bug 2293935 - [RBD] "rbd du" fails if image created with 0 size [6.1z]
Summary: [RBD] "rbd du" fails if image created with 0 size [6.1z]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: RBD
Version: 6.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 6.1z7
Assignee: Ilya Dryomov
QA Contact: Sunil Angadi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-06-24 13:10 UTC by Ilya Dryomov
Modified: 2024-10-25 14:29 UTC (History)
6 users (show)

Fixed In Version: ceph-17.2.6-219
Doc Type: Bug Fix
Doc Text:
Previously, due to an implementation defect, `rbd du` command would crash if it encountered a 0-sized block device image. With this fix, the implementation defect is fixed and the `rbd du` command no longer crashes if a 0-sized block device image is encountered.
Clone Of: 2291447
Environment:
Last Closed: 2024-08-28 17:58:08 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Ceph Project Bug Tracker 66418 0 None None None 2024-06-24 13:10:01 UTC
Red Hat Issue Tracker RHCEPH-9217 0 None None None 2024-06-24 13:10:22 UTC
Red Hat Knowledge Base (Solution) 7086208 0 None None None 2024-10-25 14:29:00 UTC
Red Hat Product Errata RHBA-2024:5960 0 None None None 2024-08-28 17:58:12 UTC

Description Ilya Dryomov 2024-06-24 13:10:02 UTC
+++ This bug was initially created as a clone of Bug #2291447 +++

Description of problem:
Created image with 0GB size 
rbd create rep_pool_SiLuJSPClg/image1 -s 0G

when try to check rbd du it fails as below

[root@ceph-rbd1-sangadi-01-ljut20-node2 ~]# rbd du -p rep_pool_SiLuJSPClg
/builddir/build/BUILD/ceph-18.2.1/src/librbd/api/DiffIterate.cc: In function 'int librbd::api::DiffIterate<ImageCtxT>::execute() [with ImageCtxT = librbd::ImageCtx]' thread 7fd64c428c00 time 2024-06-12T03:19:10.835518-0400
/builddir/build/BUILD/ceph-18.2.1/src/librbd/api/DiffIterate.cc: 341: FAILED ceph_assert(object_diff_state.size() == end_object_no - start_object_no)
 ceph version 18.2.1-194.el9cp (04a992766839cd3207877e518a1238cdbac3787e) reef (stable)
 1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x12e) [0x7fd64d763076]
 2: /usr/lib64/ceph/libceph-common.so.2(+0x163234) [0x7fd64d763234]
 3: /lib64/librbd.so.1(+0x195b44) [0x7fd64e395b44]
 4: /lib64/librbd.so.1(+0x5524d7) [0x7fd64e7524d7]
 5: (librbd::Image::diff_iterate2(char const*, unsigned long, unsigned long, bool, bool, int (*)(unsigned long, unsigned long, int, void*), void*)+0x94) [0x7fd64e308d24]
 6: rbd(+0x2de947) [0x55e28b304947]
 7: (rbd::action::disk_usage::execute(boost::program_options::variables_map const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)+0x1027) [0x55e28b172aa7]
 8: (rbd::Shell::execute(int, char const**)+0xc17) [0x55e28b1571e7]
 9: main()
 10: /lib64/libc.so.6(+0x29590) [0x7fd64ce29590]
 11: __libc_start_main()
 12: _start()
*** Caught signal (Aborted) **
 in thread 7fd64c428c00 thread_name:rbd
2024-06-12T03:19:10.835-0400 7fd64c428c00 -1 /builddir/build/BUILD/ceph-18.2.1/src/librbd/api/DiffIterate.cc: In function 'int librbd::api::DiffIterate<ImageCtxT>::execute() [with ImageCtxT = librbd::ImageCtx]' thread 7fd64c428c00 time 2024-06-12T03:19:10.835518-0400
/builddir/build/BUILD/ceph-18.2.1/src/librbd/api/DiffIterate.cc: 341: FAILED ceph_assert(object_diff_state.size() == end_object_no - start_object_no)

 ceph version 18.2.1-194.el9cp (04a992766839cd3207877e518a1238cdbac3787e) reef (stable)

Version-Release number of selected component (if applicable):
ceph version 18.2.1-194.el9cp (04a992766839cd3207877e518a1238cdbac3787e) reef (stable)

How reproducible:
Always

Steps to Reproduce:
1.Deploy ceph and create pool
2.create images with 0 size
3.check rbd du output for 0 sized image

Actual results:
/mnt/data/workspace/ceph_linux/src/librbd/api/DiffIterate.cc: In function 'int librbd::api::DiffIterate<ImageCtxT>::execute() [with ImageCtxT = librbd::ImageCtx]' thread 7fa28543f740 time 2024-06-11T07:51:39.470207+0000
/mnt/data/workspace/ceph_linux/src/librbd/api/DiffIterate.cc: 341: FAILED ceph_assert(object_diff_state.size() == end_object_no - start_object_no)

Expected results:
command should not error out

Additional info:
https://tracker.ceph.com/issues/66418

Comment 5 errata-xmlrpc 2024-08-28 17:58:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat Ceph Storage 6.1 security, bug fix, and enhancement updates.), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2024:5960


Note You need to log in before you can comment on or make changes to this bug.