Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[4.4] Dramatic increase in memory consumption for tests after updating to 4.4 #35164

Copy link
Copy link
Closed
@ndench

Description

@ndench
Issue body actions

Symfony version(s) affected: 4.4.2

Description
When we update to 4.4, my tests go from this:

Time: 7.7 minutes, Memory: 295.00 MB 
 
OK (1878 tests, 8872 assertions) 

To this:

Time: 30.83 minutes, Memory: 9.03 GB

There was 1 error:

1) Hyra\Tests\Integration\Tasks\Command\WorkerCommandTest::testExecute
proc_open(): fork failed - Cannot allocate memory

vendor/symfony/console/Terminal.php:157
vendor/symfony/console/Terminal.php:143
vendor/symfony/console/Terminal.php:109
vendor/symfony/console/Terminal.php:92
vendor/symfony/console/Terminal.php:33
vendor/symfony/console/Style/SymfonyStyle.php:51
src/Tasks/Command/WorkerCommand.php:59
vendor/symfony/console/Command/Command.php:255
vendor/symfony/console/Tester/CommandTester.php:76
tests/Integration/Tasks/Command/WorkerCommandTest.php:59
 
-- 
 
There was 1 failure: 
 
1) Hyra\Tests\Functional\Negotiate\Download\DealContractFileUrlTest::testTenantsDownloadsContractWithCoverSheetAttachedInReview 
Failed asserting that 500 is identical to 200. 
 
tests/Functional/Negotiate/Download/DealContractFileUrlTest.php:118 
 
ERRORS! 
Tests: 1876, Assertions: 8852, Errors: 1, Failures: 1. 

At first, we thought that #34567 would fix it, but that was released a while back and it did not make a difference. Another possibly related issue would be #25964.

I've been unable to track down the actual issue, and can't seem to break down the problem into a reproducer on a blank Symfony installation. However, here is everything I've been able to figure out:

How to reproduce
We can't get a bug reproducer working, however these are the steps I've taken:

  • composer update symfony/*
  • Run tests like normal php vendor/bin/phpunit

Additional context

  • To rule out problems with other package upgrades we locked Symfony to 4.3 using extra.symfony.require: "4.3.*" in composer.json then ran a composer update. Then with extra.symfony.require: "^4.2.0" ran composer update symfony/*
  • Initially we was using symfony/phpunit-bridge, but ruled out an issue with that by uninstalling it and using phpunit/phpunit directly
  • We're using the LiipFunctionalTestBundle and the LiipTestFixturesBundle and loading fixtures in the WebTestCase
  • We are using the TestContainer to access services in tests
  • The test subset I'm running does not use the PhpUnit setUp functions

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.