Project

General

Profile

Actions

Bug #4949

closed

osd: assertion on CEPH_OSD_OP_OMAPGETVALS

Added by Yehuda Sadeh almost 11 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

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

Description

Happens when this op is called on non existing object. This fixes it:

diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index 85b6266..4e396c3 100644
--- a/src/osd/ReplicatedPG.cc
+++ b/src/osd/ReplicatedPG.cc
@@ -2922,7 +2922,10 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
          ObjectMap::ObjectMapIterator iter = osd->store->get_omap_iterator(
            coll, soid
            );
-         assert(iter);
+          if (!iter) {
+            result = -ENOENT;
+            goto fail;
+          }
          iter->upper_bound(start_after);
          if (filter_prefix >= start_after) iter->lower_bound(filter_prefix);
          for (uint64_t i = 0;
Actions #1

Updated by Sage Weil almost 11 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF