php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76872 proc_open() broken parallel working commands
Submitted: 2018-09-12 14:12 UTC Modified: 2018-11-18 22:36 UTC
From: sailormax at inbox dot lv Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 7.3.0beta3 OS: Windows 10
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sailormax at inbox dot lv
New email:
PHP Version: OS:

 

 [2018-09-12 14:12 UTC] sailormax at inbox dot lv
Description:
------------
I can't find concrete the problem but have errors when trying to use `fastest` (https://github.com/liuggio/fastest) to run parallel phpunit tests. With php7.3 it start to return errcode 1 with some parallel processes.
Windows even does not register these broken executions. I look via AnVir Task Manager / Log. Here I can see list of all executed commands.

Possible problem in work with file handlers. `unlink()` can remove file, which in use by another `proc_open()`, but `fopen()` can't after this create new file.

in vendor/symphony/process/Pipes/WindowsPipes.php:60 for second test fopen($file, 'xb') return null and can't create file, but file at this moment is not exists because was removed by 57 line.

This is new bug. PHP <=7.2 work as expected.


Test script:
---------------
run command in Git's bash:
command: phpunit-tests | head -2 | vendor/bin/fastest --preserve-order -v "phpunit {}"
Where `phpunit-tests` return list of tests.

Expected result:
----------------
Both tests successfully executed.
AnVir Task Manager / Log / record about both executed test commands.


Actual result:
--------------
First test always is broken, but second successfully executed.
AnVir Task Manager / Log / only 1 record about successful executed test command.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-09-12 18:16 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2018-09-12 18:16 UTC] ab@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2018-11-18 22:36 UTC] cmb@php.net
-Status: Feedback +Status: No Feedback
 [2018-11-18 22:36 UTC] cmb@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 08:01:29 2024 UTC