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)
Sat, Dec 14, 5:22 PM
Unknown Object (File)
Sat, Dec 14, 4:49 PM
Unknown Object (File)
Thu, Dec 5, 11:36 PM
Unknown Object (File)
Tue, Nov 19, 1:57 AM
Unknown Object (File)
Oct 29 2024, 6:42 PM
Unknown Object (File)
Oct 29 2024, 7:43 AM
Unknown Object (File)
Oct 18 2024, 11:00 AM
Unknown Object (File)
Oct 15 2024, 7:54 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.