Open mattijv opened 2 months ago
It appears this does not happen with PHP 8.2 or 8.3.
Same issue also with PHP 8.2 and 8.3. Disabling ionCube solves the issue.
PHP 8.2.23 (cli) (built: Aug 27 2024 15:32:20) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.2.23, Copyright (c) Zend Technologies
with the ionCube PHP Loader v13.3.1, Copyright (c) 2002-2024, by ionCube Ltd.
with Zend OPcache v8.2.23, Copyright (c), by Zend Technologies
with Xdebug v3.3.2, Copyright (c) 2002-2024, by Derick Rethans
PHP 8.3.11 (cli) (built: Aug 27 2024 19:16:34) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.3.11, Copyright (c) Zend Technologies
with the ionCube PHP Loader v13.3.1, Copyright (c) 2002-2024, by ionCube Ltd.
with Zend OPcache v8.3.11, Copyright (c), by Zend Technologies
with Xdebug v3.3.2, Copyright (c) 2002-2024, by Derick Rethans
@mattijv @CSalih What is your OS and Architecture (x64/aarch64)?
Interestingly, I'm not seeing this on Mac OS X 14.5 aarch64.
www-data@magento-multisite-php-debug:/var/www/html$ php test.php
Warning: Undefined array key 0 in /var/www/html/test.php on line 10
Fatal error: Uncaught Error: Call to a member function newInstance() on null in /var/www/html/test.php:10
Stack trace:
#0 {main}
thrown in /var/www/html/test.php on line 10
PHP 8.1.29 (cli) (built: Jun 5 2024 05:51:57) (NTS gcc aarch64)
Copyright (c) The PHP Group
Zend Engine v4.1.29, Copyright (c) Zend Technologies
with the ionCube PHP Loader v13.3.1, Copyright (c) 2002-2024, by ionCube Ltd.
with Zend OPcache v8.1.29, Copyright (c), by Zend Technologies
with Xdebug v3.3.2, Copyright (c) 2002-2024, by Derick Rethans
@navarr Ubuntu 24 and MacOS 15 both running on x64 architecture. Seems to be an x64 related issue?
x86_64
Ubuntu 24.04.1 LTS
@mattijv do you have the latest image? You may run warden env pull && warden env up
and it try again?
Edit: For PHP 8.2 and 8.3
Changed the PHP version in .env
to 8.2 and 8.3, and did warden env pull
between each test.
www-data@segfault-php-debug:/var/www/html$ php --version
PHP 8.2.23 (cli) (built: Aug 27 2024 15:32:20) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.2.23, Copyright (c) Zend Technologies
with the ionCube PHP Loader v13.3.1, Copyright (c) 2002-2024, by ionCube Ltd.
with Zend OPcache v8.2.23, Copyright (c), by Zend Technologies
with Xdebug v3.3.2, Copyright (c) 2002-2024, by Derick Rethans
www-data@segfault-php-debug:/var/www/html$ php test.php
[snip xdebug warning]
www-data@segfault-php-debug:/var/www/html$
www-data@segfault-php-debug:/var/www/html$ php --version
PHP 8.3.11 (cli) (built: Aug 27 2024 19:16:34) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.3.11, Copyright (c) Zend Technologies
with the ionCube PHP Loader v13.3.1, Copyright (c) 2002-2024, by ionCube Ltd.
with Zend OPcache v8.3.11, Copyright (c), by Zend Technologies
with Xdebug v3.3.2, Copyright (c) 2002-2024, by Derick Rethans
www-data@segfault-php-debug:/var/www/html$ php test.php
[snip xdebug warning]
www-data@segfault-php-debug:/var/www/html$
No errors (beside the xdebug warnings).
Went back to 8.1:
www-data@segfault-php-debug:/var/www/html$ php --version
PHP 8.1.29 (cli) (built: Jun 5 2024 05:51:57) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.1.29, Copyright (c) Zend Technologies
with the ionCube PHP Loader v13.3.1, Copyright (c) 2002-2024, by ionCube Ltd.
with Zend OPcache v8.1.29, Copyright (c), by Zend Technologies
with Xdebug v3.3.2, Copyright (c) 2002-2024, by Derick Rethans
www-data@segfault-php-debug:/var/www/html$ php test.php
[snip xdebug warning]
Segmentation fault (core dumped)
www-data@segfault-php-debug:/var/www/html$
Tested with
Steps to reproduce
warden env-init
, choosemagento2
as the type.symfony/console
withcomposer require symfony/console
.php test.php
.This should result in the following:
(Xdebug will complain about not being able to connect, but that does not affect the problem so I omitted it from the output.)
Test file to trigger the issue
Details
I faced this problem when running the Magento CLI command (
bin/magento
) and tracked down the problematic lines to\Symfony\Component\Console\Command\Command::getDefaultName
(when subclassed as\Symfony\Component\Console\Command\CompleteCommand
). The test file is a minimal sample that triggers the issue.Running the file with
gdb
reveals the following stack trace after triggering the segfault:The segmentation fault does not happen if I either
/etc/php.d/01-ioncube-loader.ini
.Thoughts
I'm guessing this is an issue with ionCube and not in the Warden images per se. However, since the images bundle the problematic version, and I can't quickly find an official way to disable it, I'm opening this issue here.