Project

General

Profile

Actions

Bug #47287

open

rbd_snap_get_timestamp() hits an assert if non-existing snap ID is supplied

Added by Mudit Agarwal over 3 years ago. Updated 3 months ago.

Status:
Pending Backport
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
backport_processed
Backport:
quincy,reef
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

rbd_snap_get_timestamp() hits an assert if the snap ID which is passed in the arguments does not exist.
Instead of hitting an assert it should return an errno like ENOENT or something.

/home/jenkins-build/build/workspace/ceph-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos7/DIST/centos7/MACHINE_SIZE/gigantic/release
/14.2.10/rpm/el7/BUILD/ceph-14.2.10/src/librbd/internal.cc: In function 'int librbd::snap_get_timestamp(librbd::ImageCtx*, uint64_t, timespec*)' t
hread 7f42677fe700 time 2020-09-03 13:18:08.424902
/home/jenkins-build/build/workspace/ceph-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos7/DIST/centos7/MACHINE_SIZE/gigantic/release
/14.2.10/rpm/el7/BUILD/ceph-14.2.10/src/librbd/internal.cc: 1293: FAILED ceph_assert(snap_it != ictx->snap_info.end())
ceph version 14.2.10 (b340acf629a010a74d90da5782a2c5fe0b54ac20) nautilus (stable)
1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x14a) [0x7f42c63cf2d5]
2: (()+0x25449d) [0x7f42c63cf49d]
3: (()+0xdb7a3) [0x7f42cf96d7a3]
4: (rbd_snap_get_timestamp()+0x2a) [0x7f42cf9181ea]
5: (_cgo_71e85b333eef_Cfunc_rbd_snap_get_timestamp()+0x1f) [0x70610f]
6: /tmp/go-build401349109/b001/rbd.test() [0x46da50]
SIGABRT: abort
PC=0x7f42cef96387 m=7 sigcode=18446744073709551610


Related issues 2 (0 open2 closed)

Copied to rbd - Backport #64274: quincy: rbd_snap_get_timestamp() hits an assert if non-existing snap ID is suppliedResolvedIlya DryomovActions
Copied to rbd - Backport #64275: reef: rbd_snap_get_timestamp() hits an assert if non-existing snap ID is suppliedResolvedIlya DryomovActions
Actions #1

Updated by Greg Farnum almost 3 years ago

  • Project changed from Ceph to rbd
Actions #2

Updated by John Agombar 3 months ago

I picked this bug to try and fix to learn about submitting code changes to ceph.
This is my first ever pull request https://github.com/ceph/ceph/pull/55397

Actions #3

Updated by Ilya Dryomov 3 months ago

  • Status changed from New to Fix Under Review
  • Assignee set to John Agombar
  • Backport set to quincy,reef
  • Pull request ID set to 55397
Actions #4

Updated by Ilya Dryomov 3 months ago

  • Status changed from Fix Under Review to Pending Backport
Actions #5

Updated by Backport Bot 3 months ago

  • Copied to Backport #64274: quincy: rbd_snap_get_timestamp() hits an assert if non-existing snap ID is supplied added
Actions #6

Updated by Backport Bot 3 months ago

  • Copied to Backport #64275: reef: rbd_snap_get_timestamp() hits an assert if non-existing snap ID is supplied added
Actions #7

Updated by Backport Bot 3 months ago

  • Tags set to backport_processed
Actions

Also available in: Atom PDF