Skip to content

php-fpm 8.4 crashing if newrelic-daemon is running with ioncube encoded files #1102

@boyinthefog

Description

@boyinthefog

Description

When OPcache is enabled and either NewRelic or the zend_test extensions are active, we're seeing a segmentation fault on php files encoded with Ioncube encoder (v13)

Core dump debugging

`
PID: 1353160 (php-fpm8.4)
UID: 1001 (www)
GID: 1001 (www)
Signal: 11 (SEGV)
Timestamp: Mon 2025-07-14 10:22:54 CEST (7min ago)
Command Line: $'php-fpm: pool www-4'
Executable: /usr/sbin/php-fpm8.4
Control Group: /system.slice/php8.4-fpm.service
Unit: php8.4-fpm.service
Slice: system.slice
Boot ID: bea3d0db1016408796f2f0fce1e6c695
Machine ID: 7412f066469c4acb9c386aa7f51c7062
Storage: /var/lib/systemd/coredump/core.php-fpm8\x2e4.1001.bea3d0db1016408796f2f0fce1e6c695.1353160.1752481374000000.zst (present)
Size on Disk: 3.3M
Message: Process 1353160 (php-fpm8.4) of user 1001 dumped core.

            Module libnss_systemd.so.2 from deb systemd-252.38-1~deb12u1.amd64
            Module libsystemd.so.0 from deb systemd-252.38-1~deb12u1.amd64
            Stack trace of thread 1353160:
            #0  0x0000560ade973a89 zend_observer_fcall_begin_prechecked (php-fpm8.4 + 0x3eda89)
            #1  0x0000560ade8fd34e n/a (php-fpm8.4 + 0x37734e)
            #2  0x0000560ade9296b5 execute_ex (php-fpm8.4 + 0x3a36b5)
            #3  0x00007fe4b9af872d n/a (ioncube_loader_lin_8.4.so + 0xf872d)
            #4  0x00007fe4b9afadcf n/a (ioncube_loader_lin_8.4.so + 0xfadcf)
            #5  0x0000560ade6a3bc4 n/a (php-fpm8.4 + 0x11dbc4)
            #6  0x0000560ade6a4630 n/a (php-fpm8.4 + 0x11e630)
            #7  0x00007fe4b9af872d n/a (ioncube_loader_lin_8.4.so + 0xf872d)
            #8  0x00007fe4b9afadcf n/a (ioncube_loader_lin_8.4.so + 0xfadcf)
            #9  0x0000560ade8d81ba zend_call_function (php-fpm8.4 + 0x3521ba)
            #10 0x0000560ade8d85dd zend_call_known_function (php-fpm8.4 + 0x3525dd)
            #11 0x0000560ade774516 n/a (php-fpm8.4 + 0x1ee516)
            #12 0x0000560ade8d73fe zend_lookup_class_ex (php-fpm8.4 + 0x3513fe)
            #13 0x0000560ade8d89e0 zend_fetch_class_by_name (php-fpm8.4 + 0x3529e0)
            #14 0x0000560ade902037 n/a (php-fpm8.4 + 0x37c037)
            #15 0x0000560ade929705 execute_ex (php-fpm8.4 + 0x3a3705)
            #16 0x00007fe4b9af872d n/a (ioncube_loader_lin_8.4.so + 0xf872d)
            #17 0x00007fe4b9afadcf n/a (ioncube_loader_lin_8.4.so + 0xfadcf)
            #18 0x0000560ade8fd5ac n/a (php-fpm8.4 + 0x3775ac)
            #19 0x0000560ade9296b5 execute_ex (php-fpm8.4 + 0x3a36b5)
            #20 0x00007fe4b9af872d n/a (ioncube_loader_lin_8.4.so + 0xf872d)
            #21 0x00007fe4b9afadcf n/a (ioncube_loader_lin_8.4.so + 0xfadcf)
            #22 0x0000560ade927ae5 zend_execute (php-fpm8.4 + 0x3a1ae5)
            #23 0x0000560ade98fa10 zend_execute_script (php-fpm8.4 + 0x409a10)
            #24 0x0000560ade82a5b5 php_execute_script_ex (php-fpm8.4 + 0x2a45b5)
            #25 0x0000560ade6ab96a n/a (php-fpm8.4 + 0x12596a)
            #26 0x00007fe4bcb1a24a n/a (libc.so.6 + 0x2724a)
            #27 0x00007fe4bcb1a305 __libc_start_main (libc.so.6 + 0x27305)
            #28 0x0000560ade6ad941 _start (php-fpm8.4 + 0x127941)
            ELF object binary architecture: AMD x86-64

GNU gdb (Debian 13.1-3) 13.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
https://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/php-fpm8.4...
(No debugging symbols found in /usr/sbin/php-fpm8.4)

warning: Can't open file /dev/zero (deleted) during file-backed mapping note processing
[New LWP 1353160]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by php-fpm: pool www-4 '. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x0000560ade973a89 in zend_observer_fcall_begin_prechecked () (gdb)

PHP Version

PHP 8.4.8 (cli) (built: Jun 9 2025 13:42:27) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.4.8, Copyright (c) Zend Technologies
with the ionCube PHP Loader v14.4.1, Copyright (c) 2002-2025, by ionCube Ltd.
with Zend OPcache v8.4.8, Copyright (c), by Zend Technologies

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions