Activity log for bug #2038912

Date Who What changed Old value New value Message
2023-10-10 09:56:15 Roel van Meer bug added bug
2023-10-12 06:42:33 Sjors van der Pluijm bug added subscriber Sjors van der Pluijm
2023-10-18 20:30:07 Athos Ribeiro bug added subscriber Athos Ribeiro
2023-10-18 20:30:18 Athos Ribeiro bug added subscriber Ubuntu Server
2023-10-18 20:30:34 Athos Ribeiro tags amd64 apport-bug jammy amd64 apport-bug jammy server-todo
2023-10-18 20:30:39 Athos Ribeiro php8.1 (Ubuntu): assignee Athos Ribeiro (athos-ribeiro)
2023-10-25 13:09:53 Roel van Meer attachment added Allow trigger to restart apache in apache2-maintscript-helper https://bugs.launchpad.net/ubuntu/+source/php8.1/+bug/2038912/+attachment/5713199/+files/apache2-maintscript-helper.patch
2023-10-25 15:31:44 Athos Ribeiro bug task added apache2 (Ubuntu)
2023-10-25 15:31:52 Athos Ribeiro apache2 (Ubuntu): assignee Athos Ribeiro (athos-ribeiro)
2023-10-25 16:21:11 Ubuntu Foundations Team Bug Bot tags amd64 apport-bug jammy server-todo amd64 apport-bug jammy patch server-todo
2023-10-25 16:21:14 Ubuntu Foundations Team Bug Bot bug added subscriber Ubuntu Review Team
2024-01-11 18:18:19 Athos Ribeiro bug watch added https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1060450
2024-01-11 18:18:19 Athos Ribeiro bug task added apache2 (Debian)
2024-01-11 18:58:35 Bug Watch Updater apache2 (Debian): status Unknown New
2024-01-17 16:25:02 Bryce Harrington tags amd64 apport-bug jammy patch server-todo amd64 apport-bug jammy patch
2024-03-15 10:58:10 Athos Ribeiro tags amd64 apport-bug jammy patch amd64 apport-bug jammy patch server-todo
2024-03-18 13:15:21 Launchpad Janitor merge proposal linked https://code.launchpad.net/~athos-ribeiro/ubuntu/+source/apache2/+git/apache2/+merge/462591
2024-03-18 13:54:47 Launchpad Janitor merge proposal linked https://code.launchpad.net/~athos-ribeiro/ubuntu/+source/apache2/+git/apache2/+merge/462597
2024-03-18 13:56:01 Launchpad Janitor merge proposal linked https://code.launchpad.net/~athos-ribeiro/ubuntu/+source/apache2/+git/apache2/+merge/462598
2024-03-18 14:00:44 Launchpad Janitor merge proposal linked https://code.launchpad.net/~athos-ribeiro/ubuntu/+source/apache2/+git/apache2/+merge/462599
2024-03-18 19:33:05 Athos Ribeiro attachment added reproduce.sh https://bugs.launchpad.net/debian/+source/apache2/+bug/2038912/+attachment/5756866/+files/reproduce.sh
2024-03-19 13:12:27 Athos Ribeiro description Today we discovered that most of our servers that are running Apache2 + libapache2-mod-php had Apache2 running with an older version of PHP, even though libapache2-mod-php(7.4|8.1) was updated. After investigating, we found that libapache2-mod-php8.1 uses a trigger to reload apache, but that this is not supported in the apache2-maintscript-helper script. The expected behavior is that after upgrading or reinstalling libapache2-mod-php8.1, Apache2 is restarted. This should be visible by looking at the start time of the apache2 process in the process list. As far as we could find, the problem exists in apache2-maintscript-helper ( https://git.launchpad.net/~agogo147/ubuntu/+source/apache2/tree/debian/debhelper/apache2-maintscript-helper?h=applied/debian/bullseye#n221). When the trigger from libapache2-mod-php8.1 runs, the apache2-maintscript-helper is executed with the following variables: APACHE2_MAINTSCRIPT_NAME=postinst APACHE2_MAINTSCRIPT_METHOD=triggered APACHE2_MAINTSCRIPT_ARGUMENT=/etc/php/7.4/apache2/conf.d That means that the apache2_needs_action function returns 1 (e.g. no action necessary) so the intended reload does not happen. Output of the trigger of a reinstall of libapache2-mod-php7.4 with APACHE2_MAINTSCRIPT_DEBUG=1 set in envvars: Processing triggers for libapache2-mod-php7.4 (7.4.3-4ubuntu2.19) ... + APACHE2_MAINTSCRIPT_DEFER= + + egrep -q installed|triggers-awaited|triggers-pending dpkg-query -f ${Status} -W apache2 + [ -z triggered ] + APACHE2_MAINTSCRIPT_NAME=postinst + [ postinst ] + APACHE2_MAINTSCRIPT_PACKAGE=libapache2-mod-php7.4 + [ -z libapache2-mod-php7.4 ] + [ -z ] + APACHE2_MAINTSCRIPT_METHOD=triggered + [ -z ] + APACHE2_MAINTSCRIPT_ARGUMENT=/etc/php/7.4/apache2/conf.d + [ triggered = triggered ] + [ /etc/php/7.4/apache2/conf.d = /etc/php/7.4/apache2/conf.d ] + [ -e /usr/share/apache2/apache2-maintscript-helper ] + . /usr/share/apache2/apache2-maintscript-helper + [ -n 1 ] + return + apache2_reload restart + apache2_needs_action + [ triggered = configure ] + return 1 + return 0 + exit 0 Although I would be highly surprised if this is actually an issue that has not been reported yet, I could not find any reports mentioning this behavior. Also, there's a security element to this: we expected the package upgrades (we're running unattended updates) to ensure the PHP version we're running is uptodate, but now it turns out we're running old versions of PHP without us knowing. ProblemType: Bug DistroRelease: Ubuntu 22.04 Package: libapache2-mod-php8.1 8.1.2-1ubuntu2.14 ProcVersionSignature: Ubuntu 5.19.0-43.44~22.04.1-generic 5.19.17 Uname: Linux 5.19.0-43-generic x86_64 ApportVersion: 2.20.11-0ubuntu82.5 Architecture: amd64 CasperMD5CheckResult: pass CurrentDesktop: GNOME Date: Tue Oct 10 11:53:51 2023 InstallationDate: Installed on 2023-05-01 (161 days ago) InstallationMedia: Ubuntu 22.04.2 LTS "Jammy Jellyfish" - Release amd64 (20230223) SourcePackage: php8.1 UpgradeStatus: No upgrade log present (probably fresh install) [ Impact ] [ Test Plan ] A test script is available at https://bugs.launchpad.net/debian/+source/apache2/+bug/2038912/comments/5. First, verify the issue by running `UBUNTU_SERIES=jammy ./reproducer.sh`. The script will print the version of PHP (fetched from an HTTP request to apache2) - before an update, - after an update, and - after a restart. Without the fix, only the version after the restart should be different. Then, run it with `TEST_FIX=1 UBUNTU_SERIES=jammy ./reproducer.sh`. Now, the only different version should be the one before the update (meaning that updating the package will ensure the new version is running within the web server right after the update). Make sure to adjust UBUNTU_SERIES accordingly. Also, the script was written to use the proposed fix from a PPA, is should be adjusted to fetch it from the -proposed pocket once the fix is accepted. [ Where problems could occur ] [ Other Info ] [ Original Message ] Today we discovered that most of our servers that are running Apache2 + libapache2-mod-php had Apache2 running with an older version of PHP, even though libapache2-mod-php(7.4|8.1) was updated. After investigating, we found that libapache2-mod-php8.1 uses a trigger to reload apache, but that this is not supported in the apache2-maintscript-helper script. The expected behavior is that after upgrading or reinstalling libapache2-mod-php8.1, Apache2 is restarted. This should be visible by looking at the start time of the apache2 process in the process list. As far as we could find, the problem exists in apache2-maintscript-helper ( https://git.launchpad.net/~agogo147/ubuntu/+source/apache2/tree/debian/debhelper/apache2-maintscript-helper?h=applied/debian/bullseye#n221). When the trigger from libapache2-mod-php8.1 runs, the apache2-maintscript-helper is executed with the following variables: APACHE2_MAINTSCRIPT_NAME=postinst APACHE2_MAINTSCRIPT_METHOD=triggered APACHE2_MAINTSCRIPT_ARGUMENT=/etc/php/7.4/apache2/conf.d That means that the apache2_needs_action function returns 1 (e.g. no action necessary) so the intended reload does not happen. Output of the trigger of a reinstall of libapache2-mod-php7.4 with APACHE2_MAINTSCRIPT_DEBUG=1 set in envvars: Processing triggers for libapache2-mod-php7.4 (7.4.3-4ubuntu2.19) ... + APACHE2_MAINTSCRIPT_DEFER= + + egrep -q installed|triggers-awaited|triggers-pending dpkg-query -f ${Status} -W apache2 + [ -z triggered ] + APACHE2_MAINTSCRIPT_NAME=postinst + [ postinst ] + APACHE2_MAINTSCRIPT_PACKAGE=libapache2-mod-php7.4 + [ -z libapache2-mod-php7.4 ] + [ -z ] + APACHE2_MAINTSCRIPT_METHOD=triggered + [ -z ] + APACHE2_MAINTSCRIPT_ARGUMENT=/etc/php/7.4/apache2/conf.d + [ triggered = triggered ] + [ /etc/php/7.4/apache2/conf.d = /etc/php/7.4/apache2/conf.d ] + [ -e /usr/share/apache2/apache2-maintscript-helper ] + . /usr/share/apache2/apache2-maintscript-helper + [ -n 1 ] + return + apache2_reload restart + apache2_needs_action + [ triggered = configure ] + return 1 + return 0 + exit 0 Although I would be highly surprised if this is actually an issue that has not been reported yet, I could not find any reports mentioning this behavior. Also, there's a security element to this: we expected the package upgrades (we're running unattended updates) to ensure the PHP version we're running is uptodate, but now it turns out we're running old versions of PHP without us knowing. ProblemType: Bug DistroRelease: Ubuntu 22.04 Package: libapache2-mod-php8.1 8.1.2-1ubuntu2.14 ProcVersionSignature: Ubuntu 5.19.0-43.44~22.04.1-generic 5.19.17 Uname: Linux 5.19.0-43-generic x86_64 ApportVersion: 2.20.11-0ubuntu82.5 Architecture: amd64 CasperMD5CheckResult: pass CurrentDesktop: GNOME Date: Tue Oct 10 11:53:51 2023 InstallationDate: Installed on 2023-05-01 (161 days ago) InstallationMedia: Ubuntu 22.04.2 LTS "Jammy Jellyfish" - Release amd64 (20230223) SourcePackage: php8.1 UpgradeStatus: No upgrade log present (probably fresh install)
2024-03-19 13:19:38 Athos Ribeiro description [ Impact ] [ Test Plan ] A test script is available at https://bugs.launchpad.net/debian/+source/apache2/+bug/2038912/comments/5. First, verify the issue by running `UBUNTU_SERIES=jammy ./reproducer.sh`. The script will print the version of PHP (fetched from an HTTP request to apache2) - before an update, - after an update, and - after a restart. Without the fix, only the version after the restart should be different. Then, run it with `TEST_FIX=1 UBUNTU_SERIES=jammy ./reproducer.sh`. Now, the only different version should be the one before the update (meaning that updating the package will ensure the new version is running within the web server right after the update). Make sure to adjust UBUNTU_SERIES accordingly. Also, the script was written to use the proposed fix from a PPA, is should be adjusted to fetch it from the -proposed pocket once the fix is accepted. [ Where problems could occur ] [ Other Info ] [ Original Message ] Today we discovered that most of our servers that are running Apache2 + libapache2-mod-php had Apache2 running with an older version of PHP, even though libapache2-mod-php(7.4|8.1) was updated. After investigating, we found that libapache2-mod-php8.1 uses a trigger to reload apache, but that this is not supported in the apache2-maintscript-helper script. The expected behavior is that after upgrading or reinstalling libapache2-mod-php8.1, Apache2 is restarted. This should be visible by looking at the start time of the apache2 process in the process list. As far as we could find, the problem exists in apache2-maintscript-helper ( https://git.launchpad.net/~agogo147/ubuntu/+source/apache2/tree/debian/debhelper/apache2-maintscript-helper?h=applied/debian/bullseye#n221). When the trigger from libapache2-mod-php8.1 runs, the apache2-maintscript-helper is executed with the following variables: APACHE2_MAINTSCRIPT_NAME=postinst APACHE2_MAINTSCRIPT_METHOD=triggered APACHE2_MAINTSCRIPT_ARGUMENT=/etc/php/7.4/apache2/conf.d That means that the apache2_needs_action function returns 1 (e.g. no action necessary) so the intended reload does not happen. Output of the trigger of a reinstall of libapache2-mod-php7.4 with APACHE2_MAINTSCRIPT_DEBUG=1 set in envvars: Processing triggers for libapache2-mod-php7.4 (7.4.3-4ubuntu2.19) ... + APACHE2_MAINTSCRIPT_DEFER= + + egrep -q installed|triggers-awaited|triggers-pending dpkg-query -f ${Status} -W apache2 + [ -z triggered ] + APACHE2_MAINTSCRIPT_NAME=postinst + [ postinst ] + APACHE2_MAINTSCRIPT_PACKAGE=libapache2-mod-php7.4 + [ -z libapache2-mod-php7.4 ] + [ -z ] + APACHE2_MAINTSCRIPT_METHOD=triggered + [ -z ] + APACHE2_MAINTSCRIPT_ARGUMENT=/etc/php/7.4/apache2/conf.d + [ triggered = triggered ] + [ /etc/php/7.4/apache2/conf.d = /etc/php/7.4/apache2/conf.d ] + [ -e /usr/share/apache2/apache2-maintscript-helper ] + . /usr/share/apache2/apache2-maintscript-helper + [ -n 1 ] + return + apache2_reload restart + apache2_needs_action + [ triggered = configure ] + return 1 + return 0 + exit 0 Although I would be highly surprised if this is actually an issue that has not been reported yet, I could not find any reports mentioning this behavior. Also, there's a security element to this: we expected the package upgrades (we're running unattended updates) to ensure the PHP version we're running is uptodate, but now it turns out we're running old versions of PHP without us knowing. ProblemType: Bug DistroRelease: Ubuntu 22.04 Package: libapache2-mod-php8.1 8.1.2-1ubuntu2.14 ProcVersionSignature: Ubuntu 5.19.0-43.44~22.04.1-generic 5.19.17 Uname: Linux 5.19.0-43-generic x86_64 ApportVersion: 2.20.11-0ubuntu82.5 Architecture: amd64 CasperMD5CheckResult: pass CurrentDesktop: GNOME Date: Tue Oct 10 11:53:51 2023 InstallationDate: Installed on 2023-05-01 (161 days ago) InstallationMedia: Ubuntu 22.04.2 LTS "Jammy Jellyfish" - Release amd64 (20230223) SourcePackage: php8.1 UpgradeStatus: No upgrade log present (probably fresh install) [ Impact ] The apache2-maintscript-helper shipped with apache2 to be used by its reversed dependencies to interact with the provided services do not support package triggers. Package triggers may be specially useful in cases where software plugins or extensions are changed. This is the case of PHP: it relies on such triggers to request apache2 restarts in the libapache2-mod-phpX.Y postinst whenever PHP or one of its extensions is updated. Since there is no support for triggers in apache2-maintscript-helper, apache2 ends up not being restarted and users may end up with outdated PHP versions running within their web server. [ Test Plan ] A test script is available at https://bugs.launchpad.net/debian/+source/apache2/+bug/2038912/comments/5. First, verify the issue by running `UBUNTU_SERIES=jammy ./reproducer.sh`. The script will print the version of PHP (fetched from an HTTP request to apache2) - before an update, - after an update, and - after a restart. Without the fix, only the version after the restart should be different. Then, run it with `TEST_FIX=1 UBUNTU_SERIES=jammy ./reproducer.sh`. Now, the only different version should be the one before the update (meaning that updating the package will ensure the new version is running within the web server right after the update). Make sure to adjust UBUNTU_SERIES accordingly. Also, the script was written to use the proposed fix from a PPA, is should be adjusted to fetch it from the -proposed pocket once the fix is accepted. [ Where problems could occur ] [ Other Info ] [ Original Message ] Today we discovered that most of our servers that are running Apache2 + libapache2-mod-php had Apache2 running with an older version of PHP, even though libapache2-mod-php(7.4|8.1) was updated. After investigating, we found that libapache2-mod-php8.1 uses a trigger to reload apache, but that this is not supported in the apache2-maintscript-helper script. The expected behavior is that after upgrading or reinstalling libapache2-mod-php8.1, Apache2 is restarted. This should be visible by looking at the start time of the apache2 process in the process list. As far as we could find, the problem exists in apache2-maintscript-helper ( https://git.launchpad.net/~agogo147/ubuntu/+source/apache2/tree/debian/debhelper/apache2-maintscript-helper?h=applied/debian/bullseye#n221). When the trigger from libapache2-mod-php8.1 runs, the apache2-maintscript-helper is executed with the following variables: APACHE2_MAINTSCRIPT_NAME=postinst APACHE2_MAINTSCRIPT_METHOD=triggered APACHE2_MAINTSCRIPT_ARGUMENT=/etc/php/7.4/apache2/conf.d That means that the apache2_needs_action function returns 1 (e.g. no action necessary) so the intended reload does not happen. Output of the trigger of a reinstall of libapache2-mod-php7.4 with APACHE2_MAINTSCRIPT_DEBUG=1 set in envvars: Processing triggers for libapache2-mod-php7.4 (7.4.3-4ubuntu2.19) ... + APACHE2_MAINTSCRIPT_DEFER= + + egrep -q installed|triggers-awaited|triggers-pending dpkg-query -f ${Status} -W apache2 + [ -z triggered ] + APACHE2_MAINTSCRIPT_NAME=postinst + [ postinst ] + APACHE2_MAINTSCRIPT_PACKAGE=libapache2-mod-php7.4 + [ -z libapache2-mod-php7.4 ] + [ -z ] + APACHE2_MAINTSCRIPT_METHOD=triggered + [ -z ] + APACHE2_MAINTSCRIPT_ARGUMENT=/etc/php/7.4/apache2/conf.d + [ triggered = triggered ] + [ /etc/php/7.4/apache2/conf.d = /etc/php/7.4/apache2/conf.d ] + [ -e /usr/share/apache2/apache2-maintscript-helper ] + . /usr/share/apache2/apache2-maintscript-helper + [ -n 1 ] + return + apache2_reload restart + apache2_needs_action + [ triggered = configure ] + return 1 + return 0 + exit 0 Although I would be highly surprised if this is actually an issue that has not been reported yet, I could not find any reports mentioning this behavior. Also, there's a security element to this: we expected the package upgrades (we're running unattended updates) to ensure the PHP version we're running is uptodate, but now it turns out we're running old versions of PHP without us knowing. ProblemType: Bug DistroRelease: Ubuntu 22.04 Package: libapache2-mod-php8.1 8.1.2-1ubuntu2.14 ProcVersionSignature: Ubuntu 5.19.0-43.44~22.04.1-generic 5.19.17 Uname: Linux 5.19.0-43-generic x86_64 ApportVersion: 2.20.11-0ubuntu82.5 Architecture: amd64 CasperMD5CheckResult: pass CurrentDesktop: GNOME Date: Tue Oct 10 11:53:51 2023 InstallationDate: Installed on 2023-05-01 (161 days ago) InstallationMedia: Ubuntu 22.04.2 LTS "Jammy Jellyfish" - Release amd64 (20230223) SourcePackage: php8.1 UpgradeStatus: No upgrade log present (probably fresh install)
2024-03-19 13:27:25 Athos Ribeiro description [ Impact ] The apache2-maintscript-helper shipped with apache2 to be used by its reversed dependencies to interact with the provided services do not support package triggers. Package triggers may be specially useful in cases where software plugins or extensions are changed. This is the case of PHP: it relies on such triggers to request apache2 restarts in the libapache2-mod-phpX.Y postinst whenever PHP or one of its extensions is updated. Since there is no support for triggers in apache2-maintscript-helper, apache2 ends up not being restarted and users may end up with outdated PHP versions running within their web server. [ Test Plan ] A test script is available at https://bugs.launchpad.net/debian/+source/apache2/+bug/2038912/comments/5. First, verify the issue by running `UBUNTU_SERIES=jammy ./reproducer.sh`. The script will print the version of PHP (fetched from an HTTP request to apache2) - before an update, - after an update, and - after a restart. Without the fix, only the version after the restart should be different. Then, run it with `TEST_FIX=1 UBUNTU_SERIES=jammy ./reproducer.sh`. Now, the only different version should be the one before the update (meaning that updating the package will ensure the new version is running within the web server right after the update). Make sure to adjust UBUNTU_SERIES accordingly. Also, the script was written to use the proposed fix from a PPA, is should be adjusted to fetch it from the -proposed pocket once the fix is accepted. [ Where problems could occur ] [ Other Info ] [ Original Message ] Today we discovered that most of our servers that are running Apache2 + libapache2-mod-php had Apache2 running with an older version of PHP, even though libapache2-mod-php(7.4|8.1) was updated. After investigating, we found that libapache2-mod-php8.1 uses a trigger to reload apache, but that this is not supported in the apache2-maintscript-helper script. The expected behavior is that after upgrading or reinstalling libapache2-mod-php8.1, Apache2 is restarted. This should be visible by looking at the start time of the apache2 process in the process list. As far as we could find, the problem exists in apache2-maintscript-helper ( https://git.launchpad.net/~agogo147/ubuntu/+source/apache2/tree/debian/debhelper/apache2-maintscript-helper?h=applied/debian/bullseye#n221). When the trigger from libapache2-mod-php8.1 runs, the apache2-maintscript-helper is executed with the following variables: APACHE2_MAINTSCRIPT_NAME=postinst APACHE2_MAINTSCRIPT_METHOD=triggered APACHE2_MAINTSCRIPT_ARGUMENT=/etc/php/7.4/apache2/conf.d That means that the apache2_needs_action function returns 1 (e.g. no action necessary) so the intended reload does not happen. Output of the trigger of a reinstall of libapache2-mod-php7.4 with APACHE2_MAINTSCRIPT_DEBUG=1 set in envvars: Processing triggers for libapache2-mod-php7.4 (7.4.3-4ubuntu2.19) ... + APACHE2_MAINTSCRIPT_DEFER= + + egrep -q installed|triggers-awaited|triggers-pending dpkg-query -f ${Status} -W apache2 + [ -z triggered ] + APACHE2_MAINTSCRIPT_NAME=postinst + [ postinst ] + APACHE2_MAINTSCRIPT_PACKAGE=libapache2-mod-php7.4 + [ -z libapache2-mod-php7.4 ] + [ -z ] + APACHE2_MAINTSCRIPT_METHOD=triggered + [ -z ] + APACHE2_MAINTSCRIPT_ARGUMENT=/etc/php/7.4/apache2/conf.d + [ triggered = triggered ] + [ /etc/php/7.4/apache2/conf.d = /etc/php/7.4/apache2/conf.d ] + [ -e /usr/share/apache2/apache2-maintscript-helper ] + . /usr/share/apache2/apache2-maintscript-helper + [ -n 1 ] + return + apache2_reload restart + apache2_needs_action + [ triggered = configure ] + return 1 + return 0 + exit 0 Although I would be highly surprised if this is actually an issue that has not been reported yet, I could not find any reports mentioning this behavior. Also, there's a security element to this: we expected the package upgrades (we're running unattended updates) to ensure the PHP version we're running is uptodate, but now it turns out we're running old versions of PHP without us knowing. ProblemType: Bug DistroRelease: Ubuntu 22.04 Package: libapache2-mod-php8.1 8.1.2-1ubuntu2.14 ProcVersionSignature: Ubuntu 5.19.0-43.44~22.04.1-generic 5.19.17 Uname: Linux 5.19.0-43-generic x86_64 ApportVersion: 2.20.11-0ubuntu82.5 Architecture: amd64 CasperMD5CheckResult: pass CurrentDesktop: GNOME Date: Tue Oct 10 11:53:51 2023 InstallationDate: Installed on 2023-05-01 (161 days ago) InstallationMedia: Ubuntu 22.04.2 LTS "Jammy Jellyfish" - Release amd64 (20230223) SourcePackage: php8.1 UpgradeStatus: No upgrade log present (probably fresh install) [ Impact ] The apache2-maintscript-helper shipped with apache2 to be used by its reversed dependencies to interact with the provided services do not support package triggers. Package triggers may be specially useful in cases where software plugins or extensions are changed. This is the case of PHP: it relies on such triggers to request apache2 restarts in the libapache2-mod-phpX.Y postinst whenever PHP or one of its extensions is updated. Since there is no support for triggers in apache2-maintscript-helper, apache2 ends up not being restarted and users may end up with outdated PHP versions running within their web server. [ Test Plan ] A test script is available at https://bugs.launchpad.net/debian/+source/apache2/+bug/2038912/comments/5. First, verify the issue by running `UBUNTU_SERIES=jammy ./reproducer.sh`. The script will print the version of PHP (fetched from an HTTP request to apache2) - before an update, - after an update, and - after a restart. Without the fix, only the version after the restart should be different. Then, run it with `TEST_FIX=1 UBUNTU_SERIES=jammy ./reproducer.sh`. Now, the only different version should be the one before the update (meaning that updating the package will ensure the new version is running within the web server right after the update). Make sure to adjust UBUNTU_SERIES accordingly. Also, the script was written to use the proposed fix from a PPA, is should be adjusted to fetch it from the -proposed pocket once the fix is accepted. [ Where problems could occur ] There may be situations we did not account for where supporting "postinst triggered" in the helper script is not a supported use case. This should most likely be analyzed in a case-by-case fashion. FWIW, AFAICT, PHP is the only package using apache2's maintscript-helper to restart the service through a trigger (based on queries in Debian codesearch). [ Other Info ] Since we are touching an apache2 helper used by several other packages, we wanted to get input from Debian before landing this SRU to ensure this is something we will merge upstream at some point. Since we still did not get a reply, let's move forward here to ensure we get a fix in noble (this is an important bug if users are led to believe apache2 is being restarted when they update PHP). [ Original Message ] Today we discovered that most of our servers that are running Apache2 + libapache2-mod-php had Apache2 running with an older version of PHP, even though libapache2-mod-php(7.4|8.1) was updated. After investigating, we found that libapache2-mod-php8.1 uses a trigger to reload apache, but that this is not supported in the apache2-maintscript-helper script. The expected behavior is that after upgrading or reinstalling libapache2-mod-php8.1, Apache2 is restarted. This should be visible by looking at the start time of the apache2 process in the process list. As far as we could find, the problem exists in apache2-maintscript-helper ( https://git.launchpad.net/~agogo147/ubuntu/+source/apache2/tree/debian/debhelper/apache2-maintscript-helper?h=applied/debian/bullseye#n221). When the trigger from libapache2-mod-php8.1 runs, the apache2-maintscript-helper is executed with the following variables: APACHE2_MAINTSCRIPT_NAME=postinst APACHE2_MAINTSCRIPT_METHOD=triggered APACHE2_MAINTSCRIPT_ARGUMENT=/etc/php/7.4/apache2/conf.d That means that the apache2_needs_action function returns 1 (e.g. no action necessary) so the intended reload does not happen. Output of the trigger of a reinstall of libapache2-mod-php7.4 with APACHE2_MAINTSCRIPT_DEBUG=1 set in envvars: Processing triggers for libapache2-mod-php7.4 (7.4.3-4ubuntu2.19) ... + APACHE2_MAINTSCRIPT_DEFER= + + egrep -q installed|triggers-awaited|triggers-pending dpkg-query -f ${Status} -W apache2 + [ -z triggered ] + APACHE2_MAINTSCRIPT_NAME=postinst + [ postinst ] + APACHE2_MAINTSCRIPT_PACKAGE=libapache2-mod-php7.4 + [ -z libapache2-mod-php7.4 ] + [ -z ] + APACHE2_MAINTSCRIPT_METHOD=triggered + [ -z ] + APACHE2_MAINTSCRIPT_ARGUMENT=/etc/php/7.4/apache2/conf.d + [ triggered = triggered ] + [ /etc/php/7.4/apache2/conf.d = /etc/php/7.4/apache2/conf.d ] + [ -e /usr/share/apache2/apache2-maintscript-helper ] + . /usr/share/apache2/apache2-maintscript-helper + [ -n 1 ] + return + apache2_reload restart + apache2_needs_action + [ triggered = configure ] + return 1 + return 0 + exit 0 Although I would be highly surprised if this is actually an issue that has not been reported yet, I could not find any reports mentioning this behavior. Also, there's a security element to this: we expected the package upgrades (we're running unattended updates) to ensure the PHP version we're running is uptodate, but now it turns out we're running old versions of PHP without us knowing. ProblemType: Bug DistroRelease: Ubuntu 22.04 Package: libapache2-mod-php8.1 8.1.2-1ubuntu2.14 ProcVersionSignature: Ubuntu 5.19.0-43.44~22.04.1-generic 5.19.17 Uname: Linux 5.19.0-43-generic x86_64 ApportVersion: 2.20.11-0ubuntu82.5 Architecture: amd64 CasperMD5CheckResult: pass CurrentDesktop: GNOME Date: Tue Oct 10 11:53:51 2023 InstallationDate: Installed on 2023-05-01 (161 days ago) InstallationMedia: Ubuntu 22.04.2 LTS "Jammy Jellyfish" - Release amd64 (20230223) SourcePackage: php8.1 UpgradeStatus: No upgrade log present (probably fresh install)
2024-03-20 12:10:42 Athos Ribeiro nominated for series Ubuntu Mantic
2024-03-20 12:10:42 Athos Ribeiro bug task added apache2 (Ubuntu Mantic)
2024-03-20 12:10:42 Athos Ribeiro bug task added php8.1 (Ubuntu Mantic)
2024-03-20 12:10:42 Athos Ribeiro nominated for series Ubuntu Focal
2024-03-20 12:10:42 Athos Ribeiro bug task added apache2 (Ubuntu Focal)
2024-03-20 12:10:42 Athos Ribeiro bug task added php8.1 (Ubuntu Focal)
2024-03-20 12:10:42 Athos Ribeiro nominated for series Ubuntu Jammy
2024-03-20 12:10:42 Athos Ribeiro bug task added apache2 (Ubuntu Jammy)
2024-03-20 12:10:42 Athos Ribeiro bug task added php8.1 (Ubuntu Jammy)
2024-03-20 12:10:42 Athos Ribeiro nominated for series Ubuntu Noble
2024-03-20 12:10:42 Athos Ribeiro bug task added apache2 (Ubuntu Noble)
2024-03-20 12:10:42 Athos Ribeiro bug task added php8.1 (Ubuntu Noble)
2024-03-20 12:11:14 Athos Ribeiro apache2 (Ubuntu Mantic): status New Triaged
2024-03-20 12:11:14 Athos Ribeiro apache2 (Ubuntu Mantic): assignee Athos Ribeiro (athos-ribeiro)
2024-03-20 12:11:28 Athos Ribeiro apache2 (Ubuntu Noble): status New Triaged
2024-03-20 12:11:41 Athos Ribeiro apache2 (Ubuntu Jammy): status New Triaged
2024-03-20 12:11:41 Athos Ribeiro apache2 (Ubuntu Jammy): assignee Athos Ribeiro (athos-ribeiro)
2024-03-20 12:11:55 Athos Ribeiro apache2 (Ubuntu Focal): status New Triaged
2024-03-20 12:11:55 Athos Ribeiro apache2 (Ubuntu Focal): assignee Athos Ribeiro (athos-ribeiro)
2024-03-20 12:12:22 Athos Ribeiro apache2 (Ubuntu Noble): status Triaged Fix Committed
2024-03-28 07:54:54 Launchpad Janitor apache2 (Ubuntu Noble): status Fix Committed Fix Released
2024-04-27 14:24:02 Launchpad Janitor php8.1 (Ubuntu): status New Confirmed
2024-04-27 14:24:02 Launchpad Janitor php8.1 (Ubuntu Focal): status New Confirmed
2024-04-27 14:24:02 Launchpad Janitor php8.1 (Ubuntu Jammy): status New Confirmed
2024-04-27 14:24:02 Launchpad Janitor php8.1 (Ubuntu Mantic): status New Confirmed