php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76882 Files not released leading to "Too many files"
Submitted: 2018-09-14 13:32 UTC Modified: 2019-01-08 00:16 UTC
Votes:5
Avg. Score:4.8 ± 0.4
Reproduced:5 of 5 (100.0%)
Same Version:3 (60.0%)
Same OS:3 (60.0%)
From: andrew at nicols dot co dot uk Assigned:
Status: Closed Package: phpdbg
PHP Version: 7.2.10 OS: MacOS
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: andrew at nicols dot co dot uk
New email:
PHP Version: OS:

 

 [2018-09-14 13:32 UTC] 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]

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-09-14 13:49 UTC] cmb@php.net
This might be a duplicate of bug #76801.
 [2018-09-14 13:53 UTC] 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-11-11 20:31 UTC] gadelat at gmail dot com
Affects Linux too. Most people are interested in increase of speed phpdbg provides, but this bug makes it not usable.
 [2019-01-08 00:16 UTC] andrew at nicols dot co dot uk
-Status: Open +Status: Closed
 [2019-01-08 00:16 UTC] andrew at nicols dot co dot uk
I'm pretty sure that this is a duplicate of bug #76801 as cmb@php.net suggests.
Closing.

We really need to get this sorted as it renders phpdbg useless for code coverage generation.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 18:01:29 2024 UTC