PowerShell / PowerShell/DSC

Tracing is not being flushed before `dsc` exits

Open
#677 0 comments 0 reactions 1 assignee View on GitHub

@SteveL-MSFT is already working on this.

Since Jun 1, 2026.

Issue-Bug Need-Review
Dominant language
Rust
Stars
523
Forks
75
Avg merge
3d 16h
Merged PRs (30d)
24

Description

Prerequisites
  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.