[LU-16937] lctl allocates IPC shmem segment needlessly Created: 30/Jun/23  Updated: 14/Jul/23  Resolved: 14/Jul/23

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

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

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

 Description   

lctl is dynamically allocating an IPC shared memory segment unnecessarily during every startup, even though it is only needed for a small number of uncommon debug commands:

shmget(IPC_PRIVATE, 65680, 0600)        = 196641
shmat(196641, NULL, 0)                  = 0x7f752b1c5000
shmctl(196641, IPC_RMID, NULL)          = 0

The segment is marked for deletion immediately after it is created, so it should be removed automatically when lctl exits, but in some cases this segment appears to stick around and accumulate over time.

This allocation can be moved to the sub-commands that actually need it.



 Comments   
Comment by Gerrit Updater [ 30/Jun/23 ]

"Andreas Dilger <adilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51526
Subject: LU-16937 utils: avoid lctl shmget() if not needed
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 309713169fde9e162c26e909bc83cb43cccd67ba

Comment by Gerrit Updater [ 14/Jul/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51526/
Subject: LU-16937 utils: avoid lctl shmget() if not needed
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 1e9ca8bbf444a7a18505199d8e3da05fd731685e

Comment by Peter Jones [ 14/Jul/23 ]

Merged for 2.16

Generated at Sat Feb 10 03:31:14 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.