Bug #23815
closed
client: avoid second lock on client_lock
Added by supriti singh about 6 years ago.
Updated almost 6 years ago.
Category:
Correctness/Safety
Description
In function ll_get_stripe_osd client_lock is taken. But its acquired again in ll_get_inodeno(). Avoid double locking.
- 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
- Component(FS) Client added
- Component(FS) deleted (
libcephfs)
- Target version set to v13.0.0
- Backport changed from luminous, jewel to luminous,jewel
- Labels (FS) deleted (
crash)
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
- Status changed from Fix Under Review to Pending Backport
- Copied to Backport #23932: jewel: client: avoid second lock on client_lock added
- Copied to Backport #23933: luminous: client: avoid second lock on client_lock added
- Status changed from Pending Backport to Resolved
Also available in: Atom
PDF