Skip to content

Commit 10024e8

Browse files
FIX: Tasks on MacOS agents not completing but marked as succeeded. (#5092)
* added tracing * added more tracing * fixed exception handling * fixed compilation errors * fixes * added tracing related to threads * thread tracing * test change in resourcemanager exec context * publish telemetry disabled check * streamreader access check * compare exchange * turning off memory and disk info monitor * monitors - cpu off, memory on * cpu and memory info both enabled * cancellationtoken update * loop iteration trace * added taskid * resource monitor locks * interlocked compare exchange * resource monitor lock and private task call * syntax fix * job extension and workercommandmanager tracing * cancellation token tracing * commented resourcediagnostics from steps runner, tracing for context.warning added * commenting out resource debug monitor * minor fix * added process ids to tracings in invoker; added continueaftercancelprocesstreekillattempt arg * execute async overload * continue after cancel process tree false * removed args * added process filename * added filename * Changes from tarun * undo filename change inside redirect if-blocks * adding lock to not invoke th eprocess again and again * re-enable debug resource monitor in jobrunner * remove try-catch-finally block * disposing _proc stdinput and stderror * proc stdout dispose * removing tracings - restoring few files to original state * removing tracings - restoring few files to original state * removing tracings - restoring few files to original state * removed tracings from process invoker and resource metrics manager * remove temporary debug statements * remove temporary debug statements * formatting changes * formatting changes * try-catch in dispose * null check for proc.stdout and proc.stderr, isprocrunning for diskinfo and isprocrunning check for all OS options * formatting change * steps runner set context * Trigger checks * Trigger checks * Trigger checks --------- Co-authored-by: Tarun Ramsinghani <[email protected]>
1 parent f681ab2 commit 10024e8

File tree

2 files changed

+214
-148
lines changed

2 files changed

+214
-148
lines changed

src/Agent.Sdk/ProcessInvoker.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,10 @@ protected virtual void Dispose(bool disposing)
404404
{
405405
if (_proc != null)
406406
{
407+
//Dispose the standard output/error stream. Refer: https://github.com/dotnet/runtime/issues/58872
408+
_proc.StandardOutput?.Dispose();
409+
_proc.StandardError?.Dispose();
410+
407411
_proc.Dispose();
408412
_proc = null;
409413
}

0 commit comments

Comments
 (0)