Bug #76882 [NEW]: Files not released leading to "Too many files"

From: Date: Fri, 14 Sep 2018 13:32:27 +0000
Subject: Bug #76882 [NEW]: Files not released leading to "Too many files"
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-217049@lists.php.net to get a copy of this message
From: andrew at nicols dot co dot uk Operating system: MacOS PHP version: 7.2.10 Package: phpdbg Bug Type: Bug Bug description:Files not released leading to "Too many files" 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 bug report at https://bugs.php.net/bug.php?id=76882&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76882&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76882&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76882&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=76882&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=76882&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=76882&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=76882&r=needscript Try newer version: https://bugs.php.net/fix.php?id=76882&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=76882&r=support Expected behavior: https://bugs.php.net/fix.php?id=76882&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=76882&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=76882&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=76882&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76882&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=76882&r=dst IIS Stability: https://bugs.php.net/fix.php?id=76882&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=76882&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=76882&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=76882&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=76882&r=mysqlcfg

« previous php.bugs (#217049) next »