[LU-5367] (mdt_handler.c:2782:mdt_lock_handle_fini()) ASSERTION( !lustre_handle_is_used(&lh->mlh_pdo_lh) ) failed Created: 18/Jul/14  Updated: 14/Jun/18  Resolved: 27/Apr/15

Status: Closed
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.7.0
Fix Version/s: Lustre 2.7.0

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: John Hammond
Resolution: Fixed Votes: 0
Labels: easy, ldlm, malloc, mdt

Issue Links:
Related
is related to LU-8043 MDS running lustre 2.5.5+ OOM when ru... Resolved
Severity: 3
Rank (Obsolete): 14971

 Description   

In mdt_object_local_lock() we should call mdt_object_unlock() if mdt_fid_lock() fails on the pdo lock. This is because ldlm_cli_enqueue_local() stores the cookie in the lock handle very early on.

                        rc = mdt_fid_lock(ns, &lh->mlh_pdo_lh, lh->mlh_pdo_mode,
                                          policy, res_id, dlmflags,
                                          info->mti_exp == NULL ? NULL :
                                          &info->mti_exp->exp_handle.h_cookie);
                        if (unlikely(rc))
                                RETURN(rc);

Currently if mdt_fid_lock() fails then we are likely to see

(mdt_handler.c:2782:mdt_lock_handle_fini()) ASSERTION( !lustre_handle_is_used(&lh->mlh_pdo_lh) ) failed 

at the end of the handler.

This was found via memory allocation fault injection.



 Comments   
Comment by John Hammond [ 24/Jul/14 ]

Please see http://review.whamcloud.com/11219.

Comment by John Hammond [ 11/Aug/14 ]

Patch landed to master.

Comment by Jodi Levi (Inactive) [ 20/Aug/14 ]

Reopening to add label

Generated at Sat Feb 10 01:50:52 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.