[LU-7542] possible recursive locking detected on cli->cl_sem Created: 11/Dec/15  Updated: 22/Jun/16  Resolved: 22/Jun/16

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.8.0
Fix Version/s: Lustre 2.9.0

Type: Bug Priority: Minor
Reporter: Andreas Dilger Assignee: Andreas Dilger
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Lockdep complains about potential recursive locking during mount
because the client configuration log is holding a lock on the MGC
obd_device to prevent it from being torn down, while also getting
locks on the MDC and OSC devices as they are instantiated:

 Lustre: Mounted myth-client
 =============================================
 [ INFO: possible recursive locking detected ]
 ---------------------------------------------

 2 locks held by ll_cfg_requeue/1460:
 #0:  (&cli->cl_sem){.+.+..}, at mgc_requeue_thread+0x27d/0x5d8 [mgc]
 #1:  (&cld->cld_lock){+.+...}, at mgc_process_log+0x88/0xc01 [mgc]

 CPU: 3 PID: 1460 Comm: ll_cfg_requeue
 Call Trace:
 [<ffffffff814cb360>] dump_stack+0x4f/0x6f
 [<ffffffff81081d73>] __lock_acquire+0xc06/0xc74
 [<ffffffff81081f4f>] lock_acquire+0x16e/0x194
 [<ffffffff814ce5d7>] down_read+0x4c/0x61
 [<ffffffffa029f370>] sptlrpc_conf_client_adapt+0x95/0x142 [ptlrpc]
 [<ffffffffa03a7a69>] mdc_set_info_async+0xeb/0x420 [mdc]
 [<ffffffffa01ad69e>] class_notify_sptlrpc_conf+0x2f4/0x347 [obdclass]
 [<ffffffffa04a805c>] mgc_process_log+0xa31/0xc01 [mgc]
 [<ffffffffa04a94ef>] mgc_requeue_thread+0x31f/0x5d8 [mgc]
 [<ffffffff81061f77>] kthread+0xfa/0x102

Add a separate lock class for the MGC callpath, since it will always
be held first, and none of the other obd_device locks should ever
be held concurrently.



 Comments   
Comment by Gerrit Updater [ 14/Dec/15 ]

Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: http://review.whamcloud.com/17582
Subject: LU-7542 obdclass: quiet lockdep recursive lock warning
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 2e551494bf5aa4d2d1f5b31e1fa60d3b369a5bbb

Comment by Gerrit Updater [ 22/Jun/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/17582/
Subject: LU-7542 obdclass: quiet lockdep recursive lock warning
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 9560e011ef7b8d1538ec48d297813b8d55d2f09b

Comment by Joseph Gmitter (Inactive) [ 22/Jun/16 ]

Landed to master for 2.9.0

Generated at Sat Feb 10 02:09:47 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.