PHP-FPM rebuild hangs at scl enable gcc-toolset-13 bash on AlmaLinux 8

Started by Wonder, Today at 11:00:00 AM

Previous topic - Next topic

Wonder

Hello,

I found an issue while rebuilding PHP-FPM 5.6 using the new CWP PHP rebuild command on AlmaLinux 8.

Environment:

OS: AlmaLinux 8

CWP: 1.30.x

PHP-FPM: 5.6.40

Rebuild command: /scripts/cwp_php build fpm 5.6 latest

GCC Toolset 13 already installed

Problem:

The rebuild started normally, downloaded php-dependencies.sh, and then stopped making progress.

CPU load remained very low, and /var/log/php-selector-rebuild.log showed no further output.

After approximately 10 minutes, I checked the process tree and found:

php-build.sh
└── php-dependencies.sh
└── scl enable gcc-toolset-13 bash
└── /bin/bash /var/tmp/sclXXXXXX
└── bash

The last bash process remained active, with its standard input connected to the original terminal.

I then checked /usr/local/src/php-dependencies.sh and found:

5: dnf --setopt=*.skip_if_unavailable=1 install -y gcc-toolset-13
6: scl enable gcc-toolset-13 bash

The dependency log confirmed that GCC Toolset 13 was already installed:

Package gcc-toolset-13-13.0-2.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

Workaround:

I identified the child bash process started through scl and terminated only that process using SIGTERM.

Immediately afterward, the dependency script continued. I observed subsequent package operations, source extraction, configuration and compilation.

The rebuild eventually finished successfully:

Build Completed

Verifying the installed PHP versions...
OK /opt/alt/php-fpm56/usr/bin/php: 5.6.40
All requested PHP versions are installed.

The resulting PHP version was:

PHP 5.6.40pl-cwpsec (fpm-fcgi)

PHP-FPM was active, the existing configuration was preserved, and the previously installed extensions were still available.

Possible cause:

The command:

scl enable gcc-toolset-13 bash

appears to start a child shell that waits for input instead of returning control to the dependency script.

This could explain why the PHP rebuild remains stalled indefinitely during the dependency stage.

Also, terminating that shell allowed the build to continue, but I cannot confirm whether GCC Toolset 13 remained enabled for the subsequent compilation.

Suggested investigation:

Could the CWP team review how GCC Toolset 13 is activated in php-dependencies.sh?

It may be necessary to execute the intended build commands inside the SCL environment rather than launching a standalone shell that waits for input.

Thank you for your work on CWP and the PHP security backports.