DSC icon indicating copy to clipboard operation
DSC copied to clipboard

Tracing is not being flushed before `dsc` exits

Open SteveL-MSFT opened this issue 9 months ago • 0 comments

Prerequisites

  • [x] Write a descriptive title.
  • [x] Make sure you are able to repro it on the latest version
  • [x] Search the existing issues.

Summary

Particularly on macOS, some traces do not get emitted which the tracing test is expecting. Tracing is async and it seems that there is a race condition where the dsc process exists before the buffered traces get written out.

Steps to reproduce

During CI, typically it'll be macOS that fails due to a trace test can't find the trace, but likely succeeds on rerun

Expected behavior

all traces get written out

Actual behavior

some traces do not

Error details


Environment data

Name                           Value
----                           -----
PSVersion                      7.6.0-preview.2
PSEdition                      Core
GitCommitId                    7.6.0-preview.2
OS                             Darwin 24.3.0 Darwin Kernel Version 24.3.0: Thu Jan  2 20:24:06 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T8103
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

dsc 3.1.0-preview.1

Visuals

No response

SteveL-MSFT avatar Mar 06 '25 15:03 SteveL-MSFT