Re: Re: Test 4784 (5.2.10rc2) hung my server
| From: | Andy Shellam | Date: | Sun, 28 Jun 2009 18:14:33 +0000 |
| Subject: | Re: Re: Test 4784 (5.2.10rc2) hung my server | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-44529@lists.php.net to get a copy of this message | ||
Hi Chris,
Thanks for the reply. I've only just got around to testing 5.2.10 final on my dev server.
Andy, It sounds like an infinite loop. If the problem persists, log a bug at http://bugs.php.net/I've noticed someone else has logged a bug and identified that it's a conflict with the cURL wrappers. http://bugs.php.net/bug.php?id=48637. This actually makes sense judging by the contents of the test script.
Check that it occurs with the final 5.2.10 release. Identify the failing script (I presume it is ext/standard/tests/file/bug27508.phpt.Yes, it is this particular test script, and it does still occur with the final 5.2.10 release.
If not, look for the next file in that directory). Some other useful info would be a system call trace (truss or strace) on the running process.Unfortunately it hangs the system to the point I cannot run a truss or strace - literally everything stops until the "make test" command is CTRL+C'd.
Try building PHP with --enable-debug and run the PHP CLI (in php-5.2.10/sapi/cli/php) in a debugger. Issue a break and see where the program stops.I've run the PHP CLI and there is definitely an infinite loop because it outputs the following lines repeatedly: ------------------------------ Warning: fread(): supplied argument is not a valid stream resource in /var/softw are/php-5.2.10/ext/standard/tests/file/bug27508.phpt on line 18 PHP Warning: feof(): supplied argument is not a valid stream resource in /var/s oftware/php-5.2.10/ext/standard/tests/file/bug27508.phpt on line 33 Warning: feof(): supplied argument is not a valid stream resource in /var/softwa re/php-5.2.10/ext/standard/tests/file/bug27508.phpt on line 33 PHP Warning: feof(): supplied argument is not a valid stream resource in /var/s oftware/php-5.2.10/ext/standard/tests/file/bug27508.phpt on line 33 Warning: feof(): supplied argument is not a valid stream resource in /var/softwa re/php-5.2.10/ext/standard/tests/file/bug27508.phpt on line 33 PHP Warning: fread(): supplied argument is not a valid stream resource in /var/ software/php-5.2.10/ext/standard/tests/file/bug27508.phpt on line 18 ------------------------------ Judging by the first few paragraphs of output, the test is not checking that the file calls succeed: ------------------------------ PHP Warning: fopen(): URL using bad/illegal format or missing URL in /var/softw are/php-5.2.10/ext/standard/tests/file/bug27508.phpt on line 11 Warning: fopen(): URL using bad/illegal format or missing URL in /var/software/p hp-5.2.10/ext/standard/tests/file/bug27508.phpt on line 11 PHP Warning: fopen(/tmp/footZaOtC): failed to open stream: operation failed in /var/software/php-5.2.10/ext/standard/tests/file/bug27508.phpt on line 11 Warning: fopen(/tmp/footZaOtC): failed to open stream: operation failed in /var/ software/php-5.2.10/ext/standard/tests/file/bug27508.phpt on line 11 PHP Warning: fwrite(): supplied argument is not a valid stream resource in /var /software/php-5.2.10/ext/standard/tests/file/bug27508.phpt on line 23 Warning: fwrite(): supplied argument is not a valid stream resource in /var/soft ware/php-5.2.10/ext/standard/tests/file/bug27508.phpt on line 23 PHP Warning: fwrite(): supplied argument is not a valid stream resource in /var /software/php-5.2.10/ext/standard/tests/file/bug27508.phpt on line 23 Warning: fwrite(): supplied argument is not a valid stream resource in /var/soft ware/php-5.2.10/ext/standard/tests/file/bug27508.phpt on line 23 PHP Warning: fwrite(): supplied argument is not a valid stream resource in /var /software/php-5.2.10/ext/standard/tests/file/bug27508.phpt on line 23 Warning: fwrite(): supplied argument is not a valid stream resource in /var/soft ware/php-5.2.10/ext/standard/tests/file/bug27508.phpt on line 23 PHP Warning: feof(): supplied argument is not a valid stream resource in /var/s oftware/php-5.2.10/ext/standard/tests/file/bug27508.phpt on line 33 ------------------------------ There's a while loop in the test, and I'm guessing that because the feof() call isn't succeeding, it's not checking for this and the loop carries on. ------------------------------ while ($fp && !feof($fp)) { echo fgets($fp); } ------------------------------ I've got rid of the infinite loop on my system by changing the "return true;" on line 13 to "return is_resource($this->fp);" This fails the test on my system because of the cURL clash, and this may not be the best solution. Regards, Andy