Bug #80756 [Opn->Nab]: Since glibc 2.33 NSS must be initialized before calling chroot(2)
| From: | sjon@php.net | Date: | Wed, 03 Mar 2021 08:25:53 +0000 |
| Subject: | Bug #80756 [Opn->Nab]: Since glibc 2.33 NSS must be initialized before calling chroot(2) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-232494@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80756&edit=1
ID: 80756
Updated by: sjon@php.net
Reported by: dpa-bugs at aegee dot org
Summary: Since glibc 2.33 NSS must be initialized before
calling chroot(2)
-Status: Open
+Status: Not a bug
Type: Bug
Package: *General Issues
Operating System: Linux from Scratch
PHP Version: 7.3.27
Block user comment: N
Private report: N
New Comment:
this change in glibc was reverted: https://sourceware.org/bugzilla/show_bug.cgi?id=27077#c8
which likely confirms the glibc change was considered a mistake
With this change included in newer glibc versions, PHP-FPM should continue to work like it
previously did
Previous Comments:
------------------------------------------------------------------------
[2021-02-17 10:56:03] sjon@php.net
While this bugreport is correct, I'd wait for glibc to conclude their internal discussion,
which might lead to them fixing it themselves:
https://sourceware.org/pipermail/libc-alpha/2021-February/122714.html
------------------------------------------------------------------------
[2021-02-16 11:52:41] dpa-bugs at aegee dot org
Description:
------------
I use php-fpm 7.3.25 . For each user php-fpm.ini contains chroot= . After I upgraded glbc 2.32
â 2.33 php started crashing like crazy, creating core dumps until it filled my entire disk. I
have not investigated the core dumps. However, after the 2.32 â 2.33 upgrade openldap (which
also runs in chroot) also stopped working. Investigating the cause lead to the conclusion, that
since glibc 2.33 chrooted programmes must first initiate NSS and then switch in the chrooted
environment, as within the chrooted environment NSS cannot be initialized:
https://sourceware.org/bugzilla/show_bug.cgi?id=27077
In my particular example I had long time ago nscd long time ago running, then I disabled it and the
system worked fine this way for many years. Since the upgrade to glibc 2.33 I must run ncsd again
and bind-mount /var/nscd/socket in the chroot(2)ed environment. This makes php-fpm working again
fine.
As outlined in the above PR, since glibc 2.33 NSS must be initialized before switching to chroot.
Please adjust php-fpm accordingly.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80756&edit=1