View Issue Details

IDProjectCategoryView StatusLast Update
0001393XdebugUncategorizedpublic2017-01-28 21:13
ReporterJohnStevenson Assigned Toderick  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionno change required 
PlatformWindowsOS10 
Product Version2.5.0 
Summary0001393: Segfault when Composer restarts without xdebug and opcache is enabled
Description

If xdebug if enabled, Composer restarts itself (via passthru) having commented out the zend_extension xdebug entry in the ini file. If opcache is enabled and opcache.enable_cli=1 then the restarted PHP process segfaults.

This does not happen on Linux platforms. On Windows it will not happen if opcache.enable_cli=0 (or either opcache or xdebug are not loaded).

This may or may not be an xdebug issue, but I thought I would ask here first before reporting it on the PHP bugtracker. Thanks.

Steps To Reproduce
  1. Download: https://getcomposer.org/download/1.3.1/composer.phar

  2. Config:
    zend_extension=php_opcache.dll
    opcache.enable_cli=1
    zend_extension=php_xdebug-2.5.0-7.1-vc14....dll

  3. Run:
    php.exe composer.phar --version

Additional Information

Backtrace:

ntdll.dll!@RtlFailFast2@8() Unknown
ntdll.dll!@RtlpHandleInvalidUserCallTarget@4() Unknown
ntdll.dll!RtlDispatchException() Unknown
ntdll.dll!_KiUserExceptionDispatcher@8() Unknown
ntdll.dll!_LdrpValidateUserCallTargetBitMapCheck@0() Unknown
php7ts.dll!execute_ex(_zend_execute_data ex) Line 432 C
php7ts.dll!zend_execute(_zend_op_array
op_array, _zval_struct return_value) Line 475 C
php7ts.dll!zend_execute_scripts(int type, _zval_struct
retval, int file_count, ...) Line 1474 C
php7ts.dll!php_execute_script(_zend_file_handle primary_file) Line 2537 C
php.exe!do_cli(int argc, char
argv) Line 994 C
php.exe!main(int argc, char
* argv) Line 1384 C

Unhandled exception at 0x77B82CE0 (ntdll.dll) in php.exe: RangeChecks instrumentation code detected an out of range array access.

TagsNo tags attached.
Operating SystemWindows 10 x64
PHP Version7.1.0-7.1.4

Activities

derick

2017-01-28 19:08

administrator   ~0004189

As there is no Xdebug in the back trace, and it only happens after composer restarts, I doubt this is an Xdebug problem.

I would check though if you can reproduce this on Linux with a ZTS build of PHP. (It's usually non zts on Linux and ZTS on windows).

JohnStevenson

2017-01-28 20:19

reporter   ~0004190

Thanks for the fast reply. I realise that xdebug is not involved in any way in the restarted process, but wondered if it could be influencing what opcache caches in the parent process. However I have no idea how it works, so it was a bit of a long shot.

I'll submit a bug report on the PHP tracker. Thanks for your time.

derick

2017-01-28 21:02

administrator   ~0004191

Jordi says that this should be fixed in Composer 1.3.2, but please still file this bug report.

JohnStevenson

2017-01-28 21:13

reporter   ~0004192

Yes, we added a workaround.

Issue History

Date Modified Username Field Change
2017-01-28 18:14 JohnStevenson New Issue
2017-01-28 19:08 derick Note Added: 0004189
2017-01-28 20:19 JohnStevenson Note Added: 0004190
2017-01-28 21:02 derick Note Added: 0004191
2017-01-28 21:02 derick Status new => resolved
2017-01-28 21:02 derick Resolution open => no change required
2017-01-28 21:02 derick Assigned To => derick
2017-01-28 21:13 JohnStevenson Note Added: 0004192
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized