Project

General

Profile

Actions

Bug #64040

open

PGBackend unhandled throw exceptions

Added by Matan Breizman 4 months ago. Updated 2 months ago.

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

0%

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

Description

See `PGBackend::interruptible_future<> PGBackend::write_same()`:

  if (op.writesame.data_length == 0 ||
      len % op.writesame.data_length != 0 ||
      op.writesame.data_length != osd_op.indata.length()) {
    throw crimson::osd::invalid_argument();
  }

any catch-throw usage should probably be replaced by errorator instead and handling the error should result in replying
the correct error message back. This is being tested for example in NeoRadosMisc.WriteSame and NeoRadosIo.Limits (which are now skipped):

  // Write length must be a multiple of the pattern length
  co_await expect_error_code(execute(oid, WriteOp{}
                     .writesame(0, samelen - 1, patbl)),
                 sys::errc::invalid_argument);

Actions

Also available in: Atom PDF