Page MenuHomePhabricator

When a command is killed by a timeout, make the human-readable error more clear
ClosedPublic

Authored by epriestley on Nov 16 2018, 5:11 PM.
Tags
None
Referenced Files
F13086616: D19815.diff
Thu, Apr 25, 12:38 AM
Unknown Object (File)
Fri, Apr 19, 11:25 PM
Unknown Object (File)
Fri, Apr 19, 8:48 PM
Unknown Object (File)
Tue, Apr 16, 11:16 PM
Unknown Object (File)
Tue, Apr 16, 4:39 AM
Unknown Object (File)
Sat, Apr 13, 2:32 PM
Unknown Object (File)
Sat, Apr 13, 7:45 AM
Unknown Object (File)
Sat, Apr 13, 7:45 AM
Subscribers
None

Details

Summary

Ref T13216. When we kill commands ourself because they exceed their time limit, it isn't always clear what happened. The error code (137 = kill, 143 = term) is usually a good hint if you know exactly what you're looking for, but this is totally non-obvious to anyone who isn't very familiar with the internals.

Instead, check if we killed the subprocess and make it clear what happened in the error message.

Test Plan
2018-11-16 9:07:53 AM [STDE] [2018-11-16 09:07:52] EXCEPTION: (PhutilProxyException) Task "138492" encountered a permanent failure and was cancelled. {>} (PhabricatorWorkerPermanentFailureException) Permanent failure while activating resource ("PHID-DRYR-bv5p57tk5y7vcqonrgj3"): Command killed by timeout after running for more than 0.001 seconds.

Diff Detail

Repository
rPHU libphutil
Branch
timeout1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 21174
Build 28790: Run Core Tests
Build 28789: arc lint + arc unit