Learn about Centmin Mod LEMP Stack today
Register Now

PHP-FPM PHP-FPM unavailable after PHP recompile (menu option 5)

Discussion in 'Install & Upgrades or Pre-Install Questions' started by iaTa, Oct 29, 2026 at 8:17 PM.

  1. iaTa

    iaTa Member

    105
    18
    18
    Mar 26, 2018
    Ratings:
    +38
    Local Time:
    7:06 AM
    Nginx 1.31.x
    MariaDB 10.11.x
    • CentOS Version: AlmaLinux 9.8
    • Centmin Mod Version Installed: 140.00beta01.b443
    • Nginx Version Installed: 1.31.8
    • PHP Version Installed: 8.3.36
    • MariaDB MySQL Version Installed: 10.11.19
    • Updated Centmin Mod code base: Today
    • Persistent Config:
      Code (Text):
      NEEDRESTART_CHECK='y'
      VHOSTCTRL_CLOUDFLAREINC='y'
      LETSENCRYPT_DETECT='y'
      DUALCERTS='y'
      NGINX_SSLCACHE_ALLOWOVERRIDE='y'
      NGINX_STAPLE_CACHE_OVERRIDE='y'
      NGINX_STAPLE_CACHE_TTL='86400'
      SET_DEFAULT_MYSQLCHARSET='utf8mb4'
      ZSTD_LOGROTATE_NGINX='y'
      ZSTD_LOGROTATE_PHPFPM='y'
      SELFSIGNEDSSL_ECDSA='y'
      NGINX_LIBBROTLI='y'
      NGXDYNAMIC_BROTLI='y'
      PHP_BROTLI='y'
      PHP_LZFOUR='y'
      PHP_LZF='y'
      PHP_ZSTD='y'
      DMOTD_PHPCHECK='y'
      PHPFINFO='y'
      WPCLI_CE_QUERYSTRING_INCLUDED='y'
      PHP_PGO='y'
      PHP_PGO_ALWAYS='y'
      MARCH_TARGETNATIVE='y'
      MARCH_TARGETNATIVE_ALWAYS='y'
      PHP_LIBGD_EXTERNAL='y'
      PHP_GD_AVIF='y'
      IMAGEMAGICK_SEVEN='y'
      AUTODETECPHP_OVERRIDE='y'
      DMOTD_CVECHECK='y'
      DMOTD_COMPACT='y'
      DMOTD_FANCY='y'
      DMOTD_CVECHECK_COMPACT='y'
      PUREFTPD_DISABLED=y
    For a number of months now, every time I recompile PHP using menu option 5, the upgrade completes successfully but PHP-FPM becomes unavailable until I restart it manually. I restarted it around 10 seconds after the latest recompile finished, as this has happened repeatedly.

    While investigating today's rebuild, I noticed the following in inc/php_upgrade.inc:
    • Line 1521: cmservice php-fpm restart
    • Line 1629: strip_php_extensions
    • No subsequent PHP-FPM restart appears in this section.
    The log shows PHP-FPM being restarted at 09:18:43, followed by extension stripping and then completion of the upgrade. The previous PHP-FPM master process subsequently crashed with a segmentation fault (SIGSEGV, exit status 11) during shutdown at 09:19:02.

    The core dump backtrace shows the crash occurring during PHP module shutdown:
    Code (Text):
    #2 zend_hash_graceful_reverse_destroy()
    #4 php_module_shutdown()
    Could restarting PHP-FPM before stripping the extension binaries explain the issue? Should there be another restart after strip_php_extensions, or is this shutdown crash likely a separate problem?

    I'm running Centmin Mod 140.00beta01.b443 and PHP 8.3.36, compiled with PGO.

    I can provide the relevant upgrade log and full backtrace if useful.


    Thanks.
     
    Last edited: Oct 29, 2026 at 8:24 PM
  2. iaTa

    iaTa Member

    105
    18
    18
    Mar 26, 2018
    Ratings:
    +38
    Local Time:
    7:06 AM
    Nginx 1.31.x
    MariaDB 10.11.x
    With a lot of help from AI I investigated the core dump further and found that the crash occurs in module_destructor() when PHP attempts to call an invalid post_deactivate_func pointer (0x88b) in mcrypt_module_entry.

    The relevant details are:
    • PHP-FPM crashed with SIGSEGV during module shutdown.
    • The module entry was identified as mcrypt_module_entry in mcrypt.so.
    • The invalid callback value 0x88b also appears as a relocation addend in the extension's ELF relocation table.
    • The installed mcrypt.so differs from the original build artifact, although its runtime relocation entries appear unchanged.
    • Mcrypt 1.0.9 loads successfully in a fresh PHP CLI process.
    I haven't established why the callback contains this invalid value or whether the crash is directly responsible for PHP-FPM becoming unavailable after recompilation.

    Does this point to a possible issue with the mcrypt extension or the PHP-FPM shutdown/restart sequence? Could stripping the extensions while PHP-FPM is running be relevant?
     
  3. eva2000

    eva2000 Administrator Staff Member

    60,175
    12,596
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,254
    Local Time:
    5:06 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Can we rule out PGO PHP issues first so comment out in persistent config file /etc/centminmod/custom_config.inc
    Code (Text):
    #PHP_PGO='y'
    #PHP_PGO_ALWAYS='y'
    

    run cmupdate and then run centmin.sh menu option 5 to recompile PHP 8.3.36 and see if you still get same issues