Topic: Repo offers PHP 7.4.8 which is unreleased and segfaults

Hey there,

on http://rpms.remirepo.net/enterprise/7/p … /repoview/ today packages for PHP 7.4.8 appeared, which is a bit disturbing because the official PHP website still lists 7.4.7 as the most current and stable version, as of now while I am posting.

Besides that, it seems that on the commandline everything ends with a segfault except just outputting the version:

[root@stardust ~]# /opt/remi/php74/root/usr/bin/php -v
PHP 7.4.8 (cli) (built: Jul  7 2020 09:27:45) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.8, Copyright (c), by Zend Technologies
[root@stardust ~]# /opt/remi/php74/root/usr/bin/php -r "echo '';"
Segmentation fault

This is on the most current CentOS 7 release:

[root@stardust ~]# cat /etc/centos-release
CentOS Linux release 7.8.2003 (Core)

We observed similar problems before but only if

opcache.enable_cli=1

was set, so we checked that already, but even setting

opcache.enable_cli=0

in

/etc/opt/remi/php74/php.d/10-opcache.ini

does not prevent that segfault from happening.

However, completely _removing_ the opcache by commenting out the

zend_extension=opcache

line in

10-opcache.ini

fixes the problem, so that is at least some pointer.

Downgrading to 7.4.7 this problem disappears, with unchanged config.

Any clues or insights on this?

Thanks,
Jonas

Re: Repo offers PHP 7.4.8 which is unreleased and segfaults

See: https://blog.remirepo.net/pages/English-FAQ#qa

So 7.4.8 exists: https://github.com/php/php-src/releases/tag/php-7.4.8

Please open an upstream bug report on https://bugs.php.net/

Desktop: Fedora 31 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 32 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: Repo offers PHP 7.4.8 which is unreleased and segfaults

Hmm... I cannot reproduce

$ cat /etc/redhat-release 
CentOS Linux release 7.8.2003 (Core)

$ php74 -v
PHP 7.4.8 (cli) (built: Jul  7 2020 09:27:45) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.8, Copyright (c), by Zend Technologies

$ php74 -d opcache.enable_cli=0 -r "echo '';"

$ php74 -d opcache.enable_cli=1 -r "echo '';"

Any other installed extensions ?

# rpm -qa php74\* | sort
# php74 --modules
Desktop: Fedora 31 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 32 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: Repo offers PHP 7.4.8 which is unreleased and segfaults

And of course a gdb backtrace is welcome.

Desktop: Fedora 31 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 32 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: Repo offers PHP 7.4.8 which is unreleased and segfaults

Notice, there is NO change in opcache ext. between 7.4.7 and 7.4.8...

Desktop: Fedora 31 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 32 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: Repo offers PHP 7.4.8 which is unreleased and segfaults

Hello Remi,

thanks a lot for your quick feedback and insights - and the FAQ pointer; I am a bit ashamed for being unable to locate this; honestly it is a bit "surprising" to stumble upon packages in the non-testing repo that might NOT be considered stable/released yet. Thanks for letting me learn more about this!

I was able to track down the problem a little bit, by removing all extra packages, reinstalling them one by one (starting with cli + opcache) and finding out at which point things started to break. So obviously there is an incompatibility between php74-php-opcache-7.4.8-1.el7.remi.x86_64.rpm and php74-php-pecl-decimal-1.3.1-1.el7.remi.x86_64.rpm.

This works fine (installing only the basics: cli + opcache, with its dependencies):

[root@stardust ~]# yum -y remove "php74*"
...
[root@stardust ~]# yum -y install php74-php-cli php74-php-opcache
...
[root@stardust ~]# /opt/remi/php74/root/usr/bin/php -r "echo '';" ; echo $?
0

Adding php74-php-pecl-decimal breaks it:

[root@stardust ~]# yum -y install php74-php-pecl-decimal
...
[root@stardust ~]# /opt/remi/php74/root/usr/bin/php -r "echo '';" ; echo $?
Segmentation fault
139

Removing php74-php-opcache and leaving php74-php-pecl-decimal in place works fine again:

[root@stardust ~]# yum -y remove php74-php-opcache
...
[root@stardust ~]# /opt/remi/php74/root/usr/bin/php -r "echo '';" ; echo $?
0

Unfortunately we need both modules... ;-)

The php74-php-pecl-decimal-1.3.1-1.el7.remi.x86_64.rpm was not touched (this package is from Feb 2020 and has been installed ever since) and is working fine with the PHP 7.4.7 packages. So, for reference, minimum list of 7.4.7 packages including opcache and pecl-decimal, plus pecl-decimal:

[root@stardust ~]# rpm -qa | grep ^php74
php74-runtime-1.0-3.el7.remi.x86_64
php74-php-opcache-7.4.7-1.el7.remi.x86_64
php74-php-common-7.4.7-1.el7.remi.x86_64
php74-php-cli-7.4.7-1.el7.remi.x86_64
php74-php-pecl-decimal-1.3.1-1.el7.remi.x86_64
php74-php-json-7.4.7-1.el7.remi.x86_64
[root@stardust ~]# /opt/remi/php74/root/usr/bin/php -r "echo '';" ; echo $?
0

Upgrading to 7.4.8 (php74-php-pecl-decimal already being the most recent version before, so it is unchanged):

[root@stardust ~]# rpm -qa php74\* | sort
php74-php-cli-7.4.8-1.el7.remi.x86_64
php74-php-common-7.4.8-1.el7.remi.x86_64
php74-php-json-7.4.8-1.el7.remi.x86_64
php74-php-opcache-7.4.8-1.el7.remi.x86_64
php74-php-pecl-decimal-1.3.1-1.el7.remi.x86_64
php74-runtime-1.0-3.el7.remi.x86_64
[root@stardust ~]# /opt/remi/php74/root/usr/bin/php -r "echo '';" ; echo $?
Segmentation fault
139

Having to do some research about how to create a gdb backtrace (never done that before). I will keep you posted as soon as I manage to take the next step.

Thanks again!
Jonas

Re: Repo offers PHP 7.4.8 which is unreleased and segfaults

Here is the backtrace

(gdb) bt
#0  zend_mm_shutdown (silent=<optimized out>, full=1, heap=0x7ffff3c00040) at /usr/src/debug/php-7.4.8/Zend/zend_alloc.c:2255
#1  zend_mm_shutdown (heap=0x7ffff3c00040, full=1, silent=<optimized out>) at /usr/src/debug/php-7.4.8/Zend/zend_alloc.c:2206
#2  0x00005555557ee32a in php_module_shutdown () at /usr/src/debug/php-7.4.8/main/main.c:2498
#3  php_module_shutdown () at /usr/src/debug/php-7.4.8/main/main.c:2458
#4  0x00005555556571d4 in main (argc=3, argv=0x555555d73f50) at /usr/src/debug/php-7.4.8/sapi/cli/php_cli.c:1374
Desktop: Fedora 31 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 32 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: Repo offers PHP 7.4.8 which is unreleased and segfaults

Reported as https://github.com/php-decimal/ext-decimal/issues/45

Desktop: Fedora 31 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 32 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: Repo offers PHP 7.4.8 which is unreleased and segfaults

For sanity, I have removed 7.4.8 QA builds from the repository.

Proper fix is under discussion (with other Release Managers)

Thanks for your report which has allowed to find this breakage before official announcement
BTW, this is the second time this happens this year... while such issue should be detected during the 2 weeks of RC phase sad

Desktop: Fedora 31 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 32 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: Repo offers PHP 7.4.8 which is unreleased and segfaults

7.4.8 have been retagged (very rare exception) with guilty commit reverted.

New build (7.4.8-2) are now available in the repository

Broken ext (decimal, xdebug, componere, uopz...) should work again (at least, I've tested decimal and xdebug)

Will be officially announced in a few hours (when Windows build will be ready)

Desktop: Fedora 31 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 32 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: Repo offers PHP 7.4.8 which is unreleased and segfaults

https://www.php.net/releases/7_4_8.php wink

Desktop: Fedora 31 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 32 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: Repo offers PHP 7.4.8 which is unreleased and segfaults

Excellent! Dear Remi, thanks a lot for not only identifying, but also escalating the problem to the correct person so that a fixed version is available. Glad that happened before the official release!

All the best,
Jonas