Bug #72147 [NEW]: Segmentation fault in /lib/x86_64-linux-gnu/libpcre.so.3 called by php_free_pcr
| From: | tom60 at op dot pl | Date: | Tue, 03 May 2016 21:38:32 +0000 |
| Subject: | Bug #72147 [NEW]: Segmentation fault in /lib/x86_64-linux-gnu/libpcre.so.3 called by php_free_pcr | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-200882@lists.php.net to get a copy of this message | ||
From: tom60 at op dot pl
Operating system: Debian Jessie 64 bit
PHP version: 7.0.6
Package: Reproducible crash
Bug Type: Bug
Bug description:Segmentation fault in /lib/x86_64-linux-gnu/libpcre.so.3 called by php_free_pcr
Description:
------------
PHP 7.0.6 compiled with libpcre3:amd64 2:8.35-3.3+deb8u4 on Debian
Jessie crashes from time to time. For us it occurs mostly when we deploy
new PHP code to a webserver. During the deploy we call opcache_reset().
PHP 5.6.21 on the same server with the same libraries is rock-solid.
That's why I think it might be the issue with the way PHP 7 uses the
PCRE library.
I've attached a backtrace from GDB. Please let me know if I should
supply any more details.
Actual result:
--------------
Reading symbols from /opt/apache2/sbin/apache2...done.
[New LWP 22823]
[Thread debugging using libthread_db enabled]
Using host libthread_db library
"/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/opt/apache2/sbin/apache2 -k start'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f62bd412ae5 in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3
(gdb) bt
#0 0x00007f62bd412ae5 in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3
#1 0x00007f62bd438508 in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3
#2 0x00007f62bd43a13c in pcre_free_study () from
/lib/x86_64-linux-gnu/libpcre.so.3
#3 0x00007f62bb2a4863 in php_free_pcre_cache (data=<optimized out>) at
/src/php-7.0.6/ext/pcre/php_pcre.c:113
#4 0x00007f62bb5e6534 in zend_hash_destroy (ht=0x7f62bbf3b940
<pcre_globals>) at /src/php-7.0.6/Zend/zend_hash.c:1284
#5 0x00007f62bb2a47e9 in zm_globals_dtor_pcre (pcre_globals=<optimized
out>) at /src/php-7.0.6/ext/pcre/php_pcre.c:136
#6 0x00007f62bb5dc579 in module_destructor
(module=module@entry=0x7f62bf28c3e0) at
/src/php-7.0.6/Zend/zend_API.c:2516
#7 0x00007f62bb5d501c in module_destructor_zval (zv=<optimized out>) at
/src/php-7.0.6/Zend/zend.c:615
#8 0x00007f62bb5e7049 in _zend_hash_del_el_ex (prev=<optimized out>,
p=<optimized out>, idx=<optimized out>, ht=<optimized out>)
at /src/php-7.0.6/Zend/zend_hash.c:1026
#9 _zend_hash_del_el (p=0x7f62bf2a4780, idx=4, ht=0x7f62bbf42840
<module_registry>) at /src/php-7.0.6/Zend/zend_hash.c:1050
#10 zend_hash_graceful_reverse_destroy (ht=ht@entry=0x7f62bbf42840
<module_registry>) at /src/php-7.0.6/Zend/zend_hash.c:1502
#11 0x00007f62bb5daa3c in zend_destroy_modules () at
/src/php-7.0.6/Zend/zend_API.c:1984
#12 0x00007f62bb5d5fd5 in zend_shutdown () at
/src/php-7.0.6/Zend/zend.c:840
#13 0x00007f62bb57a35b in php_module_shutdown () at
/src/php-7.0.6/main/main.c:2362
#14 0x00007f62bb57a419 in php_module_shutdown_wrapper
(sapi_globals=<optimized out>) at /src/php-7.0.6/main/main.c:2330
#15 0x00007f62bb667861 in php_apache_child_shutdown (tmp=<optimized
out>) at /src/php-7.0.6/sapi/apache2handler/sapi_apache2.c:399
#16 0x00007f62bcb6bfae in run_cleanups (cref=<optimized out>) at
memory/unix/apr_pools.c:2352
#17 apr_pool_destroy (pool=0x7f62bf3df8d8) at
memory/unix/apr_pools.c:814
#18 0x00007f62bdfa37be in clean_child_exit (code=0) at prefork.c:227
#19 0x00007f62bdfa3ca8 in child_main (child_num_arg=-1110591680,
child_bucket=1189753504) at prefork.c:744
#20 0x00007f62bdfa4050 in make_child (s=0x7f62bf1349a8, slot=45,
bucket=0) at prefork.c:824
#21 0x00007f62bdfa4ea5 in perform_idle_server_maintenance (p=<optimized
out>) at prefork.c:932
#22 prefork_run (_pconf=0x7f62bdcdb740, plog=0x7ffc46ea3390,
s=0x7ffc46ea3350) at prefork.c:1128
#23 0x00007f62bdf2489e in ap_run_mpm (pconf=0x7f62bf101138,
plog=0x7f62bf13a818, s=0x7f62bf1349a8) at mpm_common.c:94
#24 0x00007f62bdf1de15 in main (argc=3, argv=0x7ffc46ea3628) at
main.c:778
--
Edit bug report at https://bugs.php.net/bug.php?id=72147&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72147&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72147&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72147&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=72147&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=72147&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=72147&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=72147&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=72147&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=72147&r=support
Expected behavior: https://bugs.php.net/fix.php?id=72147&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=72147&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=72147&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=72147&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72147&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=72147&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=72147&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=72147&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72147&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=72147&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=72147&r=mysqlcfg