Skip to content

common/io_exerciser: fix four ceph_test_rados_io_sequence defects - #72383

Merged
aainscow merged 6 commits into
ceph:mainfrom
aainscow:wip-io-exerciser-fixes
Oct 19, 2026
Merged

aainscow merged 6 commits into
ceph:mainfrom
aainscow:wip-io-exerciser-fixes

Conversation

@aainscow

@aainscow aainscow commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Four defects in ceph_test_rados_io_sequence, found running it against replicated and erasure coded pools:

  1. Seq16 issued a Consistency op after every TruncateWrite whether or not --checkconsistency was given. A replicated pool has no consistency checker, so any run on one that reached Seq16 failed ceph_assert(cc) in RadosIo::applyIoOp(). Seq16 now checks consistency only when asked, as the other sequences do.
  2. The Consistency case in RadosIo::applyIoOp() had no break, so every consistency check also ran the Copy case and copied the primary object over the secondary one behind the model's back. Added the break.
  3. Seq15 read its copy target while the copy_from and truncate were still in flight. With balanced reads the read could reach a replica first and return the object as it was before the copy, which the tool reported as a miscompare. Seq15 now issues a barrier after them.
  4. When no object could start an I/O, the main loop of run_automated_test() never waited on its condition variable and spun on RadosIo's lock while any I/O was outstanding (about 65 CPU seconds a minute with --parallel 1, against 12 with the fix; a run left behind after its cluster went away spun for 14 hours). It now waits.

Testing: the new unittest_io_sequence steps every sequence to Done without a cluster. Its Seq16 test fails before the first fix and its Seq15 test (NoReadWhileWholeObjectWriteInFlight) fails before the Seq15 fix; both pass with the fixes. Checked commit by commit on a main build.

Fixes: https://tracker.ceph.com/issues/81389

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

🤖 Generated with Claude Code

https://claude.ai/code/session_012ETDivFUQubLqznTDowHRu

@JonBailey1993 JonBailey1993 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few comments from reading through

Comment thread src/test/osd/test_io_sequence.cc Resolved
Comment thread src/common/io_exerciser/IoSequence.cc Resolved
Comment thread src/common/io_exerciser/RadosIo.cc Resolved
Comment thread src/test/osd/test_io_sequence.cc Resolved
Comment thread src/test/osd/test_io_sequence.cc Resolved
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 8, 2026
…ences

Answers two of Jon Bailey's review comments on
ceph#72383.

On the step limit in NoConsistencyOpsUnlessRequested, which he asked to
have a comment saying why it is there
(ceph#72383 (comment)): the
limit is only in this unit test, not in ceph_test_rados_io_sequence.
Move it into run_sequence(), which every test in the file uses to step a
sequence to Done, with a comment saying it makes a sequence that never
reaches Done fail with its name instead of hanging until the ctest
timeout, and lower it from 10,000,000 to 1,000,000. The longest sequence
here, Seq14, takes 29,255 steps.

On the hardcoded skip of Seq10, which he asked to leave to
getNextSupportedSequenceId() or is_supported()
(ceph#72383 (comment)): add
supported_sequences(), which walks the sequences with
getNextSupportedSequenceId() as ceph_test_rados_io_sequence does, and
loop over that. generate_sequence() aborts for Seq10, so each next
sequence is asked of the one before it.

To be squashed into "test/osd: demonstrate io_sequence Seq16 checking
consistency unasked" before merge.

Assisted-by: Claude Code
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 8, 2026
Answers Jon Bailey's review comment on
ceph#72383
(ceph#72383 (comment)), which
asked for Seq16 to set consistency from check_consistency and return a
barrier, so that the check always follows a barrier and Seq16 matches
Seq5 to Seq9.

Do that. IoSequence::next() then issues the Consistency op, followed by
another barrier, only when check_consistency is set. Seq16 still issues
20 TruncateWrites; with check_consistency it now issues an extra barrier
before each of its checks, and without it the ops are unchanged.

To be squashed into "common/io_exerciser: only check consistency in
Seq16 when asked" before merge. Its body should then say "set
consistency from check_consistency and return a barrier, as Seq5 to
Seq9 do" instead of "otherwise just a barrier".

Assisted-by: Claude Code
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 8, 2026
Answers two of Jon Bailey's review comments on
ceph#72383.

On the hardcoded skip of Seq10, which he asked to leave to
getNextSupportedSequenceId() or is_supported()
(ceph#72383 (comment)): loop
over supported_sequences(), as NoConsistencyOpsUnlessRequested now does.

On the default case of the switch over OpType, which he asked to replace
with the missing cases so that a new op has to be considered here
(ceph#72383 (comment)): give
every OpType a case and drop the default. Consistency reads the object,
so it is checked like a read. The ops that do not rewrite a whole object
need nothing. A plain build only warns (-Wswitch) about a missing case,
but make check builds with -Werror, where it fails.

To be squashed into "test/osd: demonstrate Seq15 reading while a copy or
truncate is in flight" before merge.

Assisted-by: Claude Code
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 8, 2026
…ences

Answers two of Jon Bailey's review comments on
ceph#72383.

On the step limit in NoConsistencyOpsUnlessRequested, which he asked to
have a comment saying why it is there
(ceph#72383 (comment)): the
limit is only in this unit test, not in ceph_test_rados_io_sequence.
Move it into run_sequence(), which every test in the file uses to step a
sequence to Done, with a comment saying it makes a sequence that never
reaches Done fail with its name instead of hanging until the ctest
timeout, and lower it from 10,000,000 to 1,000,000. The longest sequence
here, Seq14, takes 29,255 steps.

On the hardcoded skip of Seq10, which he asked to leave to
getNextSupportedSequenceId() or is_supported()
(ceph#72383 (comment)): add
supported_sequences(), which walks the sequences with
getNextSupportedSequenceId() as ceph_test_rados_io_sequence does, and
loop over that. generate_sequence() aborts for Seq10, so each next
sequence is asked of the one before it.

To be squashed into "test/osd: demonstrate io_sequence Seq16 checking
consistency unasked" before merge.

Assisted-by: Claude Code
(cherry picked from commit 32c0d60)
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 8, 2026
Answers Jon Bailey's review comment on
ceph#72383
(ceph#72383 (comment)), which
asked for Seq16 to set consistency from check_consistency and return a
barrier, so that the check always follows a barrier and Seq16 matches
Seq5 to Seq9.

Do that. IoSequence::next() then issues the Consistency op, followed by
another barrier, only when check_consistency is set. Seq16 still issues
20 TruncateWrites; with check_consistency it now issues an extra barrier
before each of its checks, and without it the ops are unchanged.

To be squashed into "common/io_exerciser: only check consistency in
Seq16 when asked" before merge. Its body should then say "set
consistency from check_consistency and return a barrier, as Seq5 to
Seq9 do" instead of "otherwise just a barrier".

Assisted-by: Claude Code
(cherry picked from commit 1656902)
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 8, 2026
Answers two of Jon Bailey's review comments on
ceph#72383.

On the hardcoded skip of Seq10, which he asked to leave to
getNextSupportedSequenceId() or is_supported()
(ceph#72383 (comment)): loop
over supported_sequences(), as NoConsistencyOpsUnlessRequested now does.

On the default case of the switch over OpType, which he asked to replace
with the missing cases so that a new op has to be considered here
(ceph#72383 (comment)): give
every OpType a case and drop the default. Consistency reads the object,
so it is checked like a read. The ops that do not rewrite a whole object
need nothing. A plain build only warns (-Wswitch) about a missing case,
but make check builds with -Werror, where it fails.

To be squashed into "test/osd: demonstrate Seq15 reading while a copy or
truncate is in flight" before merge.

Assisted-by: Claude Code
(cherry picked from commit a7d73d0)
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 12, 2026
…ences

Answers two of Jon Bailey's review comments on
ceph#72383.

On the step limit in NoConsistencyOpsUnlessRequested, which he asked to
have a comment saying why it is there
(ceph#72383 (comment)): the
limit is only in this unit test, not in ceph_test_rados_io_sequence.
Move it into run_sequence(), which every test in the file uses to step a
sequence to Done, with a comment saying it makes a sequence that never
reaches Done fail with its name instead of hanging until the ctest
timeout, and lower it from 10,000,000 to 1,000,000. The longest sequence
here, Seq14, takes 29,255 steps.

On the hardcoded skip of Seq10, which he asked to leave to
getNextSupportedSequenceId() or is_supported()
(ceph#72383 (comment)): add
supported_sequences(), which walks the sequences with
getNextSupportedSequenceId() as ceph_test_rados_io_sequence does, and
loop over that. generate_sequence() aborts for Seq10, so each next
sequence is asked of the one before it.

To be squashed into "test/osd: demonstrate io_sequence Seq16 checking
consistency unasked" before merge.

Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 12, 2026
Answers Jon Bailey's review comment on
ceph#72383
(ceph#72383 (comment)), which
asked for Seq16 to set consistency from check_consistency and return a
barrier, so that the check always follows a barrier and Seq16 matches
Seq5 to Seq9.

Do that. IoSequence::next() then issues the Consistency op, followed by
another barrier, only when check_consistency is set. Seq16 still issues
20 TruncateWrites; with check_consistency it now issues an extra barrier
before each of its checks, and without it the ops are unchanged.

To be squashed into "common/io_exerciser: only check consistency in
Seq16 when asked" before merge. Its body should then say "set
consistency from check_consistency and return a barrier, as Seq5 to
Seq9 do" instead of "otherwise just a barrier".

Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
@aainscow
aainscow force-pushed the wip-io-exerciser-fixes branch from a7d73d0 to c1189cf Compare October 12, 2026 10:01
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 12, 2026
Answers two of Jon Bailey's review comments on
ceph#72383.

On the hardcoded skip of Seq10, which he asked to leave to
getNextSupportedSequenceId() or is_supported()
(ceph#72383 (comment)): loop
over supported_sequences(), as NoConsistencyOpsUnlessRequested now does.

On the default case of the switch over OpType, which he asked to replace
with the missing cases so that a new op has to be considered here
(ceph#72383 (comment)): give
every OpType a case and drop the default. Consistency reads the object,
so it is checked like a read. The ops that do not rewrite a whole object
need nothing. A plain build only warns (-Wswitch) about a missing case,
but make check builds with -Werror, where it fails.

To be squashed into "test/osd: demonstrate Seq15 reading while a copy or
truncate is in flight" before merge.

Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 12, 2026
…ences

Answers two of Jon Bailey's review comments on
ceph#72383.

On the step limit in NoConsistencyOpsUnlessRequested, which he asked to
have a comment saying why it is there
(ceph#72383 (comment)): the
limit is only in this unit test, not in ceph_test_rados_io_sequence.
Move it into run_sequence(), which every test in the file uses to step a
sequence to Done, with a comment saying it makes a sequence that never
reaches Done fail with its name instead of hanging until the ctest
timeout, and lower it from 10,000,000 to 1,000,000. The longest sequence
here, Seq14, takes 29,255 steps.

On the hardcoded skip of Seq10, which he asked to leave to
getNextSupportedSequenceId() or is_supported()
(ceph#72383 (comment)): add
supported_sequences(), which walks the sequences with
getNextSupportedSequenceId() as ceph_test_rados_io_sequence does, and
loop over that. generate_sequence() aborts for Seq10, so each next
sequence is asked of the one before it.

To be squashed into "test/osd: demonstrate io_sequence Seq16 checking
consistency unasked" before merge.

Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 12, 2026
Answers Jon Bailey's review comment on
ceph#72383
(ceph#72383 (comment)), which
asked for Seq16 to set consistency from check_consistency and return a
barrier, so that the check always follows a barrier and Seq16 matches
Seq5 to Seq9.

Do that. IoSequence::next() then issues the Consistency op, followed by
another barrier, only when check_consistency is set. Seq16 still issues
20 TruncateWrites; with check_consistency it now issues an extra barrier
before each of its checks, and without it the ops are unchanged.

To be squashed into "common/io_exerciser: only check consistency in
Seq16 when asked" before merge. Its body should then say "set
consistency from check_consistency and return a barrier, as Seq5 to
Seq9 do" instead of "otherwise just a barrier".

Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 12, 2026
Answers two of Jon Bailey's review comments on
ceph#72383.

On the hardcoded skip of Seq10, which he asked to leave to
getNextSupportedSequenceId() or is_supported()
(ceph#72383 (comment)): loop
over supported_sequences(), as NoConsistencyOpsUnlessRequested now does.

On the default case of the switch over OpType, which he asked to replace
with the missing cases so that a new op has to be considered here
(ceph#72383 (comment)): give
every OpType a case and drop the default. Consistency reads the object,
so it is checked like a read. The ops that do not rewrite a whole object
need nothing. A plain build only warns (-Wswitch) about a missing case,
but make check builds with -Werror, where it fails.

To be squashed into "test/osd: demonstrate Seq15 reading while a copy or
truncate is in flight" before merge.

Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 12, 2026
Follows up Jon Bailey's review comment on
ceph#72383
(ceph#72383 (comment)), which
asked for every OpType to have a case so that a new op fails the build
until this test considers it.

ceph#71910 has since added
OpType::SparseRead to main. With this PR rebased onto main, the make
check build (-Werror) of NoReadWhileWholeObjectWriteInFlight fails:
"enumeration value 'SparseRead' not handled in switch". A SparseRead
reads the primary object, so check it like the other reads. No sequence
issues one yet.

To be squashed into "test/osd: demonstrate Seq15 reading while a copy or
truncate is in flight" before merge.

Assisted-by: Claude Code
@aainscow
aainscow force-pushed the wip-io-exerciser-fixes branch from c1189cf to 1cf3a2b Compare October 12, 2026 10:47
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 12, 2026
Seq15's stage had no initializer, so a new Seq15 started at whatever
stage its memory held. Build Seq15 in zeroed memory and in memory that
holds SWAP_TO_PRIMARY and expect the same ops. Without the fix the
second one runs Create, Barrier, Swap, Truncate, as in the
ceph_test_rados_io_sequence failure.

The test goes in unittest_io_sequence, added by
ceph#72383. It steps both sequences with
run_sequence(), which now also takes a sequence that is already built,
and gives OpType a gtest PrintTo so that a mismatch shows op names.

Fixes: https://tracker.ceph.com/issues/81606
Assisted-by: Claude Code
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 12, 2026
…ences

Answers two of Jon Bailey's review comments on
ceph#72383.

On the step limit in NoConsistencyOpsUnlessRequested, which he asked to
have a comment saying why it is there
(ceph#72383 (comment)): the
limit is only in this unit test, not in ceph_test_rados_io_sequence.
Move it into run_sequence(), which every test in the file uses to step a
sequence to Done, with a comment saying it makes a sequence that never
reaches Done fail with its name instead of hanging until the ctest
timeout, and lower it from 10,000,000 to 1,000,000. The longest sequence
here, Seq14, takes 29,255 steps.

On the hardcoded skip of Seq10, which he asked to leave to
getNextSupportedSequenceId() or is_supported()
(ceph#72383 (comment)): add
supported_sequences(), which walks the sequences with
getNextSupportedSequenceId() as ceph_test_rados_io_sequence does, and
loop over that. generate_sequence() aborts for Seq10, so each next
sequence is asked of the one before it.

To be squashed into "test/osd: demonstrate io_sequence Seq16 checking
consistency unasked" before merge.

Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 12, 2026
Answers Jon Bailey's review comment on
ceph#72383
(ceph#72383 (comment)), which
asked for Seq16 to set consistency from check_consistency and return a
barrier, so that the check always follows a barrier and Seq16 matches
Seq5 to Seq9.

Do that. IoSequence::next() then issues the Consistency op, followed by
another barrier, only when check_consistency is set. Seq16 still issues
20 TruncateWrites; with check_consistency it now issues an extra barrier
before each of its checks, and without it the ops are unchanged.

To be squashed into "common/io_exerciser: only check consistency in
Seq16 when asked" before merge. Its body should then say "set
consistency from check_consistency and return a barrier, as Seq5 to
Seq9 do" instead of "otherwise just a barrier".

Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 14, 2026
…nFlight

Answers two of Jon Bailey's review comments on
ceph#72383.

On the hardcoded skip of Seq10, which he asked to leave to
getNextSupportedSequenceId() or is_supported()
(ceph#72383 (comment)): loop
over supported_sequences(), as NoConsistencyOpsUnlessRequested now does.

On the default case of the switch over OpType, which he asked to replace
with the missing cases so that a new op has to be considered here
(ceph#72383 (comment)): give
every OpType a case and drop the default. Consistency reads the object,
so it is checked like a read. The ops that do not rewrite a whole object
need nothing. A plain build only warns (-Wswitch) about a missing case,
but make check builds with -Werror, where it fails.

To be squashed into "test/osd: demonstrate Seq15 reading while a copy or
truncate is in flight" before merge.

Assisted-by: Claude Code
(cherry picked from commit a7d73d0)
(cherry picked from commit 27a2e9c)
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 14, 2026
…rier test

Follows up Jon Bailey's review comment on
ceph#72383
(ceph#72383 (comment)), which
asked for every OpType to have a case so that a new op fails the build
until this test considers it.

ceph#71910 has since added
OpType::SparseRead to main. With this PR rebased onto main, the make
check build (-Werror) of NoReadWhileWholeObjectWriteInFlight fails:
"enumeration value 'SparseRead' not handled in switch". A SparseRead
reads the primary object, so check it like the other reads. No sequence
issues one yet.

To be squashed into "test/osd: demonstrate Seq15 reading while a copy or
truncate is in flight" before merge.

Assisted-by: Claude Code
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 14, 2026
…orted sequences

Answers two of Jon Bailey's review comments on
ceph#72383.

On the step limit in NoConsistencyOpsUnlessRequested, which he asked to
have a comment saying why it is there
(ceph#72383 (comment)): the
limit is only in this unit test, not in ceph_test_rados_io_sequence.
Move it into run_sequence(), which every test in the file uses to step a
sequence to Done, with a comment saying it makes a sequence that never
reaches Done fail with its name instead of hanging until the ctest
timeout, and lower it from 10,000,000 to 1,000,000. The longest sequence
here, Seq14, takes 29,255 steps.

On the hardcoded skip of Seq10, which he asked to leave to
getNextSupportedSequenceId() or is_supported()
(ceph#72383 (comment)): add
supported_sequences(), which walks the sequences with
getNextSupportedSequenceId() as ceph_test_rados_io_sequence does, and
loop over that. generate_sequence() aborts for Seq10, so each next
sequence is asked of the one before it.

To be squashed into "test/osd: demonstrate io_sequence Seq16 checking
consistency unasked" before merge.

Assisted-by: Claude Code
(cherry picked from commit 32c0d60)
(cherry picked from commit 97e0333)
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 14, 2026
…q5-9 do

Answers Jon Bailey's review comment on
ceph#72383
(ceph#72383 (comment)), which
asked for Seq16 to set consistency from check_consistency and return a
barrier, so that the check always follows a barrier and Seq16 matches
Seq5 to Seq9.

Do that. IoSequence::next() then issues the Consistency op, followed by
another barrier, only when check_consistency is set. Seq16 still issues
20 TruncateWrites; with check_consistency it now issues an extra barrier
before each of its checks, and without it the ops are unchanged.

To be squashed into "common/io_exerciser: only check consistency in
Seq16 when asked" before merge. Its body should then say "set
consistency from check_consistency and return a barrier, as Seq5 to
Seq9 do" instead of "otherwise just a barrier".

Assisted-by: Claude Code
(cherry picked from commit 1656902)
(cherry picked from commit 882f95d)
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 14, 2026
…nFlight

Answers two of Jon Bailey's review comments on
ceph#72383.

On the hardcoded skip of Seq10, which he asked to leave to
getNextSupportedSequenceId() or is_supported()
(ceph#72383 (comment)): loop
over supported_sequences(), as NoConsistencyOpsUnlessRequested now does.

On the default case of the switch over OpType, which he asked to replace
with the missing cases so that a new op has to be considered here
(ceph#72383 (comment)): give
every OpType a case and drop the default. Consistency reads the object,
so it is checked like a read. The ops that do not rewrite a whole object
need nothing. A plain build only warns (-Wswitch) about a missing case,
but make check builds with -Werror, where it fails.

To be squashed into "test/osd: demonstrate Seq15 reading while a copy or
truncate is in flight" before merge.

Assisted-by: Claude Code
(cherry picked from commit a7d73d0)
(cherry picked from commit 27a2e9c)
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 14, 2026
…rier test

Follows up Jon Bailey's review comment on
ceph#72383
(ceph#72383 (comment)), which
asked for every OpType to have a case so that a new op fails the build
until this test considers it.

ceph#71910 has since added
OpType::SparseRead to main. With this PR rebased onto main, the make
check build (-Werror) of NoReadWhileWholeObjectWriteInFlight fails:
"enumeration value 'SparseRead' not handled in switch". A SparseRead
reads the primary object, so check it like the other reads. No sequence
issues one yet.

To be squashed into "test/osd: demonstrate Seq15 reading while a copy or
truncate is in flight" before merge.

Assisted-by: Claude Code
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 15, 2026
…orted sequences

Answers two of Jon Bailey's review comments on
ceph#72383.

On the step limit in NoConsistencyOpsUnlessRequested, which he asked to
have a comment saying why it is there
(ceph#72383 (comment)): the
limit is only in this unit test, not in ceph_test_rados_io_sequence.
Move it into run_sequence(), which every test in the file uses to step a
sequence to Done, with a comment saying it makes a sequence that never
reaches Done fail with its name instead of hanging until the ctest
timeout, and lower it from 10,000,000 to 1,000,000. The longest sequence
here, Seq14, takes 29,255 steps.

On the hardcoded skip of Seq10, which he asked to leave to
getNextSupportedSequenceId() or is_supported()
(ceph#72383 (comment)): add
supported_sequences(), which walks the sequences with
getNextSupportedSequenceId() as ceph_test_rados_io_sequence does, and
loop over that. generate_sequence() aborts for Seq10, so each next
sequence is asked of the one before it.

To be squashed into "test/osd: demonstrate io_sequence Seq16 checking
consistency unasked" before merge.

Assisted-by: Claude Code
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 15, 2026
…q5-9 do

Answers Jon Bailey's review comment on
ceph#72383
(ceph#72383 (comment)), which
asked for Seq16 to set consistency from check_consistency and return a
barrier, so that the check always follows a barrier and Seq16 matches
Seq5 to Seq9.

Do that. IoSequence::next() then issues the Consistency op, followed by
another barrier, only when check_consistency is set. Seq16 still issues
20 TruncateWrites; with check_consistency it now issues an extra barrier
before each of its checks, and without it the ops are unchanged.

To be squashed into "common/io_exerciser: only check consistency in
Seq16 when asked" before merge. Its body should then say "set
consistency from check_consistency and return a barrier, as Seq5 to
Seq9 do" instead of "otherwise just a barrier".

Assisted-by: Claude Code
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 15, 2026
…nFlight

Answers two of Jon Bailey's review comments on
ceph#72383.

On the hardcoded skip of Seq10, which he asked to leave to
getNextSupportedSequenceId() or is_supported()
(ceph#72383 (comment)): loop
over supported_sequences(), as NoConsistencyOpsUnlessRequested now does.

On the default case of the switch over OpType, which he asked to replace
with the missing cases so that a new op has to be considered here
(ceph#72383 (comment)): give
every OpType a case and drop the default. Consistency reads the object,
so it is checked like a read. The ops that do not rewrite a whole object
need nothing. A plain build only warns (-Wswitch) about a missing case,
but make check builds with -Werror, where it fails.

To be squashed into "test/osd: demonstrate Seq15 reading while a copy or
truncate is in flight" before merge.

Assisted-by: Claude Code
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 15, 2026
…rier test

Follows up Jon Bailey's review comment on
ceph#72383
(ceph#72383 (comment)), which
asked for every OpType to have a case so that a new op fails the build
until this test considers it.

ceph#71910 has since added
OpType::SparseRead to main. With this PR rebased onto main, the make
check build (-Werror) of NoReadWhileWholeObjectWriteInFlight fails:
"enumeration value 'SparseRead' not handled in switch". A SparseRead
reads the primary object, so check it like the other reads. No sequence
issues one yet.

To be squashed into "test/osd: demonstrate Seq15 reading while a copy or
truncate is in flight" before merge.

Assisted-by: Claude Code
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 15, 2026
…ontents

Seq15's stage had no initializer, so a new Seq15 started at whatever
stage its memory held. Build Seq15 in zeroed memory and in memory that
holds SWAP_TO_PRIMARY and expect the same ops. Without the fix the
second one runs Create, Barrier, Swap, Truncate, as in the
ceph_test_rados_io_sequence failure.

The test goes in unittest_io_sequence, added by
ceph#72383. It steps both sequences with
run_sequence(), which now also takes a sequence that is already built,
and gives OpType a gtest PrintTo so that a mismatch shows op names.

Fixes: https://tracker.ceph.com/issues/81606
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
@ljflores

Copy link
Copy Markdown
Member

jenkins test signed

aainscow added a commit to aainscow/ceph that referenced this pull request Oct 16, 2026
…orted sequences

Answers two of Jon Bailey's review comments on
ceph#72383.

On the step limit in NoConsistencyOpsUnlessRequested, which he asked to
have a comment saying why it is there
(ceph#72383 (comment)): the
limit is only in this unit test, not in ceph_test_rados_io_sequence.
Move it into run_sequence(), which every test in the file uses to step a
sequence to Done, with a comment saying it makes a sequence that never
reaches Done fail with its name instead of hanging until the ctest
timeout, and lower it from 10,000,000 to 1,000,000. The longest sequence
here, Seq14, takes 29,255 steps.

On the hardcoded skip of Seq10, which he asked to leave to
getNextSupportedSequenceId() or is_supported()
(ceph#72383 (comment)): add
supported_sequences(), which walks the sequences with
getNextSupportedSequenceId() as ceph_test_rados_io_sequence does, and
loop over that. generate_sequence() aborts for Seq10, so each next
sequence is asked of the one before it.

To be squashed into "test/osd: demonstrate io_sequence Seq16 checking
consistency unasked" before merge.

Assisted-by: Claude Code
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 16, 2026
…q5-9 do

Answers Jon Bailey's review comment on
ceph#72383
(ceph#72383 (comment)), which
asked for Seq16 to set consistency from check_consistency and return a
barrier, so that the check always follows a barrier and Seq16 matches
Seq5 to Seq9.

Do that. IoSequence::next() then issues the Consistency op, followed by
another barrier, only when check_consistency is set. Seq16 still issues
20 TruncateWrites; with check_consistency it now issues an extra barrier
before each of its checks, and without it the ops are unchanged.

To be squashed into "common/io_exerciser: only check consistency in
Seq16 when asked" before merge. Its body should then say "set
consistency from check_consistency and return a barrier, as Seq5 to
Seq9 do" instead of "otherwise just a barrier".

Assisted-by: Claude Code
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 16, 2026
…nFlight

Answers two of Jon Bailey's review comments on
ceph#72383.

On the hardcoded skip of Seq10, which he asked to leave to
getNextSupportedSequenceId() or is_supported()
(ceph#72383 (comment)): loop
over supported_sequences(), as NoConsistencyOpsUnlessRequested now does.

On the default case of the switch over OpType, which he asked to replace
with the missing cases so that a new op has to be considered here
(ceph#72383 (comment)): give
every OpType a case and drop the default. Consistency reads the object,
so it is checked like a read. The ops that do not rewrite a whole object
need nothing. A plain build only warns (-Wswitch) about a missing case,
but make check builds with -Werror, where it fails.

To be squashed into "test/osd: demonstrate Seq15 reading while a copy or
truncate is in flight" before merge.

Assisted-by: Claude Code
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 16, 2026
…rier test

Follows up Jon Bailey's review comment on
ceph#72383
(ceph#72383 (comment)), which
asked for every OpType to have a case so that a new op fails the build
until this test considers it.

ceph#71910 has since added
OpType::SparseRead to main. With this PR rebased onto main, the make
check build (-Werror) of NoReadWhileWholeObjectWriteInFlight fails:
"enumeration value 'SparseRead' not handled in switch". A SparseRead
reads the primary object, so check it like the other reads. No sequence
issues one yet.

To be squashed into "test/osd: demonstrate Seq15 reading while a copy or
truncate is in flight" before merge.

Assisted-by: Claude Code
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 16, 2026
…ontents

Seq15's stage had no initializer, so a new Seq15 started at whatever
stage its memory held. Build Seq15 in zeroed memory and in memory that
holds SWAP_TO_PRIMARY and expect the same ops. Without the fix the
second one runs Create, Barrier, Swap, Truncate, as in the
ceph_test_rados_io_sequence failure.

The test goes in unittest_io_sequence, added by
ceph#72383. It steps both sequences with
run_sequence(), which now also takes a sequence that is already built,
and gives OpType a gtest PrintTo so that a mismatch shows op names.

Fixes: https://tracker.ceph.com/issues/81606
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
Comment thread src/common/io_exerciser/IoSequence.cc Resolved
Comment thread src/test/osd/test_io_sequence.cc Resolved
Comment thread src/common/io_exerciser/IoSequence.cc Resolved
Comment thread src/test/osd/test_io_sequence.cc Resolved
Comment thread src/test/osd/test_io_sequence.cc Resolved
Add unittest_io_sequence, which steps every IoSequence through to Done
without a cluster.

ceph_test_rados_io_sequence only checks consistency when run with
--checkconsistency, and RadosIo only has a consistency checker for an
erasure coded pool. Every sequence but Seq16 honours check_consistency;
Seq16 issues a Consistency op after every TruncateWrite regardless, so
any run on a replicated pool that reaches Seq16 fails
ceph_assert(cc) in RadosIo::applyIoOp().

NoConsistencyOpsUnlessRequested fails for Seq16 only.
Seq16ChecksConsistencyWhenRequested, which checks the checks still
happen when asked for, passes.

Fixes: https://tracker.ceph.com/issues/81389
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
Seq16 issued a Consistency op after each TruncateWrite whether or not
the run asked for consistency checks. On a replicated pool, which has
no consistency checker, ceph_test_rados_io_sequence then failed
ceph_assert(cc) as soon as it reached Seq16, for example with
"--pool <replicated> --sequence 16,16".

Issue the Consistency op only when check_consistency is set, as the
other sequences do, and set consistency from check_consistency and
return a barrier, as Seq5 to Seq9 do.

Fixes: https://tracker.ceph.com/issues/81389
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
The Consistency case in RadosIo::applyIoOp() had no break, so every
consistency check went on to run the Copy case and copy the primary
object over the secondary one. The model does not see that copy, so a
later read of the secondary object could miscompare.

Add the missing break.

Fixes: https://tracker.ceph.com/issues/81389
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
…ight

ObjectModel only stops a read that overlaps an in-flight Write, and
ceph_test_rados_io_sequence relies on each sequence's barriers for
everything else. Seq15 copies onto the original object and truncates it
with no barrier before the next read of that object, so the read can be
sent while the copy_from and the truncate are still in flight.

A read sent to the primary is ordered behind them there. A balanced read
can reach a replica before either write does and return the object as it
was before the copy: a run on a replicated pool with
--balanced_read_percentage 100 and 4 object threads failed this way.

NoReadWhileWholeObjectWriteInFlight steps every sequence and fails when a
read of an object follows a copy, truncate, create or remove of it
without a barrier. It fails for Seq15 only.

Fixes: https://tracker.ceph.com/issues/81389
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
Seq15 issued its copy_from and its truncate without a barrier, so the
read of the copy target that follows could overtake them. With balanced
reads that read could reach a replica before either write and see the
object as it was before the copy, which ceph_test_rados_io_sequence
reported as a miscompare.

Issue a barrier after both, so the read only starts once they are done.

Fixes: https://tracker.ceph.com/issues/81389
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
When no test object can start an I/O, the main loop of
run_automated_test() rechecks readiness under the lock, as the comment
above it says it should before waiting on the condition variable, but
then never waits. It loops straight round, so the main thread spins on
the lock for as long as any I/O is outstanding: about 65 CPU seconds a
minute with --parallel 1, against 12 once it waits. A run left behind
after its cluster went away spun at 100% for 14 hours.

Wait on the condition variable that RadosIo signals under the same lock
whenever an I/O completes. An object that is not ready always has I/O
in flight, so a completion will wake the loop.

Fixes: https://tracker.ceph.com/issues/81389
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
@aainscow
aainscow force-pushed the wip-io-exerciser-fixes branch from 1cf3a2b to b061a89 Compare October 19, 2026 06:35
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 19, 2026
Seq15's stage had no initializer, so a new Seq15 started at whatever
stage its memory held. Build Seq15 in zeroed memory and in memory that
holds SWAP_TO_PRIMARY and expect the same ops. Without the fix the
second one runs Create, Barrier, Swap, Truncate, as in the
ceph_test_rados_io_sequence failure.

The test goes in unittest_io_sequence, added by
ceph#72383. It steps both sequences with
run_sequence(), which now also takes a sequence that is already built,
and gives OpType a gtest PrintTo so that a mismatch shows op names.

Fixes: https://tracker.ceph.com/issues/81606
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
@aainscow

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@aainscow
aainscow merged commit 658149f into ceph:main Oct 19, 2026
13 of 14 checks passed
@github-actions

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I have resolved the following tracker ticket due to the merge of this PR:

No backports are pending for the ticket. If this is incorrect, please update the tracker
ticket and reset to Pending Backport state.

Update Log: https://github.com/ceph/ceph/actions/runs/39278879533

aainscow added a commit to aainscow/ceph that referenced this pull request Oct 21, 2026
Seq15's stage had no initializer, so a new Seq15 started at whatever
stage its memory held. Build Seq15 in zeroed memory and in memory that
holds SWAP_TO_PRIMARY and expect the same ops. Without the fix the
second one runs Create, Barrier, Swap, Truncate, as in the
ceph_test_rados_io_sequence failure.

The test goes in unittest_io_sequence, added by
ceph#72383. It steps both sequences with
run_sequence(), which now also takes a sequence that is already built,
and gives OpType a gtest PrintTo so that a mismatch shows op names.

Fixes: https://tracker.ceph.com/issues/81606
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants