Bug #75886 [NEW]: opcache-xdebug crash on script restart
From: john-stevenson at blueyonder dot co dot uk
Operating system: Windows 10
PHP version: Irrelevant
Package: Reproducible crash
Bug Type: Bug
Bug description:opcache-xdebug crash on script restart
Description:
------------
When a cli script (with opcache and xdebug loaded, and
opcache.enable_cli=1) is restarted without xdebug, the restarted process
crashes (but only on Windows).
First reported in Composer:
https://github.com/composer/composer/issues/6052
Fixed in user-land by setting opcache.enable_cli=0 for the new process
Reported to Xdebug: https://bugs.xdebug.org/view.php?id=1393
Note that if the process is restarted WITH xdebug loaded there is no
crash.
Test script:
---------------
Enable opcache and xdebug extensions. Set opcache.enable_cli=1
Download: https://getcomposer.org/download/1.3.1/composer.phar
Run: php.exe comoser.phar --version
OR use this simple restart.php script:
https://gist.github.com/johnstevenson/12348144c498e9545cd73ea01435c904
Run: php.exe restart.php (crashes)
Run: php.exe restart.php --fix (okay)
Run: php.exe restart.php --keep-xdebug (okay)
Actual result:
--------------
From PHP-7.2.1
Unhandled exception at 0x00007FFF817C0D8F (ntdll.dll) in php.exe:
RangeChecks instrumentation code detected an out of range array access.
occurred
ntdll.dll!LdrpICallHandler() Unknown Non-user code.
ntdll.dll!RtlpExecuteHandlerForException() Unknown Non-user code.
ntdll.dll!RtlDispatchException() Unknown Non-user code.
ntdll.dll!KiUserExceptionDispatch() Unknown Non-user code.
ntdll.dll!LdrpValidateUserCallTarget() Unknown Non-user code.
php7ts.dll!ZEND_USER_OPCODE_SPEC_HANDLER(_zend_execute_data *
execute_data) Line 1813
php7ts.dll!execute_ex(_zend_execute_data * ex) Line 59726
php7ts.dll!zend_execute(_zend_op_array * op_array, _zval_struct *
return_value) Line 63764
php7ts.dll!zend_execute_scripts(int type, _zval_struct * retval, int
file_count, ...) Line 1497
php7ts.dll!php_execute_script(_zend_file_handle * primary_file) Line
2590
php.exe!do_cli(int argc, char * * argv) Line 1012
php.exe!main(int argc, char * * argv) Line 1404
--
Edit bug report at https://bugs.php.net/bug.php?id=75886&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75886&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75886&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75886&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75886&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75886&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75886&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75886&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75886&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75886&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75886&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75886&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75886&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75886&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75886&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75886&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75886&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75886&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75886&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75886&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75886&r=mysqlcfg
Thread (6 messages)
- john-stevenson at blueyonder dot co dot uk