Project

General

Profile

Actions

Bug #47329

closed

mgr plugins might endlessly loop when unregistering rados/cephfs client isntan

Added by Venky Shankar over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
ceph-mgr
Target version:
% Done:

0%

Source:
Tags:
Backport:
octopus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Problematic part in PyModuleRegistry::unregister_client():

  void unregister_client(std::string_view name, const entity_addrvec_t& addrs)
  {
    auto itp = clients.equal_range(std::string(name));
    for (auto it = itp.first; it != itp.second; ++it) {
      if (it->second == addrs) {
    it = clients.erase(it);
      }
    }
  }

The iterator gets incremented even after removing an entry from the map (which returns the next iterator).

This causes calls to unregister_client() to endlessly loop causing ceph-mgr to become unresponsive and getting blocklisted causing subsequent commands to hang.


Related issues 1 (0 open1 closed)

Copied to mgr - Backport #47462: octopus: mgr plugins might endlessly loop when unregistering rados/cephfs client isntanResolvedLaura PaduanoActions
Actions #1

Updated by Venky Shankar over 3 years ago

  • Assignee set to Venky Shankar
Actions #2

Updated by Patrick Donnelly over 3 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #3

Updated by Nathan Cutler over 3 years ago

  • Copied to Backport #47462: octopus: mgr plugins might endlessly loop when unregistering rados/cephfs client isntan added
Actions #4

Updated by Nathan Cutler over 3 years ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Actions

Also available in: Atom PDF