-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Random failure of the Process tests #9182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I actually thought it was just happening on windows platform when using file handles (see https://bugs.php.net/bug.php?id=65650 that produces the same test failure) I'm gonna dig this, any help would be very appreciated |
Okay, I've run the test suite in 2.2 / 2.3 / master on my computer (OSX) and a desktop ubuntu intensively. I got everytime the same results (many many many tries) :
Tests are okay. Please note the amount of memory used (thats another issue). I started to become desperate when I got these failures :
Yes, I got it. The issue occurs when the cpu is under heavy load. The bug can be reproduce by running the test suite with the mentioned arguments I'm continuing to investigate |
I have the same random bug :( <?php
require 'vendor/autoload.php';
use Symfony\Component\Process\Process;
$cmd = "git show 'master':composer.json";
$cwd = "/home/co/apps/my-repo-with-a-big-composer.json/";
$process = new Process($cmd, $cwd);
$process->run();
print $process->getOutput(); |
I got a pending fix, linux only. Currently working on the windows compatibility |
…mainneutron) This PR was merged into the 2.2 branch. Discussion ---------- [Process][2.2] Fix 9182 : random failure on pipes tests | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #9182 | License | MIT I'm not a big fan of this fix, but - at least - it works. With this code, finally, Process does not behave the same at all on Windows and Linux. This patch does not smells very good but it solves the random failing test issue (that produced at runtime too). Actually, calling `proc_get_status` within the waiting loop introduced the bug. So this PR reverts to the previous behavior (consider a process running as long as pipes give data). On Windows, this is not the same behavior as we're not using streams but file handles. Whereas the feof of a stream is detected when the other side closes, the feof of a file handle can be reached at any time. So, on Windows, `proc_get_status` is called (checking the feof of the file handle might be positive until the executable outputs something), and we consider a process running as long as the information returned says it's running. We could think of decouple windows and linux logic in two separated objects, using the interfaces I introduced in #8753. This could bring much more readability and make the code more easy to understand. Commits ------- 64a0b40 [Process] Fix #9182 : random failure on pipes tests
* 2.2: [Process] Fix #9182 : random failure on pipes tests Fixed propel guessed relations [FramworkBundle][HttpKernel] Check event listener services are not abstract fixed CS Check for lock existence before unlinking [FrameworkBundle] fixed path replacement on Windows Conflicts: src/Symfony/Component/Process/Process.php
* 2.3: [Process] Fix #9182 : random failure on pipes tests Fixed propel guessed relations [FramworkBundle][HttpKernel] Check event listener services are not abstract fixed CS Check for lock existence before unlinking remove MinCount and MaxCount contraints. It has been replaced by Count constraints. [FrameworkBundle] fixed path replacement on Windows Conflicts: src/Symfony/Bridge/Propel1/Tests/Form/PropelTypeGuesserTest.php
apparently, I messed up the merge to the 2.3 branch. |
If you have few min (maybe an hour) I'll take care of it |
This PR was merged into the 2.3 branch. Discussion ---------- [Process] Fix latest merge from 2.2 in 2.3 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes (Process tests are okay) | License | MIT Fix latest merge from 2.2 in 2.3, see #9182 Process tests are okay, an error in HttpKernel seems to occur Commits ------- b5e3576 [Process] Fix latest merge from 2.2 in 2.3
Update the symfony process library which causes missing branches in satis due to this issue - symfony/symfony#9182
Since a while now, the Process test suite randomly fails with error messages like the following one:
ping @romainneutron
The text was updated successfully, but these errors were encountered: