php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78317 Segmentation fault at /usr/src/debug/php-7.2.20/Zend/zend_string.h:289
Submitted: 2019-07-21 11:15 UTC Modified: 2019-08-04 04:22 UTC
From: makhomed at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: PCRE related
PHP Version: 7.2.20 OS: CentOS 7.6
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2019-07-21 11:15 UTC] makhomed at gmail dot com
Description:
------------
# php -v
PHP 7.2.20 (cli) (built: Jul  2 2019 13:37:16) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.20, Copyright (c) 1999-2018, by Zend Technologies



Actual result:
--------------
# gdb /usr/sbin/php-fpm coredump.php-fpm.28072.1563540651
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-114.el7
Copyright (C) 2013 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-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/sbin/php-fpm...Reading symbols from /usr/lib/debug/usr/sbin/php-fpm.debug...done.
done.
[New LWP 28072]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `php-fpm: pool forum            '.
Program terminated with signal 11, Segmentation fault.
#0  zend_string_release (s=0x7f5aee2d2c08) at /usr/src/debug/php-7.2.20/Zend/zend_string.h:289
289             if (!ZSTR_IS_INTERNED(s)) {
Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.6-13.el7.x86_64 elfutils-libelf-0.172-2.el7.x86_64 elfutils-libs-0.172-2.el7.x86_64 glib2-2.56.1-4.el7_6.x86_64 glibc-2.17-260.el7_6.6.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.15.1-37.el7_6.x86_64 libacl-2.2.51-14.el7.x86_64 libargon2-20161029-3.el7.x86_64 libattr-2.4.46-13.el7.x86_64 libcap-2.22-9.el7.x86_64 libcom_err-1.42.9-13.el7.x86_64 libgcc-4.8.5-36.el7_6.2.x86_64 libgcrypt-1.5.3-14.el7.x86_64 libgpg-error-1.12-3.el7.x86_64 libselinux-2.5-14.1.el7.x86_64 libstdc++-4.8.5-36.el7_6.2.x86_64 libxml2-2.9.1-6.el7_2.3.x86_64 lz4-1.7.5-2.el7.x86_64 nss-softokn-freebl-3.36.0-5.el7_5.x86_64 openssl-libs-1.0.2k-16.el7_6.1.x86_64 pcre-8.32-17.el7.x86_64 systemd-libs-219-62.el7_6.7.x86_64 xz-libs-5.2.2-1.el7.x86_64 zlib-1.2.7-18.el7.x86_64
(gdb) bt
#0  zend_string_release (s=0x7f5aee2d2c08) at /usr/src/debug/php-7.2.20/Zend/zend_string.h:289
#1  zend_hash_destroy (ht=0x55ea5a0b5d20 <pcre_globals>) at /usr/src/debug/php-7.2.20/Zend/zend_hash.c:1257
#2  0x000055ea59b139d9 in zm_globals_dtor_pcre (pcre_globals=<optimized out>) at /usr/src/debug/php-7.2.20/ext/pcre/php_pcre.c:146
#3  0x000055ea59c7d17d in module_destructor (module=module@entry=0x55ea5a9e9850) at /usr/src/debug/php-7.2.20/Zend/zend_API.c:2575
#4  0x000055ea59c7530c in module_destructor_zval (zv=<optimized out>) at /usr/src/debug/php-7.2.20/Zend/zend.c:690
#5  0x000055ea59c88a91 in _zend_hash_del_el_ex (prev=<optimized out>, p=<optimized out>, idx=<optimized out>, ht=<optimized out>) at /usr/src/debug/php-7.2.20/Zend/zend_hash.c:998
#6  _zend_hash_del_el (p=0x55ea5aa4a740, idx=4, ht=0x55ea5a0b9b60 <module_registry>) at /usr/src/debug/php-7.2.20/Zend/zend_hash.c:1021
#7  zend_hash_graceful_reverse_destroy (ht=ht@entry=0x55ea5a0b9b60 <module_registry>) at /usr/src/debug/php-7.2.20/Zend/zend_hash.c:1477
#8  0x000055ea59c7b36c in zend_destroy_modules () at /usr/src/debug/php-7.2.20/Zend/zend_API.c:2008
#9  0x000055ea59c760be in zend_shutdown () at /usr/src/debug/php-7.2.20/Zend/zend.c:905
#10 0x000055ea59c10adb in php_module_shutdown () at /usr/src/debug/php-7.2.20/main/main.c:2453
#11 0x000055ea59a84b31 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/php-7.2.20/sapi/fpm/fpm/fpm_main.c:2043
(gdb)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-07-21 11:23 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2019-07-21 11:23 UTC] requinix@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2019-07-21 11:38 UTC] makhomed at gmail dot com
-Status: Feedback +Status: Open
 [2019-07-21 11:38 UTC] makhomed at gmail dot com
Core was generated by `php-fpm: pool forum            '.

This is phpBB Forum Software package, it is longer than 10-20 lines.

I can provide for you any additional information from gdb/core file or I can upload for you this entire core file, 13967360 bytes in size.

I do not have a reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external resources such as databases, etc.
 [2019-07-21 11:44 UTC] requinix@php.net
-Package: Strings related +Package: PCRE related
 [2019-07-24 10:48 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2019-07-24 10:48 UTC] cmb@php.net
Does this segfault also happen with OPcache disabled?

If possible, please try with 7.2.21RC1 anyway.

[1] <https://www.php.net/ChangeLog-7.php#7.2.20>
 [2019-08-04 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 12:01:27 2024 UTC