Description
Description
After upgrading php version from 8.3.19 to 8.3.21, I am encountering a segmentation fault when running a Magento 2.4.7 cron job using PHP 8.3.21 (web server using Plesk, Rocky Linux 8.10). The issue appears to be related to the mysqlnd or pdo_mysql extensions. The segmentation fault occurs at _emalloc and seems to be triggered by intense database operations.
Environment
- OS: Rocky Linux 8.10 (Plesk-managed)
- PHP version: 8.3.21
- mysql -V: "mysql Ver 15.1 Distrib 10.6.22-MariaDB, for Linux (x86_64) using readline 5.1"
- Magento: 2.4.7-p3
- Extensions: See below (php -m output)
- All extensions are from the official Plesk PHP 8.3 distribution.
Steps to Reproduce
Run the Magento cron job via CLI to display errors:
/opt/plesk/php/8.3/bin/php -d display_errors=On -d error_reporting=E_ALL /var/www/vhosts/whateverhost.com/httpdocs/bin/magento cron:run --group=aquasync_catalog --bootstrap=standaloneProcessStarted=1
Observe a segmentation fault (core dumped).
GDB Output
Program received signal SIGSEGV, Segmentation fault.
0x00000000006c0ff5 in _emalloc ()
#0 0x00000000006c0ff5 in _emalloc ()
#1 0x00007fffe5cc9ddd in ?? () from /opt/plesk/php/8.3/lib64/php/modules/mysqlnd.so
#2 0x00007fffe5ccf866 in ?? () from /opt/plesk/php/8.3/lib64/php/modules/mysqlnd.so
#3 0x00007fffd1881cb2 in ?? () from /opt/plesk/php/8.3/lib64/php/modules/pdo_mysql.so
#4 0x00007fffd1a97004 in ?? () from /opt/plesk/php/8.3/lib64/php/modules/pdo.so
#5 0x00007fffd1a973f0 in ?? () from /opt/plesk/php/8.3/lib64/php/modules/pdo.so
#6 0x00007fffd1a99c25 in ?? () from /opt/plesk/php/8.3/lib64/php/modules/pdo.so
#7 0x0000000000465c7d in ?? ()
...
PHP Extensions (php -m):
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
enchant
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imagick
imap
intl
json
ldap
libxml
mbstring
mysqli
mysqlnd
odbc
openssl
pcntl
pcre
PDO
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
pdo_sqlsrv
pgsql
Phar
posix
pspell
random
readline
redis
Reflection
session
SimpleXML
soap
sockets
sodium
SPL
sqlite3
sqlsrv
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
xdebug
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib
[Zend Modules]
Xdebug
Zend OPcache
Expected Behavior
No segmentation fault; cron job should complete as it was doing with php 8.3.19
Actual Behavior
Segmentation fault occurs.
PHP Version
PHP 8.3.21 (cli) (built: May 12 2025 06:08:50) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.21, Copyright (c) Zend Technologies
with Zend OPcache v8.3.21, Copyright (c), by Zend Technologies
with Xdebug v3.4.2, Copyright (c) 2002-2025, by Derick Rethans
Operating System
Rocky Linux 8.10