]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix named failing to start on Solaris systems with hundreds of CPUs
authorArtem Boldariev <artem@boldariev.com>
Wed, 19 Oct 2022 12:26:48 +0000 (15:26 +0300)
committerArtem Boldariev <artem@boldariev.com>
Thu, 20 Oct 2022 12:21:53 +0000 (15:21 +0300)
This commit fixes a startup issue on Solaris systems with
many (reportedly > 510) CPUs by bumping RLIMIT_NOFILE. This appears to
be a regression from 9.11.

(cherry picked from commit fff01fe7eb738ef086a1b4b1712cefbe0c3243cf)

bin/named/unix/os.c

index 1ab428baee3705ad9a7def140d2a0e584bb1c2e8..98c826ccf5cecc0f640fcfd3c130be29e6e70fed 100644 (file)
@@ -485,13 +485,15 @@ ns_os_uid(void) {
 
 void
 named_os_adjustnofile(void) {
-#if defined(__linux__)
+#if defined(__linux__) || defined(__sun)
        isc_result_t result;
        isc_resourcevalue_t newvalue;
 
        /*
         * Linux: max number of open files specified by one thread doesn't seem
         * to apply to other threads on Linux.
+        * Sun: restriction needs to be removed sooner when hundreds of CPUs
+        * are available.
         */
        newvalue = ISC_RESOURCE_UNLIMITED;
 
@@ -499,7 +501,7 @@ named_os_adjustnofile(void) {
        if (result != ISC_R_SUCCESS) {
                named_main_earlywarning("couldn't adjust limit on open files");
        }
-#endif /* if defined(__linux__) */
+#endif /* if defined(__linux__) || defined(__sun) */
 }
 
 void