Created attachment 237216 [details] Patches nslcd to use closefrom instead of close nslcd tries to close all file descriptors on startup. It does that by calling close() in a loop, running down from _SC_OPEN_MAX to 0. Since _SC_OPEN_MAX autoscales with available RAM, this can take more than a minute on large servers. The solution is to use closefrom. Upstream has already made that change in the master branch, but due to its slow release cadence I suggest we apply the change in the ports tree as well.
Thanks for the submission! Feel free to commit, approved by: maintainer. If you would prefer not to commit, just let me know!
Ok, I'll commit! But I have to fix it first. It's failing in Poudriere, because something is triggering autoconf to rerun. I need to figure that out first.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=fe4dc1fd7105b8d28031f9fab5b1260fbd0bbcaa commit fe4dc1fd7105b8d28031f9fab5b1260fbd0bbcaa Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2022-10-11 18:44:51 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2022-10-11 18:48:50 +0000 net/nss-pam-ldapd: use closefrom in nslcd nslcd tries to close all file descriptors on startup. It does that by calling close() in a loop, running down from _SC_OPEN_MAX to 0. Since _SC_OPEN_MAX autoscales with available RAM, this can take more than a minute on large servers. The solution is to use closefrom. Upstream has already made that change in the master branch, but due to its slow release cadence we're applying it here as well. PR: 266970 Approved by: zi (maintainer) Sponsored by: Axcient net/nss-pam-ldapd/Makefile | 1 + net/nss-pam-ldapd/files/patch-config.h.in (new) | 12 ++++++++ net/nss-pam-ldapd/files/patch-configure (new) | 16 +++++++++++ .../files/patch-nslcd_daemonize.c (new) | 33 ++++++++++++++++++++++ .../files/patch-nslcd_invalidator.c (new) | 29 +++++++++++++++++++ 5 files changed, 91 insertions(+)