Project

General

Profile

Actions

Bug #66014

closed
GF PD

mds: Beacon code can deadlock messenger

Bug #66014: mds: Beacon code can deadlock messenger

Added by Greg Farnum over 2 years ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Urgent
Category:
Correctness/Safety
Target version:
Due date:
% Done:

100%

Source:
Development
Backport:
squid,quincy,reef
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
MDS
Labels (FS):
Pull request ID:
Tags (freeform):
Fixed In:
v19.3.0-2364-geb10f3df6e
Released In:
v20.2.0~2842
Upkeep Timestamp:
2025-11-01T01:11:34+00:00

Description

The Beacon code grabs a lock on entry into every function. This includes Beacon::_send(), which calls monc->send_mon_message(); and Beacon::handle_mds_beacon, invoked via ms_fast_dispatch. That means Beacon::mutex is ordered both above and below messenger locks.

We (likely?) haven't seen this because Beacon messages are fairly rare and actually triggering them simultaneously is improbable. But it could happen!

I'm also very suspicious of how much work Beacon::notify_health() does under that same mutex. If we need to fast dispatch the Beacon (it's not clear to me from ticket history that we do), we need to reorganize this module so that fast_dispatch can proceed without grabbing locks that are shared for other purposes.


Related issues 3 (0 open — 3 closed)

Copied to CephFS - Backport #66194: reef: mds: Beacon code can deadlock messengerResolvedPatrick Donnelly

Actions
Copied to CephFS - Backport #66195: quincy: mds: Beacon code can deadlock messengerRejectedPatrick Donnelly

Actions
Copied to CephFS - Backport #66196: squid: mds: Beacon code can deadlock messengerResolvedPatrick Donnelly

Actions

GF Updated by Greg Farnum over 2 years ago Actions #1

  • Backport set to squid, quincy, reef

PD Updated by Patrick Donnelly over 2 years ago Actions #2

  • Subject changed from Beacon code can deadlock messenger to mds: Beacon code can deadlock messenger
  • Status changed from New to In Progress
  • Target version set to v20.0.0
  • Source set to Development
  • Backport changed from squid, quincy, reef to squid,quincy,reef

PD Updated by Patrick Donnelly over 2 years ago Actions #3

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 57469

PD Updated by Patrick Donnelly over 2 years ago ยท Edited Actions #4

  • Status changed from Fix Under Review to Pending Backport

UB Updated by Upkeep Bot over 2 years ago Actions #5

  • Copied to Backport #66194: reef: mds: Beacon code can deadlock messenger added

UB Updated by Upkeep Bot over 2 years ago Actions #6

  • Copied to Backport #66195: quincy: mds: Beacon code can deadlock messenger added

UB Updated by Upkeep Bot over 2 years ago Actions #7

  • Copied to Backport #66196: squid: mds: Beacon code can deadlock messenger added

KS Updated by Konstantin Shalygin almost 2 years ago Actions #9

  • Status changed from Pending Backport to Resolved
  • % Done changed from 0 to 100

UB Updated by Upkeep Bot over 1 year ago Actions #10

  • Merge Commit set to eb10f3df6e5116a020011365579584449ac76f04
  • Fixed In set to v19.3.0-2364-geb10f3df6e5
  • Upkeep Timestamp set to 2025-06-27T03:23:38+00:00

UB Updated by Upkeep Bot over 1 year ago Actions #11

  • Fixed In changed from v19.3.0-2364-geb10f3df6e5 to v19.3.0-2364-geb10f3df6e
  • Upkeep Timestamp changed from 2025-06-27T03:23:38+00:00 to 2025-07-14T16:45:00+00:00

UB Updated by Upkeep Bot about 1 year ago Actions #12

  • Released In set to v20.2.0~2842
  • Upkeep Timestamp changed from 2025-07-14T16:45:00+00:00 to 2025-11-01T01:11:34+00:00
Actions

Also available in: PDF Atom