Project

General

Profile

Actions

Bug #45526

open

mgr/dashboard: race conditions might occur in NFSGaneshaExports controller

Added by Kiefer Chang almost 4 years ago. Updated about 3 years ago.

Status:
New
Priority:
Normal
Category:
Component - NFS
Target version:
-
% Done:

0%

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

Description

Here are some observation:
  • Cherrypy spawns a 10-threads pool by default to serve requests, shared resources between threads should be handle carefully (with locks).
  • There is a shared resource between backend threads: `GaneshaConf.exports`. For each new request, current existing exports are loaded from RADOS objects. If thread A is manipulating exports and thread B is spawned to serve another request, the exports that thread B sees might not be reflected yet, which might cause problems.
  • (Guesswork) Problems might be seen more easily when a system is under heavy workloads because loading and saving exports/configs involved I/O to the RADOS.
Here are some race condition examples in the implementation (can be artificially created):
  • Creating multiple exports simultaneously
    Say we have no exports and two create requests are received. Two threads are spawned and each one sees no existing exports. For the export creation, each thread then generates a new export ID 1 for the new export and the final result might be that there is only one export is created (Both writes to `cephfs_data/EXPORT-1`)
  • Deleting export and creating at the same time
    If the deleting takes longer, the result might be that new export is created, but daemon doesn't reference it because the delete call erases the reference.
Actions #1

Updated by Kiefer Chang almost 4 years ago

  • Private changed from Yes to No
Actions #2

Updated by Lenz Grimmer almost 4 years ago

  • Assignee set to Tatjana Dehler
Actions #3

Updated by Ernesto Puerta about 3 years ago

  • Project changed from mgr to Dashboard
  • Category changed from 144 to Component - NFS
Actions

Also available in: Atom PDF