[LU-5817] cl_put_grouplock()) ASSERTION( cg->cg_gid ) failed Created: 28/Oct/14  Updated: 02/Apr/15  Resolved: 22/Jan/15

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.7.0, Lustre 2.5.3
Fix Version/s: Lustre 2.7.0

Type: Bug Priority: Critical
Reporter: Patrick Farrell (Inactive) Assignee: Cliff White (Inactive)
Resolution: Fixed Votes: 0
Labels: MB, patch
Environment:

Any 2.x version of Lustre. Client crash.


Issue Links:
Duplicate
is duplicated by LU-5918 (lcommon_misc.c:194:cl_put_grouplock(... Resolved
Severity: 3
Rank (Obsolete): 16316

 Description   

When a group lock with GID=0 is released (put_grouplock is called), an assertion in cl_put_grouplock is hit.

There are two assertions at the start of cl_put_grouplock:
LASSERT(cg->cg_env);
LASSERT(cg->cg_gid);

cg_env is a pointer, so this assertion is valid, but cg_gid is just an integer so this is not a valid assertion. There are no other checks to make sure the GID is not zero, so a zero a GID is otherwise valid.

Since there doesn't appear to be any reason a '0' GID shouldn't be allowed, the solution is to remove this assertion. I'll make a patch shortly.



 Comments   
Comment by Patrick Farrell (Inactive) [ 28/Oct/14 ]

http://review.whamcloud.com/12459

Comment by Oleg Drokin [ 28/Oct/14 ]

The idea was to disallow use of gid 0 at all, so we really should check in the get/put handler not to allow gid of 0 and leave the assertion intact.

Comment by Patrick Farrell (Inactive) [ 28/Oct/14 ]

OK - I can make a patch to have the ioctl code return EINVAL if GID is 0, then.

Comment by Gerrit Updater [ 19/Nov/14 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12459/
Subject: LU-5817 clio: Do not allow group locks with gid 0
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: a1307d41a3a6682f60c91df4b581f21fb2980265

Comment by Gerrit Updater [ 24/Nov/14 ]

frank zago (fzago@cray.com) uploaded a new patch: http://review.whamcloud.com/12838
Subject: LU-5817 tests: Several tests for group locks.
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 365bc0e79ec64fcb3e51371bce3442a3d22f2a2d

Comment by Frank Zago (Inactive) [ 24/Nov/14 ]

Test for this and other conditions: http://review.whamcloud.com/12838

Comment by Gerrit Updater [ 22/Jan/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12838/
Subject: LU-5817 tests: Several tests for group locks.
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 5a521355691803b657d47e00dde27ff74c911382

Comment by Peter Jones [ 22/Jan/15 ]

Landed for 2.7

Comment by Gerrit Updater [ 02/Apr/15 ]

frank zago (fzago@cray.com) uploaded a new patch: http://review.whamcloud.com/14344
Subject: LU-5817 tests: tests group lock on volatiles
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: a4e257f5116cea85f3233ecbf8e7ab6340dae952

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