Bug #76600
closedqa/suites/upgrade: `cluster [WRN] daemon osd.5 on trial179 is in unknown state" in cluster log'
0%
NM Updated by Nitzan Mordechai 7 months ago
teuthology log shows:
2026-05-14T00:59:18.278 INFO:tasks.cephadm.osd.5:Ignoring exception while sending signal: Command failed on trial179 with status 1: 'sudo docker kill -s 1 ceph-b5986eb5-4f2a-11f1-81d3-d404e6e7d460-osd.5' 2026-05-14T00:59:18.286 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: terminate called after throwing an instance of 'ceph::buffer::v15_2_0::malformed_input' 2026-05-14T00:59:18.286 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: what(): Decoder at 'void ceph::os::Transaction::decode(ceph::buffer::v15_2_0::list::const_iterator&)' v=9 cannot decode v=10 minimal_decoder=10: Malformed input [buffer:3] 2026-05-14T00:59:18.287 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: *** Caught signal (Aborted) ** 2026-05-14T00:59:18.287 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: in thread 7f282abde640 thread_name:tp_osd_tp 2026-05-14T00:59:18.287 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: ceph version 19.2.3-833-g3997be64 (3997be6433a85a5ea24dbea4cc0b2fbeead05581) squid (stable) 2026-05-14T00:59:18.287 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 1: /lib64/libc.so.6(+0x3fc60) [0x7f284950ac60] 2026-05-14T00:59:18.287 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 2: /lib64/libc.so.6(+0x8d21c) [0x7f284955821c] 2026-05-14T00:59:18.287 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 3: raise() 2026-05-14T00:59:18.287 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 4: abort() 2026-05-14T00:59:18.287 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 5: /lib64/libstdc++.so.6(+0xa1b21) [0x7f2849872b21] 2026-05-14T00:59:18.287 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 6: /lib64/libstdc++.so.6(+0xad53c) [0x7f284987e53c] 2026-05-14T00:59:18.287 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 7: /lib64/libstdc++.so.6(+0xad5a7) [0x7f284987e5a7] 2026-05-14T00:59:18.287 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 8: /lib64/libstdc++.so.6(+0xad809) [0x7f284987e809] 2026-05-14T00:59:18.288 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 9: /usr/bin/ceph-osd(+0x3d53f6) [0x561899d863f6] 2026-05-14T00:59:18.288 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 10: (ReplicatedBackend::do_repop(boost::intrusive_ptr<OpRequest>)+0x4e9) [0x56189a292a09] 2026-05-14T00:59:18.288 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 11: (ReplicatedBackend::_handle_message(boost::intrusive_ptr<OpRequest>)+0x1d7) [0x56189a294757] 2026-05-14T00:59:18.288 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 12: (PGBackend::handle_message(boost::intrusive_ptr<OpRequest>)+0x56) [0x56189a0d2686] 2026-05-14T00:59:18.288 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 13: (PrimaryLogPG::do_request(boost::intrusive_ptr<OpRequest>&, ThreadPool::TPHandle&)+0x81d) [0x56189a00522d] 2026-05-14T00:59:18.288 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 14: (OSD::dequeue_op(boost::intrusive_ptr<PG>, boost::intrusive_ptr<OpRequest>, ThreadPool::TPHandle&)+0x197) [0x561899f51267] 2026-05-14T00:59:18.288 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 15: (ceph::osd::scheduler::PGOpItem::run(OSD*, OSDShard*, boost::intrusive_ptr<PG>&, ThreadPool::TPHandle&)+0x69) [0x56189a19efb9] 2026-05-14T00:59:18.288 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 16: (OSD::ShardedOpWQ::_process(unsigned int, ceph::heartbeat_handle_d*)+0xcd0) [0x561899f60c60] 2026-05-14T00:59:18.288 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 17: (ShardedThreadPool::shardedthreadpool_worker(unsigned int)+0x2aa) [0x56189a48d49a] 2026-05-14T00:59:18.288 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 18: /usr/bin/ceph-osd(+0xadca54) [0x56189a48da54] 2026-05-14T00:59:18.288 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 19: /lib64/libc.so.6(+0x8b3f9) [0x7f28495563f9] 2026-05-14T00:59:18.288 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 20: /lib64/libc.so.6(+0x1105d0) [0x7f28495db5d0] 2026-05-14T00:59:18.289 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: debug 2026-05-14T00:59:18.129+0000 7f282abde640 -1 *** Caught signal (Aborted) ** 2026-05-14T00:59:18.289 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: in thread 7f282abde640 thread_name:tp_osd_tp 2026-05-14T00:59:18.289 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: ceph version 19.2.3-833-g3997be64 (3997be6433a85a5ea24dbea4cc0b2fbeead05581) squid (stable) 2026-05-14T00:59:18.289 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 1: /lib64/libc.so.6(+0x3fc60) [0x7f284950ac60] 2026-05-14T00:59:18.289 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 2: /lib64/libc.so.6(+0x8d21c) [0x7f284955821c] 2026-05-14T00:59:18.289 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 3: raise() 2026-05-14T00:59:18.289 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 4: abort() 2026-05-14T00:59:18.289 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 5: /lib64/libstdc++.so.6(+0xa1b21) [0x7f2849872b21] 2026-05-14T00:59:18.289 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 6: /lib64/libstdc++.so.6(+0xad53c) [0x7f284987e53c] 2026-05-14T00:59:18.289 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 7: /lib64/libstdc++.so.6(+0xad5a7) [0x7f284987e5a7] 2026-05-14T00:59:18.289 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 8: /lib64/libstdc++.so.6(+0xad809) [0x7f284987e809] 2026-05-14T00:59:18.289 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 9: /usr/bin/ceph-osd(+0x3d53f6) [0x561899d863f6] 2026-05-14T00:59:18.290 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 10: (ReplicatedBackend::do_repop(boost::intrusive_ptr<OpRequest>)+0x4e9) [0x56189a292a09] 2026-05-14T00:59:18.290 INFO:[email protected]:May 14 00:59:18 trial179 bash[34069]: 11: (ReplicatedBackend::_handle_message(boost::intrusive_ptr<OpRequest>)+0x1d7) [0x56189a294757] 2026-05-14T00:59:18.290 INFO:[email protected]:May 14 00:59:18 trial179 bash[23810]: terminate called after throwing an instance of 'ceph::buffer::v15_2_0::malformed_input' 2026-05-14T00:59:18.290 INFO:[email protected]:May 14 00:59:18 trial179 bash[23810]: what(): Decoder at 'void ceph::os::Transaction::decode(ceph::buffer::v15_2_0::list::const_iterator&)' v=9 cannot decode v=10 minimal_decoder=10: Malformed input [buffer:3] 2026-05-14T00:59:18.290 INFO:[email protected]:May 14 00:59:18 trial179 bash[23810]: *** Caught signal (Aborted) ** 2026-05-14T00:59:18.290 INFO:[email protected]:May 14 00:59:18 trial179 bash[23810]: in thread 7f5d6f83a640 thread_name:tp_osd_tp 2026-05-14T00:59:18.290 INFO:[email protected]:May 14 00:59:18 trial179 bash[23810]: ceph version 19.2.3-833-g3997be64 (3997be6433a85a5ea24dbea4cc0b2fbeead05581) squid (stable) 2026-05-14T00:59:18.291 INFO:[email protected]:May 14 00:59:18 trial179 bash[23810]: 1: /lib64/libc.so.6(+0x3fc60) [0x7f5d8e166c60] 2026-05-14T00:59:18.291 INFO:[email protected]:May 14 00:59:18 trial179 bash[23810]: 2: /lib64/libc.so.6(+0x8d21c) [0x7f5d8e1b421c] 2026-05-14T00:59:18.291 INFO:[email protected]:May 14 00:59:18 trial179 bash[23810]: 3: raise() 2026-05-14T00:59:18.291 INFO:[email protected]:May 14 00:59:18 trial179 bash[23810]: 4: abort()
that recent change: https://github.com/ceph/ceph/pull/57740
Both osds were still running ceph 19.2.3-833-g3997be64 squid (stable) (old version, v=9 decoder).
Other OSDs (on trial124) had already been upgraded to main (v=10 encoder). When those upgraded OSDs sent transactions to osd.5/osd.7, the decode failed.
the osds restarted, but cephadm reported them as "unknown state" while they were down - we need @Bill Scales input here
BS Updated by Bill Scales 7 months ago
- Assignee set to Bill Scales
The backtrace does look very like the last issue that was fixed on that PR and suggests that the message being sent to the down level OSD is not being encoded properly. Its nothing as simple as always encoding the message wrong for down level OSDs, that code path works. The last bug that was found was when the message got resent and got encoded twice, so there will be a 2nd condition like this needed to cause this problem.
Will investigate further tomorrow
BS Updated by Bill Scales 7 months ago
Scenario:
- We are half way through an upgrade, osd 0 is running umbrella, osd 5 and 7 are still running squid.
- We've been in this state for some time as radosbench has finished a benchmark issuing I/O and is in its cleanup phase.
- The only I/O being issued is 1000's of delete objects.
- The first delete I/O processed in epoch 577 by osd 0 appears to be encoding the repop message incorrectly which causes peer osds 5 and 7 to abort when trying to decode the message.
- There were numerous deletes processed in epoch 576 by osd 0 that successfully sent messages to osds 5 and 7 (not necessarily the same PG but encode/decode uses per OSD features) these messages would be virtually identical (only difference is the number in the object name and things like the version number). We are therefore looking for an intermittent bug.
- There doesn't appear to be anything special happening to cause epoch 577 - a couple of PGs completed backfill in epochs 574 and 575, epochs 576 and 577 are just for want up_thru.
- There is no evidence of the failing message being resent. A previous issue found during the testing of this PR found that if a message got resent it could become corrupted. That issue was fixed, there is no evidence of that code path or anything similar happening in this case.
With some AI assistance it seems that an existing bug in PeeringState is the cause of the problem:
- The decision of whether to send a RepOp message with the new or old format (see ReplicatedBackend::generate_subop()) is based on get_parent()->min_peer_features(), not the target peer’s features. This is so we can send the same message to multiple OSDs without having to repeat the expensive encode step. Midway through an upgrade we may send old-style messages to an upgraded OSD, that doesn't matter, it just means we don't get the performance benefit until the upgrade completes.
- min_peer_features is maintained by PeeringState (see reset_min_peer_features, apply_peer_features and get_min_peer_features)
- Normally PeeringState::GetInfo::GetInfo calls reset_min_peer_features, then we query all the other OSDs for info and PeeringState::GetInfo::react calls apply_peer_features to update the supported features to find the lowest common denominator of features
- However PeeringState::GetInfo::get_infos does not always send queries to the other OSDs - if its already got the info cached then it skips the OSD. The bug is that if it skips an OSD it doesn't call apply_peer_features. If all the OSDs are skipped we end up with features set to CEPH_FEATURES_SUPPORTED_DEFAULT of the Primary which in this case would be UMBRELLA.
Looking at the logs we see this has happened - the PG that sends the bad message is 9.9:
2026-05-14T00:59:18.085+0000 7fbaa8cda6c0 5 osd.0 pg_epoch: 577 pg[9.9( ...
state<Start>: transitioning to Primary
exit Start 0.000043 0 0.000000
enter Started/Primary
enter Started/Primary/Peering
enter Started/Primary/Peering/GetInfo
build_prior all_probe 0,3,7
build_prior maybe_rw interval:562, acting: 0,3,7
build_prior prior osd.3 is down
build_prior final: probe 0,5,7 down 3 blocked_by {}
PeeringState::build_prior up_thru 576 >= same_since 576, all is well
state<Started/Primary/Peering/GetInfo>: have osd.5 info 9.9( v 575'35245 (553'27106,575'35245] local-lis/les=562/563 n=751 ec=516/516 lis/c=562/562 les/c/f=563/575/0 sis=576)
state<Started/Primary/Peering/GetInfo>: have osd.7 info 9.9( v 575'35245 (553'27106,575'35245] local-lis/les=562/563 n=751 ec=516/516 lis/c=562/562 les/c/f=563/575/0 sis=576 pruub=15.160339355s)
PeeringState::check_prior_readable_down_osds prior_readable_down_osds osd.3 is dead as of epoch 577
PeeringState::check_prior_readable_down_osds empty prior_readable_down_osds, clearing ub
PeeringState::prepare_stats_for_publish reporting purged_snaps []
PeeringState::prepare_stats_for_publish publish_stats_to_osd 576:36901
exit Started/Primary/Peering/GetInfo 0.000121 0 0.000000
enter Started/Primary/Peering/GetLog
In contrast here is an earlier epoch 576 where it got set correctly
2026-05-14T00:59:17.081+0000 7fbaacce26c0 5 osd.0 pg_epoch: 576 pg[9.9(
enter Started/Primary/Peering/GetInfo
build_prior all_probe 0,3,7
build_prior maybe_rw interval:562, acting: 0,3,7
build_prior final: probe 0,3,5,7 down blocked_by {}
PeeringState::build_prior up_thru 575 < same_since 576, must notify monitor
state<Started/Primary/Peering/GetInfo>: no prior_set down osds, will clear prior_readable_until_ub before activating
state<Started/Primary/Peering/GetInfo>: querying info from osd.3
state<Started/Primary/Peering/GetInfo>: querying info from osd.5
state<Started/Primary/Peering/GetInfo>: querying info from osd.7
PeeringState::prepare_stats_for_publish reporting purged_snaps []
PeeringState::prepare_stats_for_publish publish_stats_to_osd 575:36900
PeeringState::activate_map : Not dirtying info: last_persisted is 575 while current is 576
do_peering_event: epoch_sent: 576 epoch_requested: 576 MNotifyRec 9.9 from 7 notify: (query:576 sent:576 9.9( v 575'35245 (553'27106,575'35245] local-lis/les=562/563 n=751 ec=516/516 lis/c=562/562 les/c/f=563/575/0 sis=5>
PeeringState::proc_replica_notify got osd.7 9.9( v 575'35245 (553'27106,575'35245] local-lis/les=562/563 n=751 ec=516/516 lis/c=562/562 les/c/f=563/575/0 sis=576 pruub=15.160339355s)
update_heartbeat_peers 0,5,7 unchanged
state<Started/Primary/Peering/GetInfo>: Adding osd: 7 peer features: 3f03cffffffdffff
do_peering_event: epoch_sent: 576 epoch_requested: 576 NullEvt
do_peering_event: epoch_sent: 576 epoch_requested: 576 MNotifyRec 9.9 from 5 notify: (query:576 sent:576 9.9( v 575'35245 (553'27106,575'35245] local-lis/les=562/563 n=751 ec=516/516 lis/c=562/562 les/c/f=563/575/0 sis=5>
PeeringState::proc_replica_notify got osd.5 9.9( v 575'35245 (553'27106,575'35245] local-lis/les=562/563 n=751 ec=516/516 lis/c=562/562 les/c/f=563/575/0 sis=576)
PeeringState::update_history advanced history from ec=516/516 lis/c=562/562 les/c/f=563/575/0 sis=576
update_heartbeat_peers 0,5,7 unchanged
state<Started/Primary/Peering/GetInfo>: Adding osd: 5 peer features: 3f03cffffffdffff
do_peering_event: epoch_sent: 576 epoch_requested: 576 MNotifyRec 9.9 from 3 notify: (query:576 sent:576 9.9( v 575'35245 (553'27106,575'35245] local-lis/les=562/563 n=751 ec=516/516 lis/c=562/562 les/c/f=563/575/0 sis=576 pruub=15.157732964s) ([562,575] all_part>
PeeringState::proc_replica_notify got osd.3 9.9( v 575'35245 (553'27106,575'35245] local-lis/les=562/563 n=751 ec=516/516 lis/c=562/562 les/c/f=563/575/0 sis=576 pruub=15.157732964s)
PeeringState::proc_replica_notify osd.3 has stray content: 9.9( v 575'35245 (553'27106,575'35245] local-lis/les=562/563 n=751 ec=516/516 lis/c=562/562 les/c/f=563/575/0 sis=576 pruub=15.157732964s)
update_heartbeat_peers 0,5,7 -> 0,3,5,7
state<Started/Primary/Peering/GetInfo>: Adding osd: 3 peer features: 3f17fffffffdffff
state<Started/Primary/Peering/GetInfo>: Common peer features: 3f03cffffffdffff
state<Started/Primary/Peering/GetInfo>: Common acting features: 3f03cffffffdffff
state<Started/Primary/Peering/GetInfo>: Common upacting features: 3f03cffffffdffff
state<Started/Primary/Peering/GetInfo>: Common pg_acting_features: 0
exit Started/Primary/Peering/GetInfo 0.000533 4 0.000132
enter Started/Primary/Peering/GetLog
Fix is to call apply_peer_features when PeeringState::GetInfo::get_infos finds it already has info cached for a peer. I considered an alternative fix of moving where reset_min_peer_features is called to the start of a new interval, but I think this would still leave race hazards of acquiring info from a peer before transitioning to GetInfo so would be a more risky fix.
BS Updated by Bill Scales 7 months ago
- Backport changed from tentacle,squid to tentacle
- Affected Versions v20.0.0, v20.2.0, v20.2.1, v21.0.0 added
- Component(RADOS) OSD added
Backport will only be required for tentacle, the PR that introduced the problem was added to tentacle. The bug will only be seen on upgrades from builds without the bug to builds with this PR. In this case it was a squid -> umbrella upgrade.
BS Updated by Bill Scales 7 months ago
- Status changed from New to Fix Under Review
- Pull request ID set to 68936
Fix coded, ready for review
LF Updated by Laura Flores 7 months ago
Scrub note: PR sent to QA
LF Updated by Laura Flores 6 months ago
PR was tested against upgrade, but it also needs RADOS approval.
UB Updated by Upkeep Bot 6 months ago
- Status changed from Fix Under Review to Pending Backport
- Merge Commit set to 44fa2a5d857509dd8c12b0ef50035bb3ca60341b
- Fixed In set to v21.0.0-1828-g44fa2a5d85
- Upkeep Timestamp set to 2026-05-28T23:49:56+00:00
BS Updated by Bill Scales 6 months ago
- Copied to Backport #76987: tentacle: qa/suites/upgrade: `cluster [WRN] daemon osd.5 on trial179 is in unknown state" in cluster log' added
BS Updated by Bill Scales 6 months ago
- Tags (freeform) set to backport_processed
UB Updated by Upkeep Bot 5 months ago
- Status changed from Pending Backport to Resolved
- Upkeep Timestamp changed from 2026-05-28T23:49:56+00:00 to 2026-07-10T13:29:35+00:00
UB Updated by Upkeep Bot 3 months ago
- Tags (freeform) deleted (
backport_processed) - Upkeep Timestamp changed from 2026-07-10T13:29:35+00:00 to 2026-08-28T01:42:02+00:00
UB Updated by Upkeep Bot about 1 month ago
- Released In set to v21.2.0~345
- Upkeep Timestamp changed from 2026-08-28T01:42:02+00:00 to 2026-10-24T02:03:37+00:00