Project

General

Profile

Bug #47329

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

Added by Venky Shankar 5 months ago. Updated 4 months 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:

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

Copied to mgr - Backport #47462: octopus: mgr plugins might endlessly loop when unregistering rados/cephfs client isntan Resolved

History

#1 Updated by Venky Shankar 5 months ago

  • Assignee set to Venky Shankar

#2 Updated by Patrick Donnelly 5 months ago

  • Status changed from Fix Under Review to Pending Backport

#3 Updated by Nathan Cutler 4 months ago

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

#4 Updated by Nathan Cutler 4 months 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".

Also available in: Atom PDF