Page MenuHomePhabricator

Make sure failure to remove temporary files does not cause error exit codes
AbandonedPublic

Authored by hach-que on Jul 23 2015, 12:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 29, 6:42 PM
Unknown Object (File)
Tue, May 27, 8:25 PM
Unknown Object (File)
Apr 26 2025, 1:28 PM
Unknown Object (File)
Apr 23 2025, 3:21 AM
Unknown Object (File)
Apr 19 2025, 11:35 PM
Unknown Object (File)
Apr 19 2025, 11:35 PM
Unknown Object (File)
Apr 17 2025, 5:34 PM
Unknown Object (File)
Apr 16 2025, 8:28 PM

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Summary

For some reason on Windows, the files used for the streaming stdout / stderr remain locked when PHP exits. In this case, the automatic unlink fails, and PHP returns an error code.

Because we don't have much control of Windows and how it does it's file locking nonsense, gracefully ignore failure to remove TempFiles if $temp->setIgnoreRemovalFailure(true) is called.

Also, have a free "latest XHPAST built for Windows".

Test Plan

Replicated the issue and then set:

$this->windowsStdoutTempFile->setIgnoreRemovalFailure(true);
$this->windowsStderrTempFile->setIgnoreRemovalFailure(true);

and saw the failure go away. Set those values to false and saw the exception appear again. Set them back to true before running arc diff so that we actually fix the issue.

Diff Detail

Branch
winfilestreams
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 7359
Build 7758: [Placeholder Plan] Wait for 30 Seconds
Build 7757: arc lint + arc unit

Event Timeline

hach-que retitled this revision from to Make sure failure to remove temporary files does not cause error exit codes.
hach-que updated this object.
hach-que edited the test plan for this revision. (Show Details)
hach-que added a reviewer: epriestley.

We'll keep this patched locally while-ever we keep encountering the issue.