[LU-11185] MGC lock leak Created: 27/Jul/18  Updated: 02/Nov/20  Resolved: 14/Dec/19

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.11.0, Lustre 2.12.0
Fix Version/s: Lustre 2.14.0

Type: Bug Priority: Minor
Reporter: Alexey Lyashkov Assignee: Alexey Lyashkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-580 update mgc llog process code Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Regression introduced by 4335d232c3e6fa144d0a2d5e49264761e91b38c7.
It takes additional cld reference to the lock, but lock forget to cancel
during normal shutdown. So this lock holds cld on the list for a long time.
And any config modification needs to cancel each lock separately.

Additional bug exist, when lock is obtained but don't processed and marked as lost lock, so two locks objects refers to the single cld instance.



 Comments   
Comment by Alexey Lyashkov [ 27/Jul/18 ]

easy reproduce with
[root@rhel7-1 tmp]# while [ 1 ]; do umount /mnt/lustre; mount -t lustre -o user_xattr,flock rhel7-1@tcp:/lustre /mnt/lustre; sleep 5; done

and dump an MGS namespace to the log.

Comment by Gerrit Updater [ 27/Jul/18 ]

Alexey Lyashkov (c17817@cray.com) uploaded a new patch: https://review.whamcloud.com/32890
Subject: LU-11185 mgc: config lock leak
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: cf31de844d11b24ffd71c4d6f23dd63d00bbfc15

Comment by Andreas Dilger [ 08/Aug/18 ]

I don't see commit hash 4335d232c3e6fa144d in our tree. Could you please provide the summary line for this patch.

Comment by Alexey Lyashkov [ 08/Aug/18 ]

commit 4335d232c3e6fa144d0a2d5e49264761e91b38c7
Author: Jinshan Xiong <jay@whamcloud.com>
Date: Mon Aug 8 19:39:22 2011 -0700

LU-580: update mgc llog process code

This patch does the following work:
1. fix a bug about setting mgc lock callback data;
2. define log instance types;
3. simplify and cleanup mgc_requeue_thread code

Signed-off-by: Jinshan Xiong <jay@whamcloud.com>
Change-Id: Ic8d25eda9f0a7884b4a8cbeccc89c1e66c19f0ff
Reviewed-on: http://review.whamcloud.com/1198
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>

Comment by Andreas Dilger [ 09/Aug/18 ]

Is this in some other branch? I still can't find that commit hash, but that patch is very old - 2011, so it should be in every release available today. The commit hash on master for that patch is 5538eee216a194d47ae67fbcff80bfbcd95f3d69.

Comment by Gerrit Updater [ 14/Dec/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/32890/
Subject: LU-11185 mgc: config lock leak
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 0ad54d59777366fba8ee61eaaa27b3060c91782f

Comment by Peter Jones [ 14/Dec/19 ]

Landed for 2.14

Comment by Gerrit Updater [ 02/Nov/20 ]

Jian Yu (yujian@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/40520
Subject: LU-11185 mgc: config lock leak
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: 49db8cbeb579a9485b09f679ebadbc2eca13dda8

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