Skip to content

Commit

Permalink
FIX: Tasks on MacOS agents not completing but marked as succeeded. (#…
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
sahilbhattMS and lajijijij authored Jan 16, 2025
1 parent f681ab2 commit 10024e8
Show file tree
Hide file tree
Showing 2 changed files with 214 additions and 148 deletions.
4 changes: 4 additions & 0 deletions src/Agent.Sdk/ProcessInvoker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,10 @@ protected virtual void Dispose(bool disposing)
{
if (_proc != null)
{
//Dispose the standard output/error stream. Refer: https://github.com/dotnet/runtime/issues/58872
_proc.StandardOutput?.Dispose();
_proc.StandardError?.Dispose();

_proc.Dispose();
_proc = null;
}
Expand Down
Loading

0 comments on commit 10024e8

Please sign in to comment.