Project

General

Profile

Actions

Bug #3094

closed

krbd: race between finding existing client and creating new one

Added by Alex Elder over 11 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

In rbd_get_client(), an attempt is made to reuse an existing
rbd client if there is already one with matching options.

But the scan for the existing one and the creation of the new
one are not done (together/atomically) under protection of a
single lock, so it's possible with concurrent rbd_add() requests
to have multiple clients created which have the same ceph options.

I don't believe this is a serious problem but the code is not
working as intended so it should be fixed.

Actions #1

Updated by Alex Elder about 11 years ago

  • Project changed from Linux kernel client to rbd
Actions #2

Updated by Alex Elder about 11 years ago

  • Subject changed from rbd: race between finding existing client and creating new one to krbd: race between finding existing client and creating new one
Actions #3

Updated by Ian Colle about 11 years ago

  • Priority changed from Normal to Low
Actions #4

Updated by Alex Elder almost 11 years ago

  • Status changed from New to In Progress

I've been able to reproduce this problem by simply running
five instances of an "rbd map" command for the same image,
all in the background.

Actions #5

Updated by Alex Elder almost 11 years ago

  • Status changed from In Progress to Fix Under Review

The following has been posted for review:

[PATCH] rbd: protect against duplicate client creation

Actions #6

Updated by Alex Elder almost 11 years ago

  • Status changed from Fix Under Review to Resolved

The following has been committed to the "testing" branch
of the ceph-client git repository.

601e01d rbd: protect against duplicate client creation

Actions

Also available in: Atom PDF