Project

General

Profile

Actions

Bug #80359

closed
JB JB

Undefined end() iterator in proc_master_log can cause pwlc values to be set incorrectly

Bug #80359: Undefined end() iterator in proc_master_log can cause pwlc values to be set incorrectly

Added by Jonathan Bailey 3 months ago. Updated 2 months ago.

Status:
Duplicate
Priority:
Normal
Category:
-
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
tentacle umbrella
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:
2026-09-24T00:42:33+00:00

Description

In proc_master_log, we need to decide when to call consider_adjusting_pwlc(...). We do this by comparing the incoming log from a message against our own log. We use an iterator pointing at the end of the incoming log and compare it to our own log in various ways to determine if we need to adjust the pwlc values. For all non-empty cases, we were comparing olog.log.end()->version with p->version, where accessing olog.log.end() results in undefined behaviour (https://en.cppreference.com/cpp/container/list/end).

Fix created here: https://github.com/ceph/ceph/pull/71595. This fixes the issue by decrementing the iterator for these cases so we are pointing at the final element of the log instead of the end() iterator which is one past the end.


Related issues 1 (0 open — 1 closed)

Is duplicate of RADOS - Bug #79706: osd/PeeringState: fix proc_master_log divergence check vs olog.headBackportingBill Scales

Actions

JB Updated by Jonathan Bailey 3 months ago Actions #1

  • Project changed from Ceph to RADOS

JB Updated by Jonathan Bailey 3 months ago Actions #2

  • Status changed from New to In Progress
  • Assignee set to Jonathan Bailey

BS Updated by Bill Scales 3 months ago Actions #3

  • Backport set to tentacle umbrella

LF Updated by Laura Flores 3 months ago Actions #4

PR has been added to a QA batch.

LF Updated by Laura Flores 2 months ago Actions #5

  • Status changed from In Progress to Duplicate

LF Updated by Laura Flores 2 months ago Actions #6

  • Is duplicate of Bug #79706: osd/PeeringState: fix proc_master_log divergence check vs olog.head added

UB Updated by Upkeep Bot 2 months ago Actions #7

  • Pull request ID deleted (71595)
  • Upkeep Timestamp set to 2026-09-24T00:42:33+00:00
Actions

Also available in: PDF Atom