php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77315 segfault when opcache enabled + extensions like phalcon 3.4
Submitted: 2018-12-18 08:21 UTC Modified: 2018-12-21 03:22 UTC
From: yejiangnan2012 at gmail dot com Assigned: laruence (profile)
Status: Closed Package: opcache
PHP Version: 7.2.13 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: yejiangnan2012 at gmail dot com
New email:
PHP Version: OS:

 

 [2018-12-18 08:21 UTC] yejiangnan2012 at gmail dot com
Description:
------------
I am getting the following segfaults in syslog:
when I start load phalcon extension with opcache,and it will be aborted (core dump) .But it will be work fined without opcache.

centos 6.10
kernel version 2.6.32-042stab123.9

```
[root@gdb-debug coredump]# /usr/local/php-7.2.13/bin/php -m
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
fileinfo
filter
gd
hash
iconv
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
phalcon
phpdbg_webhelper
posix
Reflection
session
SimpleXML
soap
sockets
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

php: /root/php-7.2.13/ext/opcache/ZendAccelerator.c:637: accel_replace_string_by_process_permanent: Assertion `0' failed.
Aborted (core dumped)
```

gdb backtrace:

```
(gdb) source /root/php-7.2.13/.gdbinit 
(gdb) zbacktrace
(gdb) bt
#0  0x00007fbd932c34f5 in raise () from /lib64/libc.so.6
#1  0x00007fbd932c4cd5 in abort () from /lib64/libc.so.6
#2  0x00007fbd932bc66e in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007fbd932bc730 in __assert_fail () from /lib64/libc.so.6
#4  0x00007fbd90151bcd in accel_replace_string_by_process_permanent (str=0x7fbd882dc650) at /root/php-7.2.13/ext/opcache/ZendAccelerator.c:637
#5  0x00007fbd90151896 in accel_copy_permanent_strings (new_interned_string=0x7fbd90151b79 <accel_replace_string_by_process_permanent>) at /root/php-7.2.13/ext/opcache/ZendAccelerator.c:580
#6  0x00007fbd90151cb2 in accel_use_permanent_interned_strings () at /root/php-7.2.13/ext/opcache/ZendAccelerator.c:665
#7  0x00007fbd90157400 in accel_shutdown () at /root/php-7.2.13/ext/opcache/ZendAccelerator.c:2797
#8  0x00007fbd90159b4d in zm_shutdown_zend_accelerator (type=1, module_number=42) at /root/php-7.2.13/ext/opcache/zend_accelerator_module.c:434
#9  0x0000000000aaca9d in module_destructor (module=0x360e7f0) at /root/php-7.2.13/Zend/zend_API.c:2564
#10 0x0000000000aa0845 in module_destructor_zval (zv=0x7ffd6cf77150) at /root/php-7.2.13/Zend/zend.c:690
#11 0x0000000000ab70e0 in _zend_hash_del_el_ex (ht=0x1725780, idx=41, p=0x32a68f0, prev=0x0) at /root/php-7.2.13/Zend/zend_hash.c:998
#12 0x0000000000ab71ae in _zend_hash_del_el (ht=0x1725780, idx=41, p=0x32a68f0) at /root/php-7.2.13/Zend/zend_hash.c:1021
#13 0x0000000000ab8733 in zend_hash_graceful_reverse_destroy (ht=0x1725780) at /root/php-7.2.13/Zend/zend_hash.c:1477
#14 0x0000000000aaa784 in zend_destroy_modules () at /root/php-7.2.13/Zend/zend_API.c:2008
#15 0x0000000000aa0d4c in zend_shutdown () at /root/php-7.2.13/Zend/zend.c:905
#16 0x0000000000a0b111 in php_module_shutdown () at /root/php-7.2.13/main/main.c:2453
#17 0x0000000000b9e772 in main (argc=2, argv=0x329ee70) at /root/php-7.2.13/sapi/cli/php_cli.c:1418
```


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-12-21 03:22 UTC] laruence@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: laruence
 [2018-12-21 03:22 UTC] laruence@php.net
please report to phalcon team instead..
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 04:01:36 2025 UTC