Project

General

Profile

Actions

Bug #56549

closed

ImageWatcher race condition

Added by Christopher Hoffman almost 2 years ago. Updated over 1 year ago.

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

0%

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

Description

ImageWatcher hits race condition when snap_remove process happens during a notify request lock for exclusive lock.

1. RBD mirror detects newer snapshot and queues the removal of old snapshot for operation #1 (exclusive lock).
2. The current lock owner doesn't support snap removal.
3. Another operation #2 is queued (exclusive lock) request is made for same image. This portion of the code checks for is_lock_owner and isn't so it continues code path to request exclusive lock.
4. Operation #1 is processed. It gets exclusive lock and performs snap removal.
5. Operation #2 is processed. The handle portion of the callback still expects to be non lock owner via another is_lock_owner check. But due to timing of #4 it currently is lock owner and ceph_assert/crash happens.


Related issues 3 (0 open3 closed)

Copied to rbd - Backport #56617: octopus: ImageWatcher race conditionResolvedIlya DryomovActions
Copied to rbd - Backport #56618: pacific: ImageWatcher race conditionResolvedIlya DryomovActions
Copied to rbd - Backport #56619: quincy: ImageWatcher race conditionResolvedIlya DryomovActions
Actions #1

Updated by Christopher Hoffman almost 2 years ago

  • Pull request ID set to 47116
Actions #2

Updated by Christopher Hoffman almost 2 years ago

  • Status changed from In Progress to Fix Under Review
Actions #3

Updated by Ilya Dryomov almost 2 years ago

  • Backport set to octopus,pacific,quincy
Actions #4

Updated by Ilya Dryomov almost 2 years ago

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

Updated by Backport Bot almost 2 years ago

Actions #6

Updated by Backport Bot almost 2 years ago

Actions #7

Updated by Backport Bot almost 2 years ago

Actions #8

Updated by Backport Bot over 1 year ago

  • Tags set to backport_processed
Actions #9

Updated by Christopher Hoffman over 1 year ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF