-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
rhel-9.5
-
None
-
No
-
Important
-
rhel-plumbers
-
ssg_core_services
-
24
-
26
-
3
-
False
-
False
-
-
None
-
None
-
None
-
None
-
Unspecified
-
Unspecified
-
Unspecified
-
None
What were you trying to do that didn't work?
When having a high nofile limit, lsof spends its time closing non-existent file descriptors before proceeding. The operation can take several minutes and consumes a single CPU entirely, generating unnecessary load.
This got fixed Upstream through following commit:
commit b953ba3b1a93fc44771b900ff519931e3380aa82
Author: Marc <34656315+MarcT512@users.noreply.github.com>
Date: Wed May 15 11:33:23 2024 +0100
Add files via upload
Add an optimized fallback in closefrom_shim() for Linux, if the platform doesn't support closefrom or close_range.
Iterate /proc/self/fd and close anything which is not that directory itself.
What is the impact of this issue to you?
Cannot execute lsof in a timely manner
Please provide the package NVR for which the bug is seen:
lsof-4.94.0-3
How reproducible is this bug?:
Always
Steps to reproduce
- Execute lsof after changing the nofile limit
# ulimit -n 1073741816 # lsof
Expected results
Almost immediate return.
Actual results
100% CPU consumed for several minutes.
- links to