View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002097||Xdebug||Uncategorized||public||2022-06-08 17:13||2022-12-07 12:22|
|Status||resolved||Resolution||unable to reproduce|
|Platform||64-bit||OS||Windows 10 Pro||OS Version||19043.1706|
|Summary||0002097: 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
|Steps To Reproduce|
Haven't found a way to reproduce this without our private code base.
I remember CakePHP Chronos, which we also use, used to have issues with Xdebug. But this was a few years ago.
|Tags||crash, develop, phpunit|
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.
You might also want to check whether opcache is enabled, and whether removing that changes anything.
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 :
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
did you manage to run the new test with
I can't reproduce this, and the original reporter did not provide the requested information. If this is still an issue, please reopen this issue, or file a new one.
Sorry, Derick, for not getting backa t you with the requested information.
Today, I ran the affected test suite with various 3.1.x versions of Xdebug including the recently released 3.1.6, again.
So, up until 3.1.1 it worked, 3.1.2 up including 3.1.5 are affeced of this bug and 3.1.6 seems to fix it.
After some hours of debugging, I found the culprit:
CakePHP 3.x App Template contains calls to xdebug_print_function_stack
CakePHP 4.x App Template does not contain any call to xdebug_print_function_stack (anymore)
xdebug_print_function_stack( string $message = "user triggered", int $options = 0 ) : void #
It seems this function is buggy in some setups or call orders.
You were right on this.
For us, the workaround will be to disable this function call in our CakePHP 3.x applications and for CakePHP 4.x we will remove it as the CakePHP devs have done so.
Thank you & have some relaxing holidays with some nice Whisky.
|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|
|2022-07-14 10:19||derick||Note Added: 0006346|
|2022-10-05 15:10||derick||Status||feedback => resolved|
|2022-10-05 15:10||derick||Resolution||open => unable to reproduce|
|2022-10-05 15:10||derick||Note Added: 0006388|
|2022-11-09 12:42||ravage||Note Added: 0006444|
|2022-12-07 12:22||ravage||Note Added: 0006463|