[LU-5564] open handle leak after setuid() Created: 29/Aug/14  Updated: 14/Jun/18  Resolved: 22/Jun/16

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

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: Hongchao Zhang
Resolution: Fixed Votes: 0
Labels: mdt

Issue Links:
Related
Severity: 3
Rank (Obsolete): 15516

 Description   

MDS_CLOSE RPCs are sent with the current_fs{uid,gid}(). If this id cannot be resolved on the MDT then mdt_close() fails in unpack and the open handle is never released.

# MOUNT_2=y llmount.sh
...
# id 42
id: 42: No such user
# cp /bin/sleep /mnt/lustre/sleep
# chown 42:42 /mnt/lustre/sleep
# chmod ug+s /mnt/lustre/sleep
# /mnt/lustre/sleep 0
# echo > /mnt/lustre2/sleep
-bash: /mnt/lustre2/sleep: Text file busy
[  475.032992] LustreError: 6559:0:(file.c:186:ll_close_inode_openhandle()) lustre-clilmv-ffff8802173141c8: inode [0x200000400:0x3:0x0] mdc close failed: rc = -13

Seems a bit broken this way. With the exception of HSM release why check process permissions at close? The open FD (open handle) gives us permission.



 Comments   
Comment by Peter Jones [ 07/Jul/15 ]

Hongchao

Could you please look into this issue?

Thanks

Peter

Comment by Gerrit Updater [ 08/Jul/15 ]

Hongchao Zhang (hongchao.zhang@intel.com) uploaded a new patch: http://review.whamcloud.com/15534
Subject: LU-5564 llite: use original uid,gid to close file
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: b0ee3878dad8fa1d98b2d191983c0baa1f751b8d

Comment by Hongchao Zhang [ 13/Jun/16 ]

status update:
the patch http://review.whamcloud.com/15534 has been updated

Comment by Gerrit Updater [ 20/Jun/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/15534/
Subject: LU-5564 mdt: skip permission check for close
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: abedce670d4f396443164bb582c7b58ec78ae7b7

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

Patch has landed to master for 2.9.0

Comment by Amit [ 06/Mar/18 ]

Dear All,

I am running into this exact same issue on our setup of this version of Lustre-2.7.20. We will be looking for upgrading to Lustre 2.10 in summer. Until then what would one recommend to avoid this issue from happening?

Is there a patch that I can apply in production?

Alternatively I was looking if I could mount the SSSD cache on the Lustre servers to a /tmpfs, in case if it helped.

Any comments are help here is greatly appreciated.

Thank you,
Amit

Comment by Peter Jones [ 06/Mar/18 ]

Amit

Please direct that question through your support channels - this project is for matters relating to the community releases.

Peter

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