Project

General

Profile

Actions

Bug #22058

closed

mds: admin socket wait for scrub completion is racy

Added by Patrick Donnelly over 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
fs
Component(FS):
MDS
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

From: http://pulpito.ceph.com/pdonnell-2017-11-06_22:14:57-fs-wip-pdonnell-testing-20171106.200337-testing-basic-smithi/1821087/

The code to wait for the scrub completion is racy:

https://github.com/ceph/ceph/blob/2a848b430162648a470adb3f7d8ae0fa74799f10/src/mds/MDSRank.cc#L2112-L2116

If the scrub completes before the wait, then the admin socket thread forever waits.

The mutex we're using is wrong. We need to implement our own C_SaferCond which takes the mds_lock.


Related issues 1 (0 open1 closed)

Copied to CephFS - Backport #22907: luminous: mds: admin socket wait for scrub completion is racyResolvedPatrick DonnellyActions
Actions

Also available in: Atom PDF