Skip to content

Wip tracker 79104 omap digest mismatch on s390 post upgrade - #70869

Merged
ljflores merged 2 commits into
ceph:mainfrom
badone:wip-tracker-79104-omap_digest_mismatch-on-s390-post-upgrade
Aug 18, 2026
Merged

ljflores merged 2 commits into
ceph:mainfrom
badone:wip-tracker-79104-omap_digest_mismatch-on-s390-post-upgrade

Conversation

@badone

@badone badone commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

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.

@badone
badone requested a review from a team as a code owner August 6, 2026 04:35
@badone
badone requested a review from rzarzynski August 6, 2026 04:36
badone added 2 commits August 6, 2026 14:38
The length MUST be stored in little-endian to match the encode() wire
format. A native __u32 cast to (unsigned char*) produces big-endian
bytes on s390x, diverging from the stored omap_digest written by the
pre-20.x bufferhash path and causing persistent scrub errors on
big-endian platforms after upgrade.

Fixes: https://tracker.ceph.com/issues/79104
Signed-off-by: Brad Hubbard <[email protected]>
@badone
badone force-pushed the wip-tracker-79104-omap_digest_mismatch-on-s390-post-upgrade branch from 6bd8f8f to b80e55a Compare August 6, 2026 04:39
@badone

badone commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test api

@bill-scales bill-scales 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.

Agree with the analysis on the tracker ticket and the fix, but this still leaves the problem of what to do with systems that have bad omap digests.

One solution would be to relax the CRC verification to accept either the stored crc or a modified version of this using an endian swapped length so that both the correct and buggy CRC calculations are accepted. Given the buggy CRC and the length field it is possible to calculate the correct CRC field - you do not need all the omap data to calculate the correct CRC.

This would reduce (half?) the strength of the CRC check, we would only need to do this on big-endian systems. If we make deep scrub fix the CRC if it detects a buggy CRC then we could put all this behind a conf setting - so anyone with corrupted CRCs would enable the conf setting, run with reduced strength CRCs until a full deep scrub has been completed and fixed the errors and then could turn off the conf setting to restore full strength CRCs.

encode(std::string(data), bl);
uint32_t crc_encode = bl.crc32c(0xFFFFFFFF);

EXPECT_EQ(crc_le, crc_encode);

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.

Yes.

// len must use ceph_le32 to guarantee little-endian encoding on all platforms,
// matching Ceph's encode() wire format regardless of host byte order.
// See test: Crc32c.OmapDigestLengthFieldIsLittleEndian
ceph_le32 len{static_cast<uint32_t>(data.length())};

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.

Good catch. Even the fix alone is obviously worth merging. However, adding the workaround described by @bill-scales is definitely preferred.

@rzarzynski rzarzynski 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.

I'm working on the crc mismatch hack. I think I will send as a follow-up PR.

@badone

badone commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@badone

badone commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@badone

badone commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@badone

badone commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test api

@badone

badone commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

I'm working on the crc mismatch hack. I think I will send as a follow-up PR.

Right, we can't delay this for any additional work ATM IMHO.

@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath8-testing-20260813.003211-main.

@sseshasa

Copy link
Copy Markdown
Contributor

@ljflores
ljflores merged commit c081814 into ceph:main Aug 18, 2026
7 checks passed
@badone
badone deleted the wip-tracker-79104-omap_digest_mismatch-on-s390-post-upgrade branch August 18, 2026 22:40
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.

6 participants