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, Mar 28, 3:12 PM
Unknown Object (File)
Mon, Mar 25, 7:15 PM
Unknown Object (File)
Fri, Mar 1, 7:05 AM
Unknown Object (File)
Feb 15 2024, 8:40 AM
Unknown Object (File)
Feb 3 2024, 5:58 AM
Unknown Object (File)
Jan 28 2024, 8:13 AM
Unknown Object (File)
Jan 28 2024, 3:05 AM
Unknown Object (File)
Jan 16 2024, 11:49 AM

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.