View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001424 | Xdebug | Uncategorized | public | 2017-04-19 05:14 | 2017-04-22 10:08 |
Reporter | rnix | Assigned To | derick | ||
Priority | normal | Severity | block | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 2.5.3 | ||||
Target Version | 2.5.4 | Fixed in Version | 2.5.4 | ||
Summary | 0001424: set_time_limit() executes infinitely | ||||
Description | If you use | ||||
Steps To Reproduce | <?php | ||||
Additional Information | The problem is similar to https://bugs.xdebug.org/view.php?id=111 and https://bugs.xdebug.org/bug_view_advanced_page.php?bug_id=0000171 | ||||
Tags | No tags attached. | ||||
Operating System | Docker php:5.6-fpm + nginx | ||||
PHP Version | 5.6.30-5.6.35 | ||||
|
It works normally in the same environment with XDebug 2.5.1. |
|
I can't reproduce this - there is a bug in 2.5.2 that might relate do this, so can you please show: php -v and, the exact script that you use to replicate this problem. |
|
I'm encountering the same problem. Using macOS 10.12.4 homebrew php56-xdebug, which was recently updated from 2.5.1 to 2.5.3, and any call to set_time_limit() just hangs with 100% cpu usage for 30 seconds before failing. My test script is: With Xdebug 2.5.3, this fails (when run via apache, php-cli doesn't seem to be affected) Output of test script via apache: Time Memory Function Location1 0.0001 228688 {main}( ) .../limit.php:0 Switching back to 2.5.1 with "brew switch php56-xdebug 2.5.1; sudo apachectl restart" and: php -v Output of test script via apache: Trying to debug the apache process with 2.5.3:
|
|
And like the original post said, the very first page load seems to work ok, but any subsequent page load hangs. |
|
php -v: PHP 5.6.30 (cli) (built: Mar 21 2017 23:05:12) The exact script: <?php The bug does not appear in cli-mode, so phpinfo could help: PHP Version 5.6.30 I can provide docker-compose.yml if it could help. |
|
I've tried this again, with various configurations, but I still can't reproduce this. A docker compose file is likely going to be useless as it makes it nearly impossible to inject debugging tools that I would need as well. A VirtualBox image would however be very much welcome - or perhaps through Vagrant too. It is also important to know which GCC version you've been using (gcc --version), and whether the problem still occurs without the "'CFLAGS=-fstack-protector-strong '-fpic' '-fpie' '-O2'' 'LDFLAGS=-Wl,-O1 '-Wl,--hash-style=both' '-pie'' 'CPPFLAGS=-fstack-protector-strong '-fpic' '-fpie' '-O2''" in your configure line. |
|
I've rebuilt from https://github.com/docker-library/php/blob/master/5.6/fpm/Dockerfile with deleted export flags: PHP Version 5.6.30 gcc --version: gcc (Debian 4.9.2-10) 4.9.2 The problem still occurs. |
|
It looks like my apache php does not have pcntl_exec despite my cli php having it, the php versions being the same, and I don't have anything in disable_functions or safe mode or anything. var_dump(function_exists("pcntl_exec")) returns false in apache and true on cli. Looking at https://github.com/xdebug/xdebug/blob/XDEBUG_2_5_3/xdebug.c#L1295 - it does not seem like the return value of zend_hash_find is being checked for errors. Could it be that the next statements on line 1297 onwards are using the "orig" that points to set_time_limit as set in line 1286? |
|
I created a pull request on github that seems to fix this problem in my environment. https://github.com/xdebug/xdebug/pull/341 |
|
@fm - that PR seems right, but it should be extended to the other two as well. What is curious though is that I did use apache without pcntl_exec and couldn't reproduce this. |
|
OK, I wasn't too sure about the others since they didn't even have the if(orig) check, and I wasn't sure if that would also cascade elsewhere for cleanup etc. I'm more comfortable leaving that to the experts, if you don't mind :) (Can you even have a PHP without "var_dump"? Maybe if it's listed in php.ini's disable_functions? I digress..) |
|
Even if it's in disable_functions, it will have a function entry in the symbol table. Fixing this up now, but might need to push it back til tomorrow (ZzZz) |
|
I've merged this into the master and xdebug_2_5 branches. Can everybody please check whether it works now before I roll another release? |
|
Latest xdebug_2_5 branch on commit 4232d3cff53c0dbcb1ff3cfcb0ebb4a3f939c0e1 works fine for me here (homebrew php 5.6.30, macOS 10.12.4 x86_64, with the included system apache). |
|
By the way, for some reason it looks like some travis tests failed on xdebug_2_5? https://travis-ci.org/xdebug/xdebug/builds/224151546 I tried running "make test" on my mac and it gave like 84 failed tests and created a file called "C:\Windows\Temp\remote-log4.txt" in the xdebug directory, on both commit 2d9cebd20b8e2eeac8c0116876b5ba76bd4d24ee and commit 4232d3cff53c0dbcb1ff3cfcb0ebb4a3f939c0e1 (i.e. before and after your "Refactor overloading functions"), perhaps the tests don't work on macOS. |
|
There are test failures on Travis because it uses ZTS builds, which I had forgotten to test locally - that's what you get for doing this late at night! However, tests should work fine on the mac - would you mind tar.gz-ing your tests directory and attach it here? Don't worry about the C:\Windows... file, I get that too (and it's harmless). |
|
OK I'll try to find some time this weekend to investigate the mac test failures. |
|
I've pushed a fix that should make travis happy now too. @rnix, does this work for you too now? |
|
rnix - please let me know ASAP whether this fixes your original problem, so I can make a new release. |
|
Ok. I just need some time to build from sources. |
|
I've built from https://github.com/xdebug/xdebug/tree/xdebug_2_5, got Xdebug v2.5.4 and the problem does not occurs. It works fine. Thank you. |
|
Perfect. Closing this out then. I am hoping to resolve 0001335 as well, before rolling Xdebug 2.5.4 though. |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-04-19 05:14 | rnix | New Issue | |
2017-04-19 05:20 | rnix | Note Added: 0004288 | |
2017-04-19 14:19 | derick | Note Added: 0004291 | |
2017-04-19 14:19 | derick | Assigned To | => derick |
2017-04-19 14:19 | derick | Status | new => feedback |
2017-04-19 17:30 | fm | Note Added: 0004292 | |
2017-04-19 17:35 | fm | Note Added: 0004293 | |
2017-04-20 01:55 | rnix | Note Added: 0004294 | |
2017-04-20 01:55 | rnix | Status | feedback => assigned |
2017-04-20 09:02 | derick | Severity | major => block |
2017-04-20 09:02 | derick | Status | assigned => acknowledged |
2017-04-20 09:02 | derick | Target Version | => 2.5.4 |
2017-04-20 10:27 | derick | Note Added: 0004295 | |
2017-04-20 10:56 | rnix | Note Added: 0004296 | |
2017-04-20 10:57 | rnix | Note Edited: 0004296 | |
2017-04-20 21:26 | fm | Note Added: 0004301 | |
2017-04-20 21:37 | fm | Note Added: 0004302 | |
2017-04-20 22:13 | derick | Note Added: 0004303 | |
2017-04-20 22:34 | fm | Note Added: 0004304 | |
2017-04-20 22:40 | derick | Note Added: 0004305 | |
2017-04-20 22:51 | derick | Note Added: 0004306 | |
2017-04-20 23:28 | fm | Note Added: 0004308 | |
2017-04-20 23:37 | fm | Note Added: 0004309 | |
2017-04-21 08:12 | derick | Note Added: 0004310 | |
2017-04-21 14:41 | fm | Note Added: 0004317 | |
2017-04-21 15:51 | derick | Note Added: 0004318 | |
2017-04-22 00:20 | derick | Note Added: 0004319 | |
2017-04-22 00:20 | derick | Status | acknowledged => feedback |
2017-04-22 04:19 | rnix | Note Added: 0004320 | |
2017-04-22 04:19 | rnix | Status | feedback => assigned |
2017-04-22 06:23 | rnix | Note Added: 0004321 | |
2017-04-22 10:08 | derick | Note Added: 0004322 | |
2017-04-22 10:08 | derick | Status | assigned => closed |
2017-04-22 10:08 | derick | Resolution | open => fixed |
2017-04-22 10:08 | derick | Fixed in Version | => 2.5.4 |
2020-03-12 16:35 | derick | Category | Usage problems (Wrong Results) => Variable Display |
2020-03-12 16:38 | derick | Category | Variable Display => Uncategorized |