View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002144 | Xdebug | Uncategorized | public | 2022-12-11 14:41 | 2023-07-26 09:34 |
Reporter | physikbuddha | Assigned To | derick | ||
Priority | urgent | Severity | crash | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Target Version | 3.2dev | Fixed in Version | 3.2.1 | ||
Summary | 0002144: Xdebug 3.2.0 ignores xdebug.mode and enables all features | ||||
Description | Affected enviroment: Windows (haven't tried with *nix) I wanted to try out the new Xdebug 3.2.0 and installed it on my local machine. At first some numbers: Executing a certain command (that is flushing the cache on a TYPO3 instance) took:
I then noticed that my tmp directory was growing pretty fast, because every request I made caused Xdebug to output a profiling cachegrind file. After some more testing, I came to the conclusion that Xdebug 3.2.0 almost completly ignores my xdebug.mode setting. I attached two screenshots showing the output of xdebug_info(). Both versions were set to the same xdebug.mode value "debug". | ||||
Steps To Reproduce | Install Xdebug 3.2.0 with any PHP version you like (tried with 8.1.0, 8.1.12, 8.2.0) on Windows. | ||||
Additional Information | Minimal Xdebug configuration in php.ini to reproduce: [XDebug] | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Operating System | Windows 10 Pro 22H2 | ||||
PHP Version | 8.1.10-8.1.19 | ||||
has duplicate | 0002149 | resolved | derick | Stack Traces are shown even when xdebug is running in mode 'debug' |
has duplicate | 0002165 | resolved | derick | xdebug.profiler_output_name files created even if xdebug.mode profile is not set |
has duplicate | 0002152 | resolved | derick | Can't get HTML formatted errors to enable |
has duplicate | 0002145 | resolved | derick | Xdebug 3.2.0 crash PHP on Windows if xdebug.mode = off |
|
Hi, I can't seem to reproduce this with Linux and PHP's built-in web server. What is your set up? Do you use Apache, or IIS, or something else? Could you try with PHP's built-in web server? I ran my test as follows, on a command prompt:
You might have to change paths. The And then opened http://localhost:9242/info.php in my browser, which contained only a call to I will have a look later on Windows, but it would help me if you let me know more about your setup. cheers, |
|
Okay, so I can confirm that it's working just fine with the PHP integrated webserver (like it should). The error occurred on a standard XAMPP installation (that I was using as a quick development server). These are the minimal steps to reproduce it:
|
|
So maybe I should report this to the Apache foundation then? But I wonder why this error didn't occur before. I was able to use Xdebug with a standard XAMPP installation for years just fine. |
|
Apache Friends, not Apache foundation. (Sorry, I can't seem to edit my comments here). |
|
Hi, I have tried this now, and I can indeed reproduce this. I think I also have a vague idea where and why this happens. The problem is is that I don't know how to debug this properly on Windows, so I am going to have to see if I can reproduce this on Linux. But now I know what the issue could be, that is easier. You don't need to report this to the Apache Friends people. cheers, |
|
I've stumbled upon it on CentOS 7.9.2009 with latest PHP and XDebug from remi-php80. [code] P.S. |
|
@AnrDaemon — I'd love to fix the collation, but the last time I tried I ended up messing everything up. Don't really want to do that again. In any case, what is the web server setup that you use? Apache? Which MPM? Something else? |
|
nginx, php-fpm, socket. |
|
Any update on the issue? Sorry to bother, but manually installing 3.1 from PECL is very inconvenient on package managed systems. |
|
No update, I can't reproduce this. |
|
Whatever is it, is isn't related to php-fpm because it also happens with mod_php. |
|
Derick, what kind of reproduction setup you would accept to evaluate this issue? Docker, LXD, ovirt? |
|
Docker would be fine, preferably with the container having debug builds of PHP and Xdebug and with gdb and valgrind installed. |
|
If you have a readily available Dockerfile with these tools, it would help greatly. |
|
Sorry, I don't have a Dockerfile with these tools yet — but it's usually not hard to add them ( |
|
@AnrDaemon I just tried to reproduce this again with PHP 8.2.5 and both ZTS and NTS versions of PHP-FPM with Xdebug 3.2.0, and I see no problems. If you have any sort of Docker environment that can reproduce this, that would be most welcome! |
|
|
|
I have just made a PR to fix this bug, which as far as I can tell only occurred in threaded environments: https://github.com/xdebug/xdebug/pull/881 If you're on Linux and can compile Xdebug yourself to test, please use this branch: https://github.com/derickr/xdebug/tree/issue2144-mode-in-threaded-environment If you're on Windows, please use one of the new DLLs (called Artifacts) https://github.com/xdebug/xdebug/actions/runs/4471304815?pr=881#artifacts — You'll likely need the ones that don't have "nts" in their filename. |
|
It is OK now with 3.2.1 dev TS on PHP 8.2.4 - Thanks |
|
https://github.com/xdebug/xdebug/pull/875 — which is now merged, and 3.2.1 will be released soon. |
|
Turned out, in my case it was more a reading documentation issue. |
|
@AnrDaemon — I know it is annoying. Unfortunately it isn't something I can relax right now, due to the way how PHP-FPM initialises PHP and its extensions. Xdebug (and likely other extensions) rely on the hooks being set-up right, and once, depending on an authoritative value of options (xdebug.mode in our case). PHP-FPM allows ini settings to be overridden after extensions have been initialised (it starts PHP once, and the forks for each worker, which then can have different values), which is a no-no for Xdebug. |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-12-11 14:41 | physikbuddha | New Issue | |
2022-12-11 14:41 | physikbuddha | File Added: 2022-12-11 15_22_11-Xdebug 3.1.6.png | |
2022-12-11 14:41 | physikbuddha | File Added: 2022-12-11 15_23_13-Xdebug 3.2.0.png | |
2022-12-12 09:37 | derick | Assigned To | => derick |
2022-12-12 09:37 | derick | Status | new => feedback |
2022-12-12 09:37 | derick | Note Added: 0006474 | |
2022-12-12 10:21 | physikbuddha | Note Added: 0006477 | |
2022-12-12 10:21 | physikbuddha | Status | feedback => assigned |
2022-12-12 10:22 | physikbuddha | Note Added: 0006478 | |
2022-12-12 10:23 | physikbuddha | Note Added: 0006479 | |
2022-12-18 15:50 | derick | Note Added: 0006493 | |
2022-12-18 15:50 | derick | Priority | normal => urgent |
2022-12-18 15:50 | derick | Severity | major => crash |
2022-12-18 15:50 | derick | Status | assigned => confirmed |
2022-12-18 15:50 | derick | Target Version | => 3.2dev |
2022-12-20 21:02 | AnrDaemon | Note Added: 0006495 | |
2022-12-21 10:46 | derick | Status | confirmed => feedback |
2022-12-21 10:46 | derick | Note Added: 0006496 | |
2022-12-21 10:47 | derick | Relationship added | has duplicate 0002149 |
2022-12-21 20:34 | AnrDaemon | Note Added: 0006498 | |
2023-01-27 14:17 | AnrDaemon | Note Added: 0006507 | |
2023-01-27 14:25 | derick | Note Added: 0006508 | |
2023-02-12 09:32 | kAlvaro | Note Added: 0006515 | |
2023-03-04 16:09 | AnrDaemon | Note Added: 0006516 | |
2023-03-04 16:22 | derick | Note Added: 0006517 | |
2023-03-04 18:14 | AnrDaemon | Note Added: 0006518 | |
2023-03-07 11:45 | derick | Note Added: 0006519 | |
2023-03-13 14:12 | derick | Note Added: 0006521 | |
2023-03-20 16:49 | Otomatic | Note Added: 0006529 | |
2023-03-20 16:49 | Otomatic | File Added: xdebug_mode_off.png | |
2023-03-20 16:49 | Otomatic | File Added: xdebug_mode_develop.png | |
2023-03-20 17:41 | derick | Relationship added | has duplicate 0002165 |
2023-03-20 18:01 | derick | Status | feedback => confirmed |
2023-03-20 18:01 | derick | Note Added: 0006531 | |
2023-03-21 11:33 | Otomatic | Note Added: 0006532 | |
2023-03-21 11:33 | Otomatic | File Added: xdebug_mode_develop3.2.1.png | |
2023-03-21 16:26 | derick | Status | confirmed => closed |
2023-03-21 16:26 | derick | Resolution | open => fixed |
2023-03-21 16:26 | derick | Fixed in Version | => 3.2dev |
2023-03-21 16:27 | derick | Note Added: 0006533 | |
2023-03-21 16:29 | derick | Relationship added | has duplicate 0002152 |
2023-03-21 16:30 | derick | Fixed in Version | 3.2dev => 3.2.1 |
2023-03-21 16:32 | derick | Relationship added | has duplicate 0002145 |
2023-07-25 14:48 | AnrDaemon | Note Added: 0006606 | |
2023-07-26 09:34 | derick | Note Added: 0006607 |