Repository navigation
test/crimson/seastore: assert omap extent retirement on split/merge/balance - #69482
Conversation
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
16 similar comments
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR strengthens OMAP manager balancing/clear tests by adding a helper to count currently-mapped OMAP extents and asserting expected post-merge and post-clear extent counts.
Changes:
- Added
count_live_omap_extents()helper that scans mapped space and countsOMAP_INNER/OMAP_LEAFextents. - Added assertions/logging to verify extent counts after split/merge balancing and after clearing the tree.
- Extended the existing
cleartest to assert there are no remaining live OMAP extents.
| [&count](paddr_t paddr, extent_len_t len, extent_types_t type, laddr_t laddr) { | ||
| if (type == extent_types_t::OMAP_INNER || | ||
| type == extent_types_t::OMAP_LEAF) { | ||
| count++; | ||
| } | ||
| }); |
| // Bound derivation: 64 KiB OMAP_LEAF_BLOCK_SIZE / ~580 B entry size (50 B key + 512 B value | ||
| // + overhead) => healthy post-merge leaves hold >=55 entries, so count is <= size / 55 + C. | ||
| EXPECT_LE(final_count, test_omap_mappings.size() / 40 + 20U); |
| logger().debug("== clearing entire tree and verifying no leaks"); | ||
| auto t_clear = create_mutate_transaction(); | ||
| clear(omap_root, *t_clear); | ||
| submit_transaction(std::move(t_clear)); | ||
| EXPECT_EQ(count_live_omap_extents(), 0U); |
b1a5e10 to
e50ea49
Compare
Matan-B
left a comment
There was a problem hiding this comment.
commit message states:
which let a redundant node-retirement change slip in that
double-freed nodes (ENOENT abort) on split/merge.
iiuc the above is not correct, right?
|
ok to test |
|
we'll just need to make sure test is passing, should be included in make check. |
|
@Matan-B , you're right, the double-free never actually occurred in CI. The correct sequence was:
|
Can we amend the commit please? ok to merge afterwards |
…alance There was no coverage for extent leaks or double-frees during structural omap B-tree transitions. While investigating a suspected extent leak, these assertions were added and confirmed the caller-layer (parent-node) already retires nodes correctly — no leak and no double-free. Add count_live_omap_extents() to omap_manager_test_t, which scans the LBA mapping space via scan_mapped_space() to count live OMAP_INNER/OMAP_LEAF extents, and assert against it in leafnode/innernode_split_merge_balancing: the live count returns to baseline after contraction, and is exactly 0 after clearing the tree. This pins the caller-layer (parent-node) retirement contract in CI. Signed-off-by: Shai Fultheim <[email protected]>
e50ea49 to
d3cada2
Compare
|
@Matan-B amended — the commit message now describes this as preventive coverage that confirmed the caller-layer already retires correctly (no double-free occurred). Thanks! |
|
A cursory look indicates that the code changes might not strictly be exercised by the QA tests, I'm triggering those nevertheless 🤔
PR=wip-perezjos-crimson-only-22-06-2026-PR69482
$ teuthology-suite -s crimson-rados -p 101 --force-priority -c $PR -f debug --filter-out rgw --filter seastore --suite-branch main --suite-repo https://github.com/ceph/ceph.git
2026-06-22 14:25:42,569.569 INFO:teuthology.suite.run:Test results viewable at
|
|
jenkins test windows |
1 similar comment
|
jenkins test windows |
|
@ronen-fr can this be merged? |
|
@fultheim - yes. DO you prefer me to do that? |
Yes, please. |
Adds a
count_live_omap_extents()helper (viascan_mapped_space) plus assertions to the omap-manager split/merge/balance tests, so the omap B-tree's caller-layer node-retirement contract is enforced by CI.Background: while investigating a suspected omap extent leak, adding retirement assertions showed the omap B-tree already retires old nodes at the caller layer (
do_merge's retire of{l,r},do_balance,handle_split, andOMapLeafNode::inserton split) — so a proposed in-helper retire would have been a secondtm.removeof the same laddr → ENOENT. That retire change was withdrawn; these assertions remain to lock in the existing contract.Assertions use exact counts where the tree shape is deterministic (exactly 1 root leaf after contraction to depth 1; exactly 0 after
clear) and a derived upper bound elsewhere.Validated with
ctest -R omap(all green).Split out of #69351 per review (thanks @Matan-B).
Checklist