CachyOS / CachyOS/CachyOS-Settings
Soft (per-process) fdlimit needs to be raised
- Dominant language
- Shell
- Stars
- 443
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Description
My `mkinitcpio` Autodetect hook is failing from Kernel 7.2 with:
```
-> Running build hook: [/usr/lib/initcpio/install/autodetect]
sort: cannot read: /sys/devices/virtual/tty/tty62/uevent: Too many open files
==> WARNING: An error was encountered during device lookup. Retrying.
sort: cannot read: /sys/devices/virtual/tty/tty62/uevent: Too many open files
==> ERROR: An error was encountered during device lookup.
==> ERROR: Cannot acquire used modules. Unable to use autodetection.
```
Because my (somewhat moderate) system has 1371 `uevent` entries under `/sys/devices/*`, and the hook attempts to open them all at once:
```if uevents="$(LC_ALL=C.UTF-8 find /sys/devices -name uevent -exec sort -u {} +)"; then```
The distro already raises the hard (all-process) limit to 1M fds.
I will propose a new setting of 65535 for the soft limit, but I'm not wed to that.
Contributor guide
Research direction
Start by locating the CachyOS setting that controls the soft per-process file-descriptor limit, then review the mkinitcpio Autodetect hook at /usr/lib/initcpio/install/autodetect and its find/sort invocation. Done means the soft limit is raised without changing the hard limit and the hook can process the reported /sys/devices uevent entries without a Too many open files error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, shell
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 70/100