Project

General

Profile

Actions

Bug #79151

open
BS BS

test_dedup_tool.sh: error set-chunk dedup_pool/bar offset 0 length 8 target_pool dedup_chunk_pooltgt_offset: 0 : (22) Invalid argument

Bug #79151: test_dedup_tool.sh: error set-chunk dedup_pool/bar offset 0 length 8 target_pool dedup_chunk_pooltgt_offset: 0 : (22) Invalid argument

Added by Bill Scales 4 months ago. Updated 3 months ago.

Status:
New
Priority:
Normal
Assignee:
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):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:

Description

/teuthology/yuriw-2026-05-15_14:18:16-rados-wip-yuri-testing-2026-05-14-1648-distro-default-trial/213389

Note: This is testing dedup + balanced reads enabled using rados_replica_read_policy

description: rados/singleton/{all/deduptool balance_reads/balance_reads_on mon_election/connectivity
msgr-failures/few msgr/async-v2only objectstore/{bluestore/{alloc$/{hybrid} base
mem$/{normal-2} onode-segment$/{1M} write$/{random/{compr$/{yes$/{zlib}} random}}}}
rados supported-random-distro/{rpm_latest}}
2026-05-15T14:37:50.378 INFO:tasks.workunit.client.0.trial046.stderr:set pool 2 dedup_tier to dedup_chunk_pool
2026-05-15T14:37:50.394 INFO:tasks.workunit.client.0.trial046.stderr:+ /usr/bin/rados -p dedup_pool put foo ./foo
2026-05-15T14:37:50.413 INFO:tasks.workunit.client.0.trial046.stderr:+ /usr/bin/rados -p dedup_pool put bar ./bar
2026-05-15T14:37:50.433 INFO:tasks.workunit.client.0.trial046.stderr:+ /usr/bin/rados -p dedup_chunk_pool put bar-chunk ./bar-chunk
2026-05-15T14:37:50.451 INFO:tasks.workunit.client.0.trial046.stderr:+ /usr/bin/rados -p dedup_chunk_pool put foo-chunk ./foo-chunk
2026-05-15T14:37:50.469 INFO:tasks.workunit.client.0.trial046.stderr:+ /usr/bin/rados -p dedup_pool set-chunk bar 0 8 --target-pool dedup_chunk_pool bar-chunk 0 --with-reference
2026-05-15T14:37:50.487 INFO:tasks.workunit.client.0.trial046.stderr:error set-chunk dedup_pool/bar  offset 0 length 8 target_pool dedup_chunk_pooltgt_offset: 0 : (22) Invalid argument
2026-05-15T14:37:50.488 INFO:tasks.workunit.client.0.trial046.stderr:+ echo -n 'There hi'
2026-05-15T14:37:50.488 INFO:tasks.workunit.client.0.trial046.stderr:+ /usr/bin/rados -p dedup_pool put foo ./test_obj
2026-05-15T14:37:50.506 INFO:tasks.workunit.client.0.trial046.stderr:+ /usr/bin/rados -p dedup_pool set-chunk foo 0 8 --target-pool dedup_chunk_pool foo-chunk 0 --with-reference
2026-05-15T14:37:50.523 INFO:tasks.workunit.client.0.trial046.stderr:error set-chunk dedup_pool/foo  offset 0 length 8 target_pool dedup_chunk_pooltgt_offset: 0 : (22) Invalid argument
2026-05-15T14:37:50.524 INFO:tasks.workunit.client.0.trial046.stderr:+ /usr/bin/rados -p dedup_pool tier-flush foo
2026-05-15T14:37:50.539 INFO:tasks.workunit.client.0.trial046.stderr:error tier-flush dedup_pool/foo : (22) Invalid argument
2026-05-15T14:37:50.540 INFO:tasks.workunit.client.0.trial046.stderr:+ sleep 2
2026-05-15T14:37:52.542 INFO:tasks.workunit.client.0.trial046.stderr:+ /usr/bin/rados ls -p dedup_chunk_pool
2026-05-15T14:37:52.559 INFO:tasks.workunit.client.0.trial046.stdout:bar-chunk
2026-05-15T14:37:52.559 INFO:tasks.workunit.client.0.trial046.stdout:foo-chunk
2026-05-15T14:37:52.561 INFO:tasks.workunit.client.0.trial046.stderr:++ echo -n 'There hi'
2026-05-15T14:37:52.561 INFO:tasks.workunit.client.0.trial046.stderr:++ sha1sum
2026-05-15T14:37:52.561 INFO:tasks.workunit.client.0.trial046.stderr:++ awk '{print $1}'
2026-05-15T14:37:52.562 INFO:tasks.workunit.client.0.trial046.stderr:+ CHUNK_OID=99db1422af30c1857cc0c45f8f5ea7418c397d8d
2026-05-15T14:37:52.563 INFO:tasks.workunit.client.0.trial046.stderr:++ /usr/bin/ceph osd pool ls detail
2026-05-15T14:37:52.563 INFO:tasks.workunit.client.0.trial046.stderr:++ grep dedup_pool
2026-05-15T14:37:52.563 INFO:tasks.workunit.client.0.trial046.stderr:++ awk '{print$2}'
2026-05-15T14:37:52.826 INFO:tasks.workunit.client.0.trial046.stderr:+ POOL_ID=2
2026-05-15T14:37:52.827 INFO:tasks.workunit.client.0.trial046.stderr:+ /usr/bin/ceph-dedup-tool --op chunk-get-ref --chunk-pool dedup_chunk_pool --object 99db1422af30c1857cc0c45f8f5ea7418c397d8d --target-ref bar --target-ref-pool-id 2
2026-05-15T14:37:52.847 INFO:tasks.workunit.client.0.trial046.stderr: operate fail : (2) No such file or directory
2026-05-15T14:37:52.850 INFO:tasks.workunit.client.0.trial046.stderr:++ /usr/bin/ceph-dedup-tool --op dump-chunk-refs --chunk-pool dedup_chunk_pool --object 99db1422af30c1857cc0c45f8f5ea7418c397d8d
2026-05-15T14:37:52.872 INFO:tasks.workunit.client.0.trial046.stderr:+ RESULT=
2026-05-15T14:37:52.873 INFO:tasks.workunit.client.0.trial046.stderr:++ /usr/bin/ceph-dedup-tool --op chunk-scrub --chunk-pool dedup_chunk_pool
2026-05-15T14:37:52.873 INFO:tasks.workunit.client.0.trial046.stderr:++ grep 'Damaged object'
2026-05-15T14:37:52.873 INFO:tasks.workunit.client.0.trial046.stderr:++ awk '{print$4}'
2026-05-15T14:37:52.897 INFO:tasks.workunit.client.0.trial046.stderr:+ RESULT=0
2026-05-15T14:37:52.897 INFO:tasks.workunit.client.0.trial046.stderr:+ '[' 0 -ne 1 ']'
2026-05-15T14:37:52.897 INFO:tasks.workunit.client.0.trial046.stderr:+ /usr/bin/ceph osd pool delete dedup_pool dedup_pool --yes-i-really-really-mean-it
2026-05-15T14:37:53.443 INFO:tasks.workunit.client.0.trial046.stderr:pool 'dedup_pool' does not exist
2026-05-15T14:37:53.455 INFO:tasks.workunit.client.0.trial046.stderr:+ /usr/bin/ceph osd pool delete dedup_chunk_pool dedup_chunk_pool --yes-i-really-really-mean-it
2026-05-15T14:37:54.447 INFO:tasks.workunit.client.0.trial046.stderr:pool 'dedup_chunk_pool' does not exist
2026-05-15T14:37:54.461 INFO:tasks.workunit.client.0.trial046.stderr:+ die 'Chunk-scrub failed expecting damaged objects is not 1'
2026-05-15T14:37:54.461 INFO:tasks.workunit.client.0.trial046.stdout:Chunk-scrub failed expecting damaged objects is not 1
2026-05-15T14:37:54.462 DEBUG:teuthology.orchestra.run:got remote process result: 1
2026-05-15T14:37:54.462 INFO:tasks.workunit.client.0.trial046.stderr:+ echo 'Chunk-scrub failed expecting damaged objects is not 1'
2026-05-15T14:37:54.463 INFO:tasks.workunit.client.0.trial046.stderr:+ exit 1
2026-05-15T14:37:54.463 INFO:tasks.workunit:Stopping ['rados/test_dedup_tool.sh'] on client.0...

Problem is that set-chunk which is a "read" op is being sent to a non-primary shard. The same test shows that tier-flush is also a "read" op and can be sent to a non-primary shard.

grep "rebalance or localized reads" *

0.log:2026-05-15T14:37:50.526+0000 7f251b7d76c0  4 osd.0 pg_epoch: 25 pg[2.6( v 25'10 (0'0,25'10] local-lis/les=14/15 n=1 ec=14/14 lis/c=14/14 les/c/f=15/15/0 sis=14) [1,0] r=1 lpr=14 pct=25'9 lua=0'0 crt=25'10 lcod 25'9 active mbc={}] do_op: rebalance or localized reads with rwordered not allowed osd_op(client.4422.0:1 2.6 2:602f83fe:::foo:head [set-chunk in=71b] snapc 0=[] ondisk+read+balance_reads+known_if_redirected+supports_pool_eio e25)
0.log:2026-05-15T14:37:50.542+0000 7f251bfd86c0  4 osd.0 pg_epoch: 25 pg[2.6( v 25'10 (0'0,25'10] local-lis/les=14/15 n=1 ec=14/14 lis/c=14/14 les/c/f=15/15/0 sis=14) [1,0] r=1 lpr=14 pct=25'9 lua=0'0 crt=25'10 lcod 25'9 active mbc={}] do_op: rebalance or localized reads with rwordered not allowed osd_op(client.4426.0:1 2.6 2:602f83fe:::foo:head [tier-flush] snapc 0=[] ondisk+read+balance_reads+ignore_cache+ignore_overlay+known_if_redirected+supports_pool_eio e25)
1.log:2026-05-15T14:37:50.489+0000 7f6a4e3086c0  4 osd.1 pg_epoch: 25 pg[2.3( v 25'1 (0'0,25'1] local-lis/les=14/15 n=1 ec=14/14 lis/c=14/14 les/c/f=15/15/0 sis=14) [1,2] r=0 lpr=14 crt=25'1 lcod 0'0 mlcod 0'0 active+clean] do_op: rebalance or localized reads with rwordered not allowed osd_op(client.4414.0:1 2.3 2:d21c67f7:::bar:head [set-chunk in=71b] snapc 0=[] ondisk+read+balance_reads+known_if_redirected+supports_pool_eio e25)

The issue is that all CACHE operations are rwordered and therefore must be sent to the primary:

bool OpInfo::rwordered() const {
  return may_write() || may_cache() || rwordered_forced();
}

Therefore the following ops can only be sent to the primary and requests that include them must not set the balanced or localized read flags:

    f(CACHE_FLUSH,    __CEPH_OSD_OP(CACHE, DATA, 31),    "cache-flush")        \
    f(CACHE_EVICT,    __CEPH_OSD_OP(CACHE, DATA, 32),    "cache-evict")        \
    f(CACHE_TRY_FLUSH, __CEPH_OSD_OP(CACHE, DATA, 33), "cache-try-flush") \
    f(CACHE_PIN,    __CEPH_OSD_OP(WR, DATA, 36),    "cache-pin")        \
    f(CACHE_UNPIN,    __CEPH_OSD_OP(WR, DATA, 37),    "cache-unpin")      \
    f(SET_CHUNK,    __CEPH_OSD_OP(CACHE, DATA, 40),    "set-chunk")        \
    f(TIER_FLUSH, __CEPH_OSD_OP(CACHE, DATA, 43),    "tier-flush")        \
    f(TIER_EVICT, __CEPH_OSD_OP(CACHE, DATA, 44),    "tier-evict")        \

The rados_replica_read_policy conf setting can set the balanced or localized flag for requests with these ops.


Related issues 1 (1 open — 0 closed)

Related to RADOS - Bug #83361: test_dedup_tool.sh: "There is no expected chunk object" in test_dedup_memory_limit with balance_reads_onNewAlex Ainscow

Actions

RZ Updated by Radoslaw Zarzynski 4 months ago Actions #1

Cache tiering is long deprecated.

LF Updated by Laura Flores 4 months ago Actions #2

Radoslaw Zarzynski wrote in #note-1:

Cache tiering is long deprecated.

Yeah, cache tiering was deprecated in Reef. We tried to clean everything up, but this seems to be a remnant. What can be cleaned up from this test?

BS Updated by Bill Scales 4 months ago Actions #3

I think we should probably have a separate feature to go and delete the cache tiering code, or at a minimum the teuthology QA tests for it.

For this issue we are looking at a fairly crude fix to Objecter which simply disables balanced/localized/direct reads if ANY pool is using dedupe or cache tiering. See PR https://github.com/ceph/ceph/pull/69047. It might be possible to code a more elegant version of this fix that only disables these flags for I/Os to pools using these features (so a use case with a mixture of pool types would only impact I/Os sent to pools using dedupe or tiering), but this might have more performance impact and I'm not sure it is worthwhile given dedupe is an incomplete-experimental feature and tiering is deprecated.

RZ Updated by Radoslaw Zarzynski 3 months ago Actions #4

In QA.

LF Updated by Laura Flores 3 months ago Actions #5

@Bill Scales @Alex Ainscow should this ticket have https://github.com/ceph/ceph/pull/69047 as the fix, or should the ticket be marked as a duplicate of some other ticket?

Basically, I think we should just have this fix attached to one ticket and mark all other tickets that it fixes as duplicates.

MW Updated by Matty Williams 12 days ago Actions #7

  • Related to Bug #83361: test_dedup_tool.sh: "There is no expected chunk object" in test_dedup_memory_limit with balance_reads_on added
Actions

Also available in: PDF Atom