Project

General

Profile

Actions

Bug #23815

closed

client: avoid second lock on client_lock

Added by supriti singh almost 6 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Correctness/Safety
Target version:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
luminous,jewel
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
fs
Component(FS):
Client
Labels (FS):
crash
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

In function ll_get_stripe_osd client_lock is taken. But its acquired again in ll_get_inodeno(). Avoid double locking.


Related issues 2 (0 open2 closed)

Copied to CephFS - Backport #23932: jewel: client: avoid second lock on client_lockResolvedJos CollinActions
Copied to CephFS - Backport #23933: luminous: client: avoid second lock on client_lockResolvedJos CollinActions
Actions #1

Updated by supriti singh almost 6 years ago

supriti singh wrote:

In function ll_get_stripe_osd client_lock is taken. But its acquired again in ll_get_inodeno(). Avoid double locking.

PR: https://github.com/ceph/ceph/pull/21554

Actions #2

Updated by Jos Collin almost 6 years ago

  • Category set to Correctness/Safety
  • Status changed from New to Fix Under Review
  • Assignee set to supriti singh
  • Source set to Community (dev)
  • Backport set to luminous, jewel
Actions #3

Updated by Jos Collin almost 6 years ago

  • Component(FS) Client added
  • Component(FS) deleted (libcephfs)
Actions #4

Updated by Patrick Donnelly almost 6 years ago

  • Target version set to v13.0.0
  • Backport changed from luminous, jewel to luminous,jewel
  • Labels (FS) deleted (crash)
Actions #5

Updated by supriti singh almost 6 years ago

supriti singh wrote:

supriti singh wrote:

In function ll_get_stripe_osd client_lock is taken. But its acquired again in ll_get_inodeno(). Avoid double locking.

PR: https://github.com/ceph/ceph/pull/21554

I saw the crash when calling the function from nfs-ganesha.

(gdb) bt
#0 0x00007fc7bf99cf67 in raise () from /lib64/libc.so.6
#1 0x00007fc7bf99e33a in abort () from /lib64/libc.so.6
#2 0x00007fc7b6a52f05 in lockdep_will_lock (name=0xd998f8 "Client::client_lock", id=<optimized out>, force_backtrace=<optimized out>)
at /home/ssingh1-local/work/supu_ceph/ceph/src/common/lockdep.cc:314
#3 0x00007fc7b6765c61 in Mutex::_will_lock (this=0xd95e80) at /home/ssingh1-local/work/supu_ceph/ceph/src/common/Mutex.h:56
#4 Mutex::Lock (this=this@entry=0xd95e80, no_lockdep=no_lockdep@entry=false) at /home/ssingh1-local/work/supu_ceph/ceph/src/common/Mutex.cc:92
#5 0x00007fc7b1f0455a in Mutex::Locker::Locker (m=..., this=<synthetic pointer>) at /home/ssingh1-local/work/supu_ceph/ceph/src/common/Mutex.h:115
#6 Client::ll_get_inodeno (in=0xe51eb0, this=0xd95280) at /home/ssingh1-local/work/supu_ceph/ceph/src/client/Client.h:1139
#7 Client::ll_get_stripe_osd (this=0xd95280, in=0xe51eb0, blockno=0, layout=layout@entry=0x7fc722c48e70)
at /home/ssingh1-local/work/supu_ceph/ceph/src/client/Client.cc:12458
#8 0x00007fc7b1ef2005 in ceph_ll_get_stripe_osd (cmount=<optimized out>, in=<optimized out>, blockno=<optimized out>, layout=0x7fc722c48fc0)
at /home/ssingh1-local/work/supu_ceph/ceph/src/libcephfs.cc:1728

Actions #6

Updated by Patrick Donnelly almost 6 years ago

  • Labels (FS) crash added
Actions #7

Updated by Patrick Donnelly almost 6 years ago

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

Updated by Nathan Cutler almost 6 years ago

  • Copied to Backport #23932: jewel: client: avoid second lock on client_lock added
Actions #9

Updated by Nathan Cutler almost 6 years ago

  • Copied to Backport #23933: luminous: client: avoid second lock on client_lock added
Actions #10

Updated by Nathan Cutler almost 6 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF