Skip to content

Log file not closed causing "failed to open stream: Too many open files" using phpunit-bridge #17268

@Congelli501

Description

@Congelli501

When running a large phpunit test with phpunit-bridge installed, the log files (app/logs/test.log) is not closed and the php process ends up failing with the failed to open stream: Too many open files error.

lsof | grep '^php' | grep 'test.log$' | wc -l returns 700+ results.

This bug only appear when symfony/phpunit-bridge is installed.
Removing it from my composer.json and running the tests again makes the tests run well, with ~20 logs files open.

Could it be caused by "It disables PHP's garbage collector for tests to avoid segmentation faults;" (source: http://symfony.com/blog/new-in-symfony-2-7-phpunit-bridge) ?

Symfony version: 2.7.8
PHP version: 5.6.11 (from Ubuntu 15.10)
phpunit version: 5.1.3 (installed via composer)

This seems to be related to this bug: #11566

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions