Bug #76882 [Com]: Files not released leading to "Too many files"
| From: | gadelat at gmail dot com | Date: | Sun, 11 Nov 2018 20:31:42 +0000 |
| Subject: | Bug #76882 [Com]: Files not released leading to "Too many files" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-217907@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76882&edit=1
ID: 76882
Comment by: gadelat at gmail dot com
Reported by: andrew at nicols dot co dot uk
Summary: Files not released leading to "Too many files"
Status: Open
Type: Bug
Package: phpdbg
Operating System: MacOS
PHP Version: 7.2.10
Block user comment: N
Private report: N
New Comment:
Affects Linux too. Most people are interested in increase of speed phpdbg provides, but this bug
makes it not usable.
Previous Comments:
------------------------------------------------------------------------
[2018-09-14 13:53:08] andrew at nicols dot co dot uk
cmb@phpnet, I wondered about that but that bug seemed to be more about the file being blocked for
read/write than file handles. Happy for you to close this issue if you think this is a duplicate.
------------------------------------------------------------------------
[2018-09-14 13:49:56] cmb@php.net
This might be a duplicate of bug #76801.
------------------------------------------------------------------------
[2018-09-14 13:32:27] andrew at nicols dot co dot uk
Description:
------------
phpdbg loads files but does not discard the file handles.
When trying to use phpdbg -qrr to generate code coverage reports for phpunit, the system max open
files limit is reached very quickly.
This does not happen with xdebug at all and essentially makes phpdbg useless for code coverage
generation on a larger project
Test script:
---------------
touch empty.php
echo '<?php
for ($i = 0; $i < 25000; $i++)
{
require("empty.php");
}' > test.php
phpdbg -qqr test.php
Expected result:
----------------
Same as xdebug - the run to finish without error
Actual result:
--------------
2096 phpdbg:master> phpdbg -qrr test.php
[PHP Warning: require(empty.php): failed to open stream: Too many open files in
/Users/nicols/git/tmp/phpdbg/test.php on line 5]
[PHP Warning: require(empty.php): failed to open stream: Too many open files in
/Users/nicols/git/tmp/phpdbg/test.php on line 5]
[PHP Fatal error: require(): Failed opening required 'empty.php'
(include_path='.:/usr/local/Cellar/php/7.2.10/share/php/pear') in
/Users/nicols/git/tmp/phpdbg/test.php on line 5]
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76882&edit=1