[php-src] Issue #9488: Apache 2.4.54 core dumps and will not start when module libphp.so compiled from PHP8.1 is loaded
| From: | w112087 | Date: | Tue, 06 Sep 2022 10:09:48 +0000 |
| Subject: | [php-src] Issue #9488: Apache 2.4.54 core dumps and will not start when module libphp.so compiled from PHP8.1 is loaded | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-242367@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/9488
Author: w112087
### Description
We have been successfully built and used PHP7.4 versions 7.4.15 - 7.4.30 & PHP80 versions 8.0.8
- 8.0.13 over the last two years. But due to 7.4 going EOL soon we wished to jump to the latest
stable 8.1 all systems running 7.4, but we have been unable to build.
When building 8.1 the PHP binary builds, libphp.so is created however when Apache 2.4.54 attempts to
loads it we see a core dump and failure of Apache.
I have tried the simplest PHP8.1 build as below:
$ ./configure --prefix=/prod/php81 --without-pcre-jit --with-apxs2=/prod/apache24/current/bin/apxs
$ make (version 4.3)
$ make install
Using the Oracle Solaris gcc version 10.3.0 (GCC) part of the Oracle gcc-10 packages
The php binary builds:
$ /prod/php81/bin/php -i | more
phpinfo()
PHP Version => 8.1.10
....
libphp.so builds
$ ls -ltr /prod/apache24/current/modules/libphp.so
-rwxr-xr-x 1 root root 41129600 Sep 5 15:06 /prod/apache24/current/modules/libphp.so
We've configured the module into Apache, but at start it dumps:
#pstack /var/cores/global/core_our_server_name_httpd_0_0_1662391079_26528
core '/var/cores/global/core_our_server_name_httpd_0_0_1662391079_26528' of 26528:
/prod/apache24/current/bin/httpd -k start
ffffffff344f6108 sapi_register_post_entry (ffffffff347a9540, 0, 0, 0, ffffffff3483a590, 0) + 34
ffffffff344f6270 sapi_register_post_entries (ffffffff347a9540, 8, ffffffff344f43f4, 1, 0, 0) + 28
ffffffff344f9780 php_setup_sapi_content_types (0, 100208400, 1800, 0, 1980, ffffffff7df24000) + 1c
ffffffff344e7508 tsrm_update_active_threads (ffffffff3483a370, 1, 28, 100294178, 8, 10029f360) + f4
(TSRM.c:264)
ffffffff344e7a9c ts_allocate_fast_id (ffffffff3483a598, ffffffff3483a590, 220, ffffffff344f43b0,
ffffffff344f43a4, 28) + f0
ffffffff3468b284 php_apache_server_startup (1001de678, 10020e938, 10020c928, 10020aa00,
ffffffff7fffd920, ffffffff3479ef68) + 70 (sapi_apache2.c:489)
0000000100072184 ap_run_post_config (1001de678, 10020e938, 10020c928, 10020aa00, 1001be, 100000) +
54
000000010003286c main (100000, 10003c, 1001bda20, 1000a5128, 1001dc760, 100030000) + 11fc
0000000100030770 _start (0, 0, 0, 0, 0, 1001b30f0) + 110
We are building on Solaris 11.4 SPARC (os version 11.4.38.0.1.101.6 (Oracle Solaris 11.4.38.101.6))
and as mentioned before this build process works fine with php 7.4 & 8.0. I've tried all
sorts of things to get this working but it always dumps with the exact same error, but I can't
see why or what's changed.
### PHP Version
PHP8.1
### Operating System
Solaris 11.4