View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002216 | Xdebug | Uncategorized | public | 2023-11-28 09:17 | 2024-04-15 12:49 |
| Reporter | kieranfj | Assigned To | |||
| Priority | normal | Severity | crash | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Platform | Windows | OS | Windows | OS Version | 11/10 |
| Product Version | 3.3.0alpha3 | ||||
| Fixed in Version | 3.3.2 | ||||
| Summary | 0002216: With PHP8.3 and Apache 2.4.58 error_reporting() causing Apache process to hang | ||||
| Description | Whe running the script multiple times in quick succession, the Apache process hangs and increases CPU usage every time the script is run Happens regardless of php.ini error_reporting setting (whether its changed from the default or not) | ||||
| Steps To Reproduce | Run script once via browser request - Apache responds as normal Disable xdebug (comment out the .dll or just turn it off) Apache responds as normal | ||||
| Additional Information | Tried on two windows machines, a 10 and 11 Wampserver package (3.3.2, Apahce 2.4.58, PHP 8.3.0) being used | ||||
| Tags | No tags attached. | ||||
| Operating System | Windows | ||||
| PHP Version | 8.2.0-8.2.9 | ||||
|
|
Nearly identical problem on my system when using Apache 2.4.58 + php 8.3 + xdebug 3.3.0_8.3 does freeze my Apache process. In my case, the CPU usage does not go up, it just freezes. Running Apache 2.4.58 + php 8.2 + xdebug 3.3.0_8.2 works without any problems. Are there any logs I can provide to help diagnose this problem? |
|
|
I'm having the same issue with php hanging when running Wampserver 3.3.3 with Apache 2.4.58 + php 8.3 + php_xdebug-3.3.0-8.3-vs16-x86_64.dll while php_xdebug-3.3.0-8.2-vs16-x86_64.dll is working fine on php 8.2 Setting xdebug.mode=off fixes the handing issue. Happy to provide any relevant logs. |
|
|
I have released Xdebug 3.3.1, in which I believe these issues are fixed. Could you all please try that version? |
|
|
Unfortunately Xdebug 3.3.1 didn’t fix the issue for me when using xdebug.mode = develop,debug I also checked the following modes individually and get the same issue xdebug.mode = develop When browsing the site normally everything seems fine however when running Playwright tests once specific set of pages handled by one php file consistently triggers the hanging behaviour normally on page 5 of the tested pages. It seems the speed the pages are accessed is a factor. I will investigate further and try and put together a php file that triggers the issue that I can share. If there are any xdebug configurations I can use to log what’s going on please let me know. |
|
|
Installed xdebug 3.3.1 and can also confirm the hanging behaviour is still present Apache 2.4.58 |
|
|
Ok, I’ve attached the smallest amount of code that causes the page to hang normally on the second refresh, if you don’t see the issue try refreshing with chrome dev tools open (F12) with the “Disable cache” setting ticked on the “Network tab” The issues goes away if I comment out error_reporting(0); or disable to RewriteRule in the .htaccess file or there is only one image on the page. Let me know if you are not able to reproduce the issue I’m seeing with the attached code, and I can send php.ini and httpd.conf in case there is some that is different from your test environment. See this video of the page loading normally with error_reporting(0); commented out and then hanging once error_reporting(0); is uncommented. |
|
|
The video link I post was modified by the form, to view it you will need to replace & with & at the end of the url |
|
|
I'll have a look after the break. |
|
|
I can confirm this issue. |
|
|
Can any of you report this on Linux? |
|
|
I checked my test case in a docker container (based on debian 12) with the following config and there was no issues so I’m assuming the issue is specific to PHP on windows. ========= Dockerfile_custom start =========
========= Dockerfile_custom end ========= ========= docker-compose.yml start =========
========= docker-compose.yml end ========= ========= xdebug.ini start =========
========= xdebug.ini end ========= xdebug_info(); was used to confirm xdebug was active and the version was 3.3.1 |
|
|
I can also not reproduce it on macOS. test.php:
call in terminal: |
|
|
I doubt this would reproduce on the CLI with concurrent requests, there is something that happens in a threaded environment I suspect. This is probably also why your Apache/Linux run didn't work. By default it still uses FWIW, I have no Windows to test this on. |
|
|
I checked and the docker container I used above and it uses mpm_prefork with mod_php (Server API: Apache 2.0 Handler) I did some further testing on windows and the following code only hangs when using mod_php (Server API: Apache 2.0 Handler) but works fine when using mod_fcgid (Server API: CGI/FastCGI) |
|
|
Something not mentioned before: |
|
|
same thing here with FrankenPHP (Caddy) |
|
|
i can report this happening also on Slackware current. DescriptionThe following code:
Seems to randomly hang when called from the line BasicErrorHandler.php:23 of Symfony. I'm running it on a Apache web server. When checking the server status, the process linked to the request is hanged in "W" status (sending response) and the browser received no byte from the server. I run pstack on the process that is handling the request, obtaining the following trace: https://pastebin.com/iNxBiEtn. The part that seems interesting is:
The hang happens not for all the call to the same file, but always at the same line. With XDebug disabled it seems to not happen I'll monitor this thread if you need any more informations PHP Version8.3.3 Operating SystemSlackware-current |
|
|
Adding to the one before: downgrading to 8.2.13 without changing any configuration or downgrading Xdebug, makes the problem not happen |
|
|
For the record, I created a minimal reproducer that isn't using Docker: https://github.com/dunglas/frankenphp/issues/563#issuecomment-2009244388 |
|
|
|
|
|
Is there a compiled windows version of the dll for PHP 8.3 VS16 TS (64 bit) with the patch to check if the crash has been fixed on windows. |
|
|
Just to report back, I compiled the 3.3.2-dev release from dunglas:fix/overloaded_functions_zts and the issues I reported in this thread seem to be fixed now. |
|
|
You can use the artefacts from https://github.com/xdebug/xdebug/actions/runs/8470808863#artifacts I'll remove your attached dlls, as I can't verify where they came from. |
|
|
Just downloaded php_xdebug-3.3.2-dev-8.2-vs16-x86_64.dll and noticed that phpinfo displays "with Xdebug v3.3.2-dev, Copyright (c) 2002-2023, by Derick Rethans". |
|
|
No worries Vincent, I'll update that when I make a release. |