View Issue Details

IDProjectCategoryView StatusLast Update
0002097XdebugUncategorizedpublic2022-06-27 09:50
Reporterravage Assigned Toderick  
Status feedbackResolutionopen 
Platform64-bitOSWindows 10 ProOS Version19043.1706
Product Version3.1.5 
Summary0002097: Xdebug crashes with exit code -1073740940 (0xC0000374) on Windows 10 Pro & PHP 7.3.x when Develop Mode is active

Since version 3.1.2 and onward Xdebug crashes with "Process finished with exit code -1073741819 (0xC0000005)" on Windows 10 Pro using PHP 7.3.33 (also 7.3.5) in Develop mode is active when running a PHPUnit test suite on some of our CakePHP 3.x based applications.

Going back to Xdebug 3.1.1 solved the issue.

We tested these variations:

zend_extension="php_xdebug-3.0.3-7.3-vc15-x86_64.dll" -> OK

zend_extension="php_xdebug-3.1.1-7.3-vc15-x86_64.dll" -> OK

zend_extension="php_xdebug-3.1.2-7.3-vc15-x86_64.dll" -> FAIL

zend_extension="php_xdebug-3.1.3-7.3-vc15-x86_64.dll" -> FAIL

zend_extension="php_xdebug-3.1.4-7.3-vc15-x86_64.dll" -> FAIL

zend_extension="php_xdebug-3.1.5-7.3-vc15-x86_64.dll" -> FAIL

xdebug.mode=debug -> OK

xdebug.mode=coverage ->OK

xdebug.mode=develop -> FAIL

xdebug.mode=debug, coverage -> OK

xdebug.mode=debug, develop -> FAIL

xdebug.mode=develop, coverage -> FAIL

Steps To Reproduce

Haven't found a way to reproduce this without our private code base.

Additional Information

I remember CakePHP Chronos, which we also use, used to have issues with Xdebug. But this was a few years ago.

Tagscrash, develop, phpunit
Operating System
PHP Version7.3.30-7.3.39



2022-06-09 09:02

administrator   ~0006329

Last edited: 2022-06-09 09:27


I have had a look at the differences between 3.1.1 and 3.1.2 in the source code, but nothing specific jumped out that could hint at an extra cause for a segfault. I'm afraid I am going to need some more information.

  1. Preferably a backtrace, as is explained under "Generating backtrace, without compiler, on Windows" at — this provides a hint to me where the crash could occur. Installing the debug pack as mentioned earlier in that file, would be a great help too. Because your PHP version is no longer supported by the PHP project, you can find the php-debug-pack that you need in
  2. To narrow down where in your code this occurs, configure xdebug.mode=develop,trace and set xdebug.start_with_request=yes, and perhaps xdebug.output_dir=C:\Temp (or something more suitable), and then run the tests. This should create a (big) trace file in that directory, up to the point where it crashes. You might get lucky that the actual call is there, but otherwise it should be the next one.

You might also want to check whether opcache is enabled, and whether removing that changes anything.



2022-06-27 09:50

administrator   ~0006335

Sorry it took me some time to come back to this. I don't have the faintest what this could be, but I am making a reasonable guess that some sequence does make this happen. It does seem to happen when an exception is thrown, which fetches a backtrace :

php7ts!zend_= fetch_debug_backtrace+138 [c:\php-snap-build\php73\vc15\x64\php-7.3.3= 3-ts\zend\zend_builtin_functions.c @ 2489 + 5]php7ts!zend= _default_exception_new_ex+95 [c:\php-snap-build\php73\vc15\x64\php-7.= 3.33-ts\zend\zend_exceptions.c @ 222]

But this crash does not occur in Xdebug at all, but rather just in PHP.

Often when crashes happen at seemingly random locations, I would run my scripts with Zend's Memory Manager disabled, as it sometimes hides real issues. You can do that by exporting the USE_ZEND_ALLOC=0 environment variable. I believe on Windows that is done with set USE_ZEND_ALLOC=0. And with this set, then run the scripts again as before.

Issue History

Date Modified Username Field Change
2022-06-08 17:13 ravage New Issue
2022-06-08 17:13 ravage Tag Attached: crash
2022-06-08 17:13 ravage Tag Attached: develop
2022-06-08 17:13 ravage Tag Attached: phpunit
2022-06-09 09:02 derick Assigned To => derick
2022-06-09 09:02 derick Status new => feedback
2022-06-09 09:02 derick Note Added: 0006329
2022-06-09 09:27 derick Note Edited: 0006329
2022-06-09 13:30 ravage Status feedback => assigned
2022-06-27 09:50 derick Status assigned => feedback
2022-06-27 09:50 derick Note Added: 0006335
2022-06-27 09:50 derick Note View State: 0006335: private
2022-06-27 09:51 derick Note View State: 0006335: public