Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dotnet Publish crashes with error 'MSB4166: Child node "##" exited prematurely. Shutting down.' #10437

Closed
2 of 13 tasks
lancelind opened this issue Aug 13, 2024 · 15 comments
Closed
2 of 13 tasks
Assignees
Labels
bug report external investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Ubuntu

Comments

@lancelind
Copy link

Description

Starting with release 2.319.0 we are consistently seeing the following process crash when running dotnet publish.

MSBUILD : error MSB4166: Child node "xx" exited prematurely. Shutting down. Diagnostic information may be found in files in "/tmp/MSBuildTemprunner/" and will be named MSBuild_*.failure.txt. This location can be changed by setting the MSBUILDDEBUGPATH environment variable to a different directory.
MSBUILD : error MSB4166: /tmp/MSBuildTemprunner/MSBuild_pid-3214_c9915635ac784de6a0cbd7762603f60a.failure.txt:
MSBUILD : error MSB4166: UNHANDLED EXCEPTIONS FROM PROCESS 3214:
MSBUILD : error MSB4166: =====================
MSBUILD : error MSB4166: 08/13/2024 17:39:05
MSBUILD : error MSB4166: System.ArgumentNullException: Value cannot be null. (Parameter 'value')
MSBUILD : error MSB4166: at System.ArgumentNullException.Throw(String paramName)
MSBUILD : error MSB4166: at System.IO.BinaryWriter.Write(String value)
MSBUILD : error MSB4166: at Microsoft.Build.Framework.TelemetryEventArgs.WriteToStream(BinaryWriter writer)
MSBUILD : error MSB4166: at Microsoft.Build.Shared.LogMessagePacketBase.WriteToStream(ITranslator translator)
MSBUILD : error MSB4166: at Microsoft.Build.Shared.LogMessagePacketBase.Translate(ITranslator translator)
MSBUILD : error MSB4166: at Microsoft.Build.BackEnd.NodeEndpointOutOfProcBase.RunReadLoop(Stream localReadPipe, Stream localWritePipe, ConcurrentQueue`1 localPacketQueue, AutoResetEvent localPacketAvailable, AutoResetEvent localTerminatePacketPump)
MSBUILD : error MSB4166: ===================
MSBUILD : error MSB4166:
MSBUILD : error MSB4166:

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

Image version 2.319.0.

Is it regression?

Yes. 2.318.0 did not have this version.

Expected behavior

Successful completion of dotnet publish

Actual behavior

dotnet.exe process crash

Repro steps

  • Install 2.319.0 on our runners
  • With a dotnet 8.0 project, run dotnet publish
@bgrainger
Copy link

We're getting this exception on some of our self-hosted runners, but not all. It seems to only happen with SDK 8.0.400 but not 8.0.304; try using a global.json to explicitly use the older SDK:

{
  "sdk": {
    "version": "8.0.304"
  }
}

(That is, I suspect it's an issue in the SDK, not in https://github.com/actions/runner.)

@bgrainger
Copy link

Since this appears to be happening from telemetry, try setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1.

@joacar
Copy link

joacar commented Aug 14, 2024

This happens in Azure Devops with self-hosted agents as well. Agent version 2.206.1 running Linux

Update: Setting the environment resolves the issue

Update2: Other applications can build and published using 8.0.400 on the very same agent..

@jculverwell
Copy link

Getting the same issue, looks like something broke today. Github action is failing whilst building a .net 8.0 C# project....

MSBUILD : error MSB4166: Child node "2" exited prematurely. Shutting down. Diagnostic information may be found in files in "/tmp/MSBuildTemprunner/" and will be named MSBuild_*.failure.txt. This location can be changed by setting the MSBUILDDEBUGPATH environment variable to a different directory.
MSBUILD : error MSB4166: /tmp/MSBuildTemprunner/MSBuild_pid-2168_97623965aa194746ac7549b455b86573.failure.txt:
MSBUILD : error MSB4166: UNHANDLED EXCEPTIONS FROM PROCESS 2168:
MSBUILD : error MSB4166: =====================
MSBUILD : error MSB4166: 08/14/2024 07:07:10
MSBUILD : error MSB4166: System.ArgumentNullException: Value cannot be null. (Parameter 'value')
MSBUILD : error MSB4166: at System.ArgumentNullException.Throw(String paramName)
MSBUILD : error MSB4166: at System.IO.BinaryWriter.Write(String value)
MSBUILD : error MSB4166: at Microsoft.Build.Framework.TelemetryEventArgs.WriteToStream(BinaryWriter writer)
MSBUILD : error MSB4166: at Microsoft.Build.Shared.LogMessagePacketBase.WriteToStream(ITranslator translator)
MSBUILD : error MSB4166: at Microsoft.Build.Shared.LogMessagePacketBase.Translate(ITranslator translator)
MSBUILD : error MSB4166: at Microsoft.Build.BackEnd.NodeEndpointOutOfProcBase.RunReadLoop(Stream localReadPipe, Stream localWritePipe, ConcurrentQueue`1 localPacketQueue, AutoResetEvent localPacketAvailable, AutoResetEvent localTerminatePacketPump)
MSBUILD : error MSB4166: ===================
MSBUILD : error MSB4166:
MSBUILD : error MSB4166:
Error: Process completed with exit code 1.

@jculverwell
Copy link

Can also confirm that adding the ENV variable (DOTNET_CLI_TELEMETRY_OPTOUT: 1) to the github action fixed the issue

@hemanthmanga hemanthmanga added investigate Collect additional information, like space on disk, other tool incompatibilities etc. external labels Aug 14, 2024
@hemanthmanga
Copy link
Contributor

@lancelind We are currently investigating the issue and will provide an update as soon as we have more information. Thank you.

@baronfel
Copy link

baronfel commented Aug 14, 2024

This is a dotnet SDK regression - we will have a 401 hotfix SDK out in the next day or so that fixes this. In the meantime the most consistent workaround is using the latest 30x SDK instead. Details about the issue can be found at dotnet/sdk#42719 (comment).

@onionhammer
Copy link

This started happening for me as well

@baronfel
Copy link

The 8.0.401 hotfix SDK has been released on all channels and contains a fix for this issue.

@ivan-84
Copy link

ivan-84 commented Aug 16, 2024

Apparently the same regression has been introduced in .NET 9 preview (9.0.100-preview.7.24407.12) which is now installed with the latest VS, because even after installing 8.0.401 whenever I'm trying to run azd deploy MyService it fails with the error above. When running azd deploy with --debug flag I can see that it appears to be using the latest available .NET version which in my case is the .NET 9 preview. The only way how I could make it work (setting DOTNET_CLI_TELEMETRY_OPTOUT to 1 did nothing) is to add in the root folder of my solution "global.json" with this content:

{
    "sdk": {
        "version": "8.0.401"
    }
}

@hemanthmanga
Copy link
Contributor

Hi @lancelind, Could you please confirm if the issue is fixed as external team SDK have provided workarounds Like below :

try using a global.json to explicitly use the older SDK:

{
  "sdk": {
    "version": "8.0.304"
  }
}

(That is, I suspect it's an issue in the SDK, not in https://github.com/actions/runner.)

Thank you.

@joacar
Copy link

joacar commented Aug 31, 2024 via email

@hemanthmanga
Copy link
Contributor

Hi @lancelind, Since we haven't heard back, we'll assume your issue is resolved and will close this issue, Thanks.

@idigra
Copy link

idigra commented Oct 14, 2024

@hemanthmanga I still see the issue sporadically on various version of .NET 8 (I'm on latest 403 and tried to reduce to 304 - reproduced on both).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report external investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Ubuntu
Projects
None yet
Development

No branches or pull requests

10 participants