View Issue Details

IDProjectCategoryView StatusLast Update
0001428XdebugCode Coveragepublic2019-09-19 23:54
Reporterartem Assigned Toderick  
PrioritylowSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformWindowsOSWindows ServerOS Version2012 R2
Product Version2.5.3 
Summary0001428: xdebug_start_code_coverage crash on IIS+opcache (access violation exception)
Description

I'm using PHP 7.1.4 (fastcgi/nts) with IIS 8.5 (opcache enabled) and i'm trying to generate a code coverage report through the "codeception" lib.
Therefor they have a small package which uses "SebastianBergmann\CodeCoverage".

I've attached a small index.php file with all its composer dependencies. If you run this file on IIS 8.5 the php-cgi.exe process crashes.

The execution stops at this line:
vendor/phpunit/php-code-coverage/src/Driver/Xdebug.php:54
xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);

If you remove the XDEBUG_CC_UNUSED flag everything is fine. Also it is important to mention, that if you disable the opcache extension everything is fine too.

Additionally to the project files I also attached the DebugDiag report. Here an excerpt:
The assembly instruction at php_xdebug!xdebug_set_in_ex+13 has caused an access violation exception (0xC0000005) when trying to read from memory location 0x02131c00 on thread 0

php_xdebug!xdebug_set_in_ex+13
php_xdebug!xdebug_analyse_branch+4d
php_xdebug!xdebug_analyse_branch+124
php_xdebug!xdebug_analyse_branch+124
php_xdebug!xdebug_analyse_branch+124
php_xdebug!xdebug_analyse_oparray+146
php_xdebug!prefill_from_oparray+6a
php_xdebug!prefill_from_class_table+60
php_xdebug!xdebug_prefill_code_coverage+cd
php_xdebug!xdebug_code_coverage_start_of_function+13
php_xdebug!xdebug_execute_ex+5b3
php7!zend_call_function+30c1a7
php7!_call_user_function_ex+63
php7!user_shutdown_function_call+ce
php7!zend_hash_apply+67
php7!php_call_shutdown_functions+48
php7!php_request_shutdown+66
0x80000000`00000000
php7!php_register_variable_ex+11f
php7!php_register_variable_ex+139
ntdll!RtlAllocateHeap+c5
ucrtbase!malloc+2b
0x0705e6a0
php7!phar_find_in_include_path+3d4
php7!php_request_shutdown+5b
ntdll!RtlAppendUnicodeToString+54
0x0705ece0
ntdll!LdrStandardizeSystemPath+69
0x0705ed68

Steps To Reproduce
  • install IIS 8.5 on an Windows Server 2012 R2 (PHP 7.1.4)
  • Enable xdebug 2.5.3 and opcache extensions
  • extract the attached test_project.zip
  • launch index.php with IIS
TagsNo tags attached.
Attached Files
test_project.zip (4,009,544 bytes)
Operating System
PHP Version7.1.0-7.1.4

Activities

derick

2017-05-24 21:19

administrator   ~0004348

I am pretty sure this is the same issue as 0001434 which got fixed in Xdebug 2.5.4. Could you please try that version?

artem

2017-05-26 08:11

reporter   ~0004350

You're right. The problem is fixed with Xdebug 2.5.4. You can close the issue.

Issue History

Date Modified Username Field Change
2017-04-25 11:34 artem New Issue
2017-04-25 11:34 artem File Added: test_project.zip
2017-04-25 11:35 artem File Added: php-cgi__PID__2980__Date__04_25_2017__Time_01_24_47PM__494__Second_Chance_Exception_C0000005_CrashHangAnalysis.mht
2017-05-24 21:19 derick Note Added: 0004348
2017-05-24 21:19 derick Assigned To => derick
2017-05-24 21:19 derick Status new => feedback
2017-05-26 08:11 artem Note Added: 0004350
2017-05-26 08:11 artem Status feedback => assigned
2019-09-19 23:54 derick Status assigned => closed
2019-09-19 23:54 derick Resolution open => fixed