-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
In 8.0.400, we added some telemetry (documented here) for container publish to help us direct investment in the tech. This telemetry is reported through MSBuild's built-in telemetry hooks, which for the dotnet CLI ends up forwarding telemetry from MSBuild through the CLI Telemetry's configuration (aka the environment variable mentioned above: DOTNET_CLI_TELEMETRY_OPTOUT).
There was a bug in the MSBuild engine's handling of this telemetry data, which we fixed in this PR, and this bug is the cause of the crash that's reported. We found this error during final testing, but too late to include it in the 400 release, and so began the process of making a hotfix immediately. This hotfix, 8.0.401, should be available in the next day or so.
The main reason we decided to do a hotfix for this is that the proposed workaround - setting DOTNET_CLI_TELEMETRY_OPTOUT to 1/true/other truthy values - did not consistently work in broader testing. This is because MSBuild is a multi-node system, and telemetry events generated on a worker node must be serialized and forwarded to the central node. This serialization is where the bug lies. If you can guarantee that MSBuild operates in a single-node mode (via /m:1 or similar) that may work as a workaround as well, but several high-impact use cases like azd deployment do not expose the configuration necessary to ensure this behavior.
Other reports:
- Dotnet Publish crashes with error 'MSB4166: Child node "##" exited prematurely. Shutting down.' actions/runner-images#10437
- Dotnet publish container regression in 8.0.400 sdk-container-builds#587
- [Broken Build]: MSB4166 after upgrading to SDK 8.0.400: 'Child node "2" exited prematurely' msbuild#10518
- Dotnet publish container regression in 8.0.400 #42719