[php-src] Issue #9795: Segfault zend_mm_alloc_small

From: Date: Fri, 21 Oct 2022 08:46:24 +0000
Subject: [php-src] Issue #9795: Segfault zend_mm_alloc_small
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-242652@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/9795 Author: marinovgit ### Description It is a PHP application working on Nginx with php-fpm. There is no problem with it on PHP 7.4. The segfault happens on many different URLs and pages but it is always on the same spot: ``` #0 zend_mm_alloc_small (bin_num=3, heap=0x7f1020200040) at /usr/src/debug/php-8.1.11-1.el8.remi.x86_64/Zend/zend_alloc.c:1256 #1 zend_mm_alloc_heap (size=<optimized out>, heap=0x7f1020200040) at /usr/src/debug/php-8.1.11-1.el8.remi.x86_64/Zend/zend_alloc.c:1327 #2 _emalloc (size=<optimized out>) at /usr/src/debug/php-8.1.11-1.el8.remi.x86_64/Zend/zend_alloc.c:2541 #3 0x00005557857cc4fb in zend_string_alloc (persistent=false, len=4) at /usr/src/debug/php-8.1.11-1.el8.remi.x86_64/Zend/zend_string.h:172 #4 zend_string_init (persistent=false, len=4, str=0x7f0ff886bcf0 "this->id],\n\t\t\t\t\t\t['NOT', ['status' => [BoardingApplication::STATUS_APPROVED, BoardingApplication::STATUS_DECLINED, BoardingApplication::STATUS_CANCELLED]]]\n\t\t\t\t\t])->all();\n\t\t\t\t\tforeach($boardingApplic"...) at /usr/src/debug/php-8.1.11-1.el8.remi.x86_64/Zend/zend_string.h:172 #5 lex_scan (zendlval=zendlval@entry=0x7ffd62bb2240, elem=0x7ffd62bb22d8) at /usr/src/debug/php-8.1.11-1.el8.remi.x86_64/Zend/zend_language_scanner.c:9848 #6 0x00005557857e2bce in zendlex (elem=elem@entry=0x7ffd62bb22d8) at /usr/src/debug/php-8.1.11-1.el8.remi.x86_64/Zend/zend_compile.c:1832 #7 0x00005557857c400f in zendparse () at /usr/src/debug/php-8.1.11-1.el8.remi.x86_64/Zend/zend_language_parser.c:4723 #8 0x00005557857c6c44 in zend_compile (type=type@entry=2) at /usr/src/debug/php-8.1.11-1.el8.remi.x86_64/Zend/zend_language_scanner.c:601 #9 0x00005557857c85ea in compile_file (file_handle=0x7ffd62bb2f50, type=2) at /usr/src/debug/php-8.1.11-1.el8.remi.x86_64/Zend/zend_language_scanner.c:656 #10 0x00007f1004e2c6b6 in phar_compile_file () from /usr/lib64/php/modules/phar.so #11 0x00005557857c864c in compile_filename (type=type@entry=2, filename=filename@entry=0x7f0ff89edec0) at /usr/src/debug/php-8.1.11-1.el8.remi.x86_64/Zend/zend_language_scanner.c:707 #12 0x0000555785836fb0 in zend_include_or_eval (inc_filename_zv=<optimized out>, type=2) at /usr/src/debug/php-8.1.11-1.el8.remi.x86_64/Zend/zend_execute.c:4623 #13 0x000055578584589e in ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER () at /usr/src/debug/php-8.1.11-1.el8.remi.x86_64/Zend/zend_vm_execute.h:38718 #14 0x000055578586c31f in execute_ex (ex=0x480b50) at /usr/src/debug/php-8.1.11-1.el8.remi.x86_64/Zend/zend_vm_execute.h:59132 #15 0x00005557857f666e in zend_call_function (fci=<optimized out>, fci_cache=<optimized out>) at /usr/src/debug/php-8.1.11-1.el8.remi.x86_64/Zend/zend_execute_API.c:908 #16 0x00005557857f699d in zend_call_known_function (fn=0x7f10202bfc40, object=<optimized out>, called_scope=<optimized out>, retval_ptr=retval_ptr@entry=0x0, param_count=param_count@entry=1, params=params@entry=0x7ffd62bb32e0, named_params=0x0) at /usr/src/debug/php-8.1.11-1.el8.remi.x86_64/Zend/zend_execute_API.c:997 #17 0x00005557856faffe in spl_perform_autoload (class_name=0x7f10202ac618, lc_name=0x7f0ff8a0bac8) at /usr/src/debug/php-8.1.11-1.el8.remi.x86_64/ext/spl/php_spl.c:433 #18 0x00005557857f5896 in zend_lookup_class_ex (name=name@entry=0x7f10202ac618, key=key@entry=0x0, flags=flags@entry=512) at /usr/src/debug/php-8.1.11-1.el8.remi.x86_64/Zend/zend_execute_API.c:1141 #19 0x00005557857f6b5f in zend_fetch_class (class_name=0x7f10202ac618, fetch_type=512) at /usr/src/debug/php-8.1.11-1.el8.remi.x86_64/Zend/zend_execute_API.c:1557 #20 0x00005557858223ce in ZEND_FETCH_CLASS_SPEC_UNUSED_CV_HANDLER () at /usr/src/debug/php-8.1.11-1.el8.remi.x86_64/Zend/zend_vm_execute.h:37286 ``` PHP modules: ``` [PHP Modules] bcmath bz2 calendar Core ctype curl date dom exif fileinfo filter ftp gd geoip gettext hash iconv imagick imap intl json libxml mbstring mcrypt mongodb mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql pdo_sqlite Phar posix readline Reflection session shmop SimpleXML soap sockets sodium SPL sqlite3 standard sysvmsg sysvsem sysvshm tidy tokenizer xml xmlreader xmlrpc xmlwriter xsl zip zlib [Zend Modules] ``` PHP-FPM ``` [21-Oct-2022 08:34:20] WARNING: [pool test] child 259987 exited on signal 11 (SIGSEGV - core dumped) after 1202.577358 seconds from start ``` If anyone can direct me where the problem could be. Thanks ### PHP Version PHP 8.1.11 ### Operating System Rocky Linux release 8.6

« previous php.bugs (#242652) next »