Skip to content

umbrella: pybind/rbd: handle non-existent groups properly in list_snaps() - #70256

Merged
batrick merged 1 commit into
ceph:umbrellafrom
VinayBhaskar-V:wip-78265-umbrella
Jul 27, 2026
Merged

batrick merged 1 commit into
ceph:umbrellafrom
VinayBhaskar-V:wip-78265-umbrella

Conversation

@VinayBhaskar-V

Copy link
Copy Markdown
Contributor

Calling `list_snaps()` on a non-existent group crashed the entire
Python process with a `free(): invalid pointer` error. This happened
because an unexpected `-ENOENT` error returned by `rbd_group_snap_list2`
and the exception was raised without updating the num_group_snaps to 0
from 10. Later the Cython `__dealloc__` wrapper attempted to free garbage
of uninitialized pointer spaces resulting in a crash.

Fix this behavior by resetting `self.num_group_snaps` to 0 inside
`GroupSnapIterator` before raising exception to prevent memory
corruption and accessing uninitialized pointers during cleanup call

Now `list_snaps()` consistently raise an `ObjectNotFound` error when
invoked on a non-existent group.
Also Extended the `TestGroups` test fixture with `self.dne_group` to
validate the expected error path for `list_snaps()`.

Fixes: https://tracker.ceph.com/issues/78034
Signed-off-by: VinayBhaskar-V <[email protected]>
(cherry picked from commit 56bcf70)
@VinayBhaskar-V
VinayBhaskar-V requested a review from a team as a code owner July 16, 2026 15:04
@VinayBhaskar-V VinayBhaskar-V added this to the umbrella milestone Jul 16, 2026
@github-actions github-actions Bot added rbd tests releng-audit-pass Release engineering: passed backport verification audit. labels Jul 16, 2026
@idryomov

Copy link
Copy Markdown
Contributor

jenkins test make check

@yuriw

yuriw commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-yuri3-testing-20260721.154228-umbrella.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-qa pybind rbd ready-to-merge releng-audit-pass Release engineering: passed backport verification audit. TESTED tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants