From f6ad65a91468a3c6b78b212238cb10785f8ee05b Mon Sep 17 00:00:00 2001 From: Yuval Lifshitz Date: Tue, 24 Jun 2025 10:02:57 +0000 Subject: [PATCH] rgw/notifications: prevent infinite loop in case of malformed notifications if we fail to decode a notification entry we should remove it. o/w we will keep failing on that entry Signed-off-by: Yuval Lifshitz --- src/rgw/driver/rados/rgw_notify.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rgw/driver/rados/rgw_notify.cc b/src/rgw/driver/rados/rgw_notify.cc index dec13d7630c7..dd735ebf005c 100644 --- a/src/rgw/driver/rados/rgw_notify.cc +++ b/src/rgw/driver/rados/rgw_notify.cc @@ -213,8 +213,9 @@ private: try { decode(event_entry, iter); } catch (buffer::error& err) { - ldpp_dout(this, 5) << "WARNING: failed to decode entry. error: " << err.what() << dendl; - return EntryProcessingResult::Failure; + ldpp_dout(this, 1) << "WARNING: failed to decode entry marker: " << entry.marker + << ". error: " << err.what() << dendl; + return EntryProcessingResult::Expired; } if (event_entry.creation_time == ceph::coarse_real_clock::zero()) { -- 2.47.3