Bug #69484 [NEW]: zend_mm_heap corrupted on some pages when opcache is enabled
| From: | berdir@php.net | Date: | Sun, 19 Apr 2015 21:50:42 +0000 |
| Subject: | Bug #69484 [NEW]: zend_mm_heap corrupted on some pages when opcache is enabled | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-192210@lists.php.net to get a copy of this message | ||
From: berdir
Operating system: Linux
PHP version: master-Git-2015-04-19 (Git)
Package: opcache
Bug Type: Bug
Bug description:zend_mm_heap corrupted on some pages when opcache is enabled
Description:
------------
This is part of our efforts to get Drupal 8 green on PHP 7, see
https://www.drupal.org/node/2454439.
Since https://bugs.php.net/bug.php?id=69464 was
fixed, or maybe already
before that but I couldn't get it running well enough to reproduce, I
get zend_mm_heap corrupted errors on certain pages, only when opcache is
enabled. As mentioned, I don't know exactly when it started, but this
worked 1-2 weeks ago.
I've reproduced on two different systems. To reproduce:
1. Get drupal from http://git.drupal.org/project/drupal.got,
branch
8.0.x.
2. Install in the UI or with drush si standard
--db-url=mysql://user:pass@localhost/db (from
https://github.com/drush-ops/drush)
3. Enable aggregator module, with drush en -y aggregator or in the UI on
/admin/modules.
4. Go to aggregator/sources/add. When opcache.so is enabled, I get those
errors in apache error log and no response, it seems to be working
pretty OK when opcache is disabled.
I also got the following segfault when running the test
"Drupal\aggregator\Tests\AddFeedTest", even when opache is disabled, I
don't know if it is related or not:
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007fd27390f294 in zend_array_dup (source=0x7fd269e5d738) at
/home/berdir/tools/php-src/Zend/zend_hash.c:1597
1597 ZVAL_COPY(&q->val, data);
(gdb) bt
#0 0x00007fd27390f294 in zend_array_dup (source=0x7fd269e5d738) at
/home/berdir/tools/php-src/Zend/zend_hash.c:1597
#1 0x00007fd2738fb2a9 in zend_error (type=8, format=0x7fd273e5e986
"Undefined variable: %s") at
/home/berdir/tools/php-src/Zend/zend.c:1220
#2 0x00007fd273989ca3 in _get_zval_cv_lookup_BP_VAR_R (ptr=<optimized
out>, execute_data=<optimized out>, var=<optimized out>) at
/home/berdir/tools/php-src/Zend/zend_execute.c:250
#3 _get_zval_ptr_cv_BP_VAR_R (var=<optimized out>,
execute_data=<optimized out>) at
/home/berdir/tools/php-src/Zend/zend_execute.c:308
#4 ZEND_INIT_METHOD_CALL_SPEC_CV_CONST_HANDLER () at
/home/berdir/tools/php-src/Zend/zend_vm_execute.h:31213
#5 0x00007fd27393b83b in execute_ex (ex=<optimized out>) at
/home/berdir/tools/php-src/Zend/zend_vm_execute.h:394
#6 0x00007fd2738ec79e in zend_call_function
(fci=fci@entry=0x7ffe0fb85ae0, fci_cache=<optimized out>,
fci_cache@entry=0x7ffe0fb85ab0)
at /home/berdir/tools/php-src/Zend/zend_execute_API.c:846
#7 0x00007fd27381bd91 in zif_call_user_func_array
(execute_data=0x7fd269e13520, return_value=0x7fd269e13510) at
/home/berdir/tools/php-src/ext/standard/basic_functions.c:4788
#8 0x00007fd273990aad in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER () at
/home/berdir/tools/php-src/Zend/zend_vm_execute.h:693
#9 0x00007fd27393b83b in execute_ex (ex=<optimized out>) at
/home/berdir/tools/php-src/Zend/zend_vm_execute.h:394
#10 0x00007fd2738ec79e in zend_call_function
(fci=fci@entry=0x7ffe0fb85d20, fci_cache=<optimized out>,
fci_cache@entry=0x7ffe0fb85cf0)
at /home/berdir/tools/php-src/Zend/zend_execute_API.c:846
#11 0x00007fd27381bd91 in zif_call_user_func_array
(execute_data=0x7fd269e12150, return_value=0x7fd269e11fe0) at
/home/berdir/tools/php-src/ext/standard/basic_functions.c:4788
#12 0x00007fd273990aad in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER () at
/home/berdir/tools/php-src/Zend/zend_vm_execute.h:693
#13 0x00007fd27393b83b in execute_ex (ex=<optimized out>) at
/home/berdir/tools/php-src/Zend/zend_vm_execute.h:394
#14 0x00007fd2738fbb65 in zend_execute_scripts (type=8,
retval=0x7fd200001c07, retval@entry=0x0, file_count=3) at
/home/berdir/tools/php-src/Zend/zend.c:1392
#15 0x00007fd27389e650 in php_execute_script
(primary_file=primary_file@entry=0x7ffe0fb88250) at
/home/berdir/tools/php-src/main/main.c:2468
#16 0x00007fd27399571a in php_handler (r=<optimized out>) at
/home/berdir/tools/php-src/sapi/apache2handler/sapi_apache2.c:673
This can be reproduced by running 'php7 core/scripts/run-tests.sh --url
http://d8/ --verbose --color --class
"Drupal\aggregator\Tests\AddFeedTest"' after enabling the simpletest
module
--
Edit bug report at https://bugs.php.net/bug.php?id=69484&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69484&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69484&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69484&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69484&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69484&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69484&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69484&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69484&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69484&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69484&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69484&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69484&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69484&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69484&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69484&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69484&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69484&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69484&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69484&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69484&r=mysqlcfg