Repository navigation
osd: avoid inserting empty OI_ATTR in rollback_setattrs - #70965
Conversation
66bbd93 to
df0c0f5
Compare
tchaikov
left a comment
There was a problem hiding this comment.
lgtm. this crashes when a write that created the object gets rolled back. attr_updates() records OI_ATTR as nullopt for it, so on the non-primary written shards to_set has no OI_ATTR, and since 254650b we decode an empty bufferlist. returning is fine, the create() rollback removes the object anyway.
could you put that in the commit message and file a tracker? 254650b is in tentacle and umbrella, so this needs backports. also, a test next to RollbackVersionMismatch in TestECFailoverWithPeering would help.
cc @aainscow
There was a problem hiding this comment.
The fix looks like it would successfully avoid an attribute rollback, if there were no OI. The big question is - why is there not an OI?
An object without OI will cause problems later on - probably causing a different set of looping asserts. I cannot immediately see a data corruption issue, but I would not rule this out.
operator[] on a missing OI_ATTR inserts an empty bufferlist and decode throws an uncaught exception. No known path produces such a rollback record; make the assumption explicit with an assert. Signed-off-by: Sun Yuechi <[email protected]>
df0c0f5 to
9e267d2
Compare
|
I tried to write a reproducer and could not find a Since there's no real bug to fix, I've changed the bail-out to a |
aainscow
left a comment
There was a problem hiding this comment.
A good clean up of some code.
|
@tchaikov @sunyuechi I am happy with this change now and agree the code looks cleaner. It does still require qa. I have added the needs-qa flag, but you may need to chase this up on the prs channel on the ceph slack. Thanks |
|
This PR has been added to wip-bharath22-testing-20260917.055008-main. |
|
I have put ci-approved to get the make checks, etc.. running, but please do not merge until it gets RADOS APPROVED. |
The new snapshot brings in these fixes: - osd/PeeringState: fix the divergence check against olog.head (ceph/ceph#70149) - osd: assert OI_ATTR is present in rollback_setattrs (ceph/ceph#70965) - osdc: fix ReplicaSplitOp chunk distribution, reassembly and small multi-op reads (ceph/ceph#70207) - erasure-code/isa: default the technique when the profile has none (ceph/ceph#72215) - mount.ceph: report kernels without aes256k key support (ceph/ceph#72159) - rgw/es: require both major and minor in the ES version (ceph/ceph#70007) - build: turn WITH_RADOSGW_LANCEDB off where lance cannot build (ceph/ceph#71935) - cmake: make SIMD_COMPILE_FLAGS a list (ceph/ceph#72657) - cmake/boost: do not pass context-impl to the headers step (ceph/ceph#71249) - rpm: let ceph-mgr-cephadm require routes (ceph/ceph#73051) - test/mds: widen result waits in ReleaseAwait (ceph/ceph#70463) - qa/lsan.supp: match OpenSSL error state on ERR_set_mark (ceph/ceph#71460) Signed-off-by: Sun Yuechi <[email protected]>
The new snapshot brings in these fixes: - osd/PeeringState: fix the divergence check against olog.head (ceph/ceph#70149) - osd: assert OI_ATTR is present in rollback_setattrs (ceph/ceph#70965) - osdc: fix ReplicaSplitOp chunk distribution, reassembly and small multi-op reads (ceph/ceph#70207) - erasure-code/isa: default the technique when the profile has none (ceph/ceph#72215) - mount.ceph: report kernels without aes256k key support (ceph/ceph#72159) - rgw/es: require both major and minor in the ES version (ceph/ceph#70007) - build: turn WITH_RADOSGW_LANCEDB off where lance cannot build (ceph/ceph#71935) - cmake: make SIMD_COMPILE_FLAGS a list (ceph/ceph#72657) - cmake/boost: do not pass context-impl to the headers step (ceph/ceph#71249) - rpm: let ceph-mgr-cephadm require routes (ceph/ceph#73051) - test/mds: widen result waits in ReleaseAwait (ceph/ceph#70463) - qa/lsan.supp: match OpenSSL error state on ERR_set_mark (ceph/ceph#71460) Signed-off-by: Sun Yuechi <[email protected]>
In
rollback_setattrs,operator[]on a missing OI_ATTR inserted anempty bufferlist into
to_set, and decoding it threw. Look the key upinstead and bail if absent.
Checklist