Project

General

Profile

Actions

Bug #81135

closed
LF RF

ceph_test_rados workload aborts on copy_from, returning -ETIMEDOUT on EC pool

Bug #81135: ceph_test_rados workload aborts on copy_from, returning -ETIMEDOUT on EC pool

Added by Laura Flores 2 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Tags (freeform):
Fixed In:
v21.3.0-4447-g3eb359d61c
Released In:
Upkeep Timestamp:
2026-10-14T19:46:02+00:00

Description

/a/skanta-2026-09-29_12:20:32-rados-wip-bharath15-testing-20260929.043152-main-distro-default-trial/590933

2026-09-29T14:26:45.358 DEBUG:teuthology.orchestra.run.trial174:> CEPH_CLIENT_ID=0 adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage daemon-helper kill ceph_test_rados --ec-pool --max-ops 4000 --objects 50 --max-in-flight 16 --size 4000000 --min-stride-size 400000 --max-stride-size 800000 --max-seconds 0 --op read 100 --op write 0 --op delete 50 --op snap_create 50 --op snap_remove 50 --op rollback 50 --op setattr 25 --op rmattr 25 --op copy_from 50 --op append 100 --pool unique_pool_0
...
2026-09-29T14:56:08.940 INFO:tasks.rados.rados.0.trial174.stdout:2921:  finishing copy_from to trial17433130-21
2026-09-29T14:56:08.941 INFO:tasks.rados.rados.0.trial174.stderr:Error: oid 21 copy_from 39 returned error code -110
2026-09-29T14:56:08.942 INFO:tasks.rados.rados.0.trial174.stderr:/ceph/rpmbuild/BUILD/ceph-21.3.0-3603-g293bf268/src/test/osd/RadosModel.h: In function 'virtual void CopyFromOp::_finish(TestOp::CallbackInfo*)' thread 7ff609ffb6c0 time 2026-09-29T14:56:08.929211+0000
2026-09-29T14:56:08.942 INFO:tasks.rados.rados.0.trial174.stderr:/ceph/rpmbuild/BUILD/ceph-21.3.0-3603-g293bf268/src/test/osd/RadosModel.h: 2155: ceph_abort_msg("abort() called")
2026-09-29T14:56:08.942 INFO:tasks.rados.rados.0.trial174.stderr: ceph version 21.3.0-3603-g293bf268 (293bf26816cdf2dacf3f41cf94d06d6313c4d831) umbrella (dev - RelWithDebInfo)
2026-09-29T14:56:08.942 INFO:tasks.rados.rados.0.trial174.stderr: 1: (ceph::__ceph_abort(char const*, int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0xca) [0x7ff612f57522]
2026-09-29T14:56:08.942 INFO:tasks.rados.rados.0.trial174.stderr: 2: ceph_test_rados(+0x2a772) [0x55a1148a0772]
2026-09-29T14:56:08.942 INFO:tasks.rados.rados.0.trial174.stderr: 3: (write_callback(void*, void*)+0x1d) [0x55a1148b067d]
2026-09-29T14:56:08.942 INFO:tasks.rados.rados.0.trial174.stderr: 4: /lib64/librados.so.2(+0xab2a6) [0x7ff613a6f2a6]
2026-09-29T14:56:08.942 INFO:tasks.rados.rados.0.trial174.stderr: 5: /lib64/librados.so.2(+0xaac15) [0x7ff613a6ec15]
2026-09-29T14:56:08.942 INFO:tasks.rados.rados.0.trial174.stderr: 6: /lib64/librados.so.2(+0xaae25) [0x7ff613a6ee25]
2026-09-29T14:56:08.942 INFO:tasks.rados.rados.0.trial174.stderr: 7: /lib64/librados.so.2(+0xcb407) [0x7ff613a8f407]
2026-09-29T14:56:08.943 INFO:tasks.rados.rados.0.trial174.stderr: 8: /lib64/librados.so.2(+0xc1553) [0x7ff613a85553]
2026-09-29T14:56:08.943 INFO:tasks.rados.rados.0.trial174.stderr: 9: /lib64/libstdc++.so.6(+0xee0e4) [0x7ff6124ee0e4]
2026-09-29T14:56:08.943 INFO:tasks.rados.rados.0.trial174.stderr: 10: /lib64/libc.so.6(+0x958bf) [0x7ff6122bc8bf]
2026-09-29T14:56:08.943 INFO:tasks.rados.rados.0.trial174.stderr: 11: /lib64/libc.so.6(+0x10643c) [0x7ff61232d43c]

"-110" --> "-ETIMEDOUT" in the Linux error table: https://www.chromium.org/chromium-os/developer-library/reference/linux-constants/errnos/

ceph_test_rados tests "unique_pool_0"'s handling of a mix of operations. unique_pool_0 is an EC pool with an ISA 6+3 profile:

2026-09-29T14:26:40.337 DEBUG:teuthology.orchestra.run.trial001:> sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage timeout 120 ceph --cluster ceph osd pool create unique_pool_0 16 16 erasure isa63profile

This PR was just recently merged, which seems related to the issue. It kills a job if a rados osd up is hung for 900s:

It's possible that copy_from ops normally take more time during this workload, but now with the op timeout enforced, the test errors out.

RadosModel.h currently tolerates -ENOENT since that result is expected in the test if the source object it's supposed to copy doesn't exist.
The test logs a message but then continues on:

  void _finish(CallbackInfo *info) override
  {
    std::lock_guard l{context->state_lock};

    // note that the read can (and atm will) come back before the
    // write reply, but will reflect the update and the versions will
    // match.

    if (info->id == 0) {
      // copy_from
      ceph_assert(comp->is_complete());
      context->cout_prefix() << num << ":  finishing copy_from to " << context->prefix + oid << std::endl;
      if ((r = comp->get_return_value())) {
        if (r == -ENOENT && src_value.deleted()) {
          context->cout_prefix() << num << ":  got expected ENOENT (src dne)" << std::endl;
        } else {
          std::cerr << "Error: oid " << oid << " copy_from " << oid_src << " returned error code " 
               << r << std::endl;
          ceph_abort();
        }
      } else {
        ceph_assert(!version || comp->get_version64() == version);
        version = comp->get_version64();
        context->update_object_version(oid, comp->get_version64());
      }

Other error codes (such as ETIMEDOUT) are not tolerated, and end the test with an abort.

I think we either need to extend rados_osd_op_timeout here, or make RadosModel.h tolerate -ETIMEDOUT
if that is more appropriate. I'm unsure how to check which op was stalled and for how long; I'd say
if it was making progress, we could extend the timeout. But if it truly was stuck, there's something
else going on.

Given that this test was passing until very recently, and the related PR was only just merged,
I highly suspect we could probably just extend the timeout.


Related issues 1 (0 open — 1 closed)

Related to RADOS - Bug #81629: qa/rados: osd-dispatch-delay injection probability (0.1) starves the OSD op queue with compression on wide EC poolsResolvedAlex Ainscow

Actions

LF Updated by Laura Flores 2 months ago Actions #1

  • Description updated (diff)

LF Updated by Laura Flores 2 months ago Actions #2

/a/skanta-2026-09-29_12:20:32-rados-wip-bharath15-testing-20260929.043152-main-distro-default-trial/590922

LF Updated by Laura Flores 2 months ago Actions #3

RF Updated by Ronen Friedman 2 months ago ยท Edited Actions #4

@Laura Flores - thanks. Here is my analysis. As mentioned below - I'll limit the effect of the original PR you hinted at to not include some tests.

I went through the logs of both jobs. Short version: the PR is indeed the
trigger, and 590933 is a straight QA config regression on my side. 590922 is
mostly the same story, but it has a real anomaly buried in it. Neither of the
two fixes suggested above is safe, and I think we can keep the detection the
PR was aiming for without the false positives.

1. /a/skanta-2026-09-29_12:20:32-.../590933 (thrash-erasure-code-isa)

Not a copy_from bug and not an EC bug. The pool was simply unavailable.

"2921: copy_from oid 21 from oid 39" submitted 14:41:08.928, cancelled with
ETIMEDOUT at 14:56:08.94 - exactly 900s. Client tid client.4814.0:6822,
PG 3.1c, resent four times as PGs re-peered and pg_num changed:

  osd.14            e786
  osd.1  (3.1cs3)   e1115
  osd.7  (3.1cs1)   e1122
  osd.8  (3.1cs0)   e1157   14:49:50 -> sat here until cancelled

Objecter::_maybe_arm_op_timeout() arms the deadline once, at first submission,
and does not re-arm on resend, so those 900s span all four attempts.

Meanwhile the thrasher had taken the cluster down to 3 of 16 OSDs "in"
("num_in_osds": 3, "inactive_pgs_ratio": 0.83). The workload pool is ISA
k=6 m=3, min_size 6, so it could not peer. The in-OSD count never reached 9
again after 14:41:54, was below 6 from 14:43:28, and was pinned at 3 from
14:47:11 to the end of the window.

Nothing is copy_from-specific: ordinary writes in the same window took
400-500s (op 2924: 462s, op 2945: 428s) and the test kept printing
" waiting on 16". copy_from is just the op whose absolute deadline expired
first. osd.8's op tracker flags these as 'delayed' throughout -- the PG had
the op and legitimately could not serve it.

The faulty premise is in my own commit message:

"it is several times longer than the longest stall any thrasher here
induces on purpose (~125s for test_pool_min_size, 80s for the injected
pauses)"

Not true for the EC thrash suites.
qa/suites/rados/thrash-erasure-code-isa/thrashers is a symlink to
../thrash/thrashers, i.e. the replicated suite's thrashers -- all nine use
"min_in: 2" -- while the workloads there go up to isa-k=10-m=4.
Thrasher.choose_action() is a random walk with no bounded return time, so
there is no value of rados_osd_op_timeout that is safe for these suites.
Raising it only makes the failure rarer.

2. /a/skanta-2026-09-29_12:20:32-.../590922 (rados/thrash, replicated 3/2)

"2211: copy_from oid 38 from oid 2": 14:54:08.495 -> 15:09:08.494. The client
op was blocked on its OSD-internal sub-op:

  osd_op(osd.5.21:18 3.ca 3:5333418a:::trial14437374-2:head
      [assert-version v528, copy-get max 8388608 in=29b] e1859)

which reached osd.15 at 14:54:11.999 and was never answered. osd.5 reissued it
three times (tid 19 e1912, tid 20 e1951, tid 20 retry e2326); none answered.

Most of the window is the same thrashing story as 590933. From osd.15's log,
PG 3.ca exited Started/Primary/Active/Clean at 14:57:29 (1819s in Clean) and
then churned:

  14:57:29 - 14:59:37   peering / remapped+peering
  14:59:41 - 15:03:24   activating
  15:03:25 - 15:06:46   active+clean+snaptrim+laggy
  15:06:49 - 15:07:05   peering
  15:07:08 - 15:08:42   activating(+degraded)

But the first ~3 minutes are not explained by that. The op tracker on osd.15
reports:

  14:54:42 - 15:01:34   'queued for pg'
  15:02:21 onward       'delayed'

So from 14:54:42 to 14:57:29 -- 2m47s -- the copy-get sat in state 'queued for
pg' on a PG that was still active+clean, i.e. the OSD never dequeued it. The
'delayed' phase afterwards is consistent with activating/laggy and is not
surprising; the 'queued for pg' phase on a healthy PG is.

I don't have enough from debug osd = 5 to say why. Leads worth checking in a
repro at debug osd = 20: the pool was snaptrimming on and off throughout
(active+clean+snaptrim_wait, trimq non-empty), and qa/config/rados.yaml sets
"osd mclock profile: high_recovery_ops" together with
"osd op queue: debug_random", so client-op starvation behind snaptrim is a
plausible direction.

I'll open a separate tracker for this; it should not be closed together with
the QA config issue.

3. Why "teach RadosModel.h to tolerate -ETIMEDOUT" is not an option

Objecter::op_cancel() only completes the Op locally and calls _finish_op().
Nothing is sent to the OSD -- the op is still in flight and the write may
still commit. If RadosModel.h swallowed -ETIMEDOUT (or retried on it), the
test's object version/content model would silently diverge from the cluster
and we would get spurious data-mismatch aborts later, somewhere unrelated.
That is a worse failure mode than what we have now.

4. Proposed fix

Two parts, because simply dropping the timeout in the thrash suites would also
lose the one genuine finding above.

(a) Take the client-side deadline out of the thrash suites.

Today the client stanza reaches 15 suites through the shared
qa/config/rados.yaml symlink, including every thrash suite -- collateral
damage from a change aimed at the non-thrashing ones. Note that
qa/config/rados.yaml is an "overrides:" block, so it cannot be neutralized
from a suite's "tasks: ceph: conf:" section. So:

- drop the client stanza from qa/config/rados.yaml;
- move it to a separate qa/config/rados_op_timeout.yaml, symlinked only into
suites with no OSD thrasher: rados/basic, rados/monthrash, rados/multimon,
rados/singleton-nomsgr, rados/singleton-bluestore, netsplit.
(rados/singleton and rados/verify each contain thrashosds fragments, so
they need per-fragment placement or should be left out.)
- replace the comment with the real constraint: a client-side deadline is
only valid where no thrasher can take a pool below min_size.

(b) Detect stuck ops where the information actually is: the OSD.

A client deadline cannot distinguish "the pool is unavailable because I just
took 13 OSDs out" from "this op is wedged". The op tracker can, and it already
did in both jobs above -- we just throw it away, because thrashosds-health.yaml
ignorelists SLOW_OPS, "slow request" and REQUEST_SLOW wholesale.

Concretely: a periodic check in the thrasher that samples blocked ops
(dump_blocked_ops, or the cluster-log slow-request WRNs, which already carry
the flag point) and fails the job on

flag point 'queued for pg', held longer than T, on a PG reporting active

while ignoring 'delayed' / 'waiting for readable' and anything on a PG that is
peering/activating/laggy/below min_size.

Against these two jobs that rule fires on 590922 at roughly T=120s and stays
quiet on 590933, which is exactly the discrimination we want. It also gives
attribution for free -- op, PG, flag point, duration -- which is the part I had
to reconstruct by hand here. I'd start deliberately narrow ('queued for pg'
only) and widen later if it proves stable; other flag points such as "waiting
for degraded object" can legitimately last a long time under thrashing.

I'll post a PR with (a).

Separately, and not part of that PR: "min_in: 2" in the EC thrash suites looks
wrong on its own. thrash-erasure-code-isa runs pools needing 6 to 10 shards
against a thrasher allowed to leave 2 OSDs in. It was harmless only because
clients blocked indefinitely instead of failing. Fixing it properly (per-suite
min_in >= k+1) would meaningfully shrink what those suites exercise, so I'd
rather discuss it on its own ticket.

RF Updated by Ronen Friedman about 2 months ago Actions #5

  • Status changed from New to Fix Under Review
  • Assignee set to Ronen Friedman
  • Pull request ID set to 72389

LF Updated by Laura Flores about 2 months ago Actions #6

Added to a QA batch.

AA Updated by Alex Ainscow about 2 months ago Actions #7

  • Related to Bug #81629: qa/rados: osd-dispatch-delay injection probability (0.1) starves the OSD op queue with compression on wide EC pools added

MW Updated by Matty Williams about 2 months ago Actions #8

/a/skanta-2026-09-30_04:36:41-rados-wip-bharath14-testing-20260930.003013-main-distro-default-trial/593684

KS Updated by Kamoltat (Junior) Sirivadhna about 2 months ago Actions #9

  • Status changed from Fix Under Review to Pending Backport

PR merged moving to pending backport

UB Updated by Upkeep Bot about 2 months ago Actions #10

  • Status changed from Pending Backport to Resolved
  • Merge Commit set to 3eb359d61cb020e659750485894debafedec4a1b
  • Fixed In set to v21.3.0-4447-g3eb359d61c
  • Upkeep Timestamp set to 2026-10-14T19:46:02+00:00

CF Updated by Connor Fawcett about 2 months ago Actions #11

/a/skanta-2026-09-30_21:49:09-rados-wip-bharath8-testing-20260930.133801-main-distro-default-trial/597588

AL Updated by Adam Lyon-Jones about 1 month ago Actions #12

/a/skanta-2026-10-12_23:32:34-rados-wip-bharath20-testing-20261012.132505-main-distro-default-trial
2 jobs: ['631238', '631357']

Actions

Also available in: PDF Atom