Skip to content

runtime build stuck when DOTNET_CLI_USE_MSBUILD_SERVER is set to 1 #8232

@smasher164

Description

@smasher164

Issue Description

On the latest (as of dotnet/runtime@41ae1ae) commit of the runtime, the build gets stuck indefinitely. I tried building five times, pulling in latest changes, and clearing all artifacts. The build displays and gets stuck at Microsoft.NETCore.App.Runtime -> which is in the packing stage. It went up to one hour for one of the executions, before I killed it.

Steps to Reproduce

  1. Ensure that DOTNET_CLI_USE_MSBUILD_SERVER is set to 1.
  2. .\build.cmd -allconfigurations

Unable to attach binlog when building with -bl since the build was cancelled early.

Expected Behavior

Build is successful.

Actual Behavior

Build is stuck on Microsoft.NETCore.App.Runtime ->.

Analysis

Steps taken to debug:

  1. Attached a debugger to the host process, which seemed to just be stuck in System.Threading code.
  2. Process tree just shows a bunch of MSBuild.dll invocations:
    process-tree
  3. Using procexp, I couldn't pinpoint a handle that referenced Microsoft.NETCore.Runtime.
  4. @hoyosjs suggested rebuilding with DOTNET_CLI_USE_MSBUILD_SERVER set to 0, and the build was successful.

Perhaps there's some deadlock in the msbuild server?

Versions & Configurations

  • On Windows 11 x86_64
  • dotnet msbuild --version prints
MSBuild version 17.4.0+18d5aef85 for .NET
17.4.0.51802
  • dotnet --version prints 7.0.100

/cc @rokonec

Metadata

Metadata

Assignees

No one assigned

    Labels

    author-respondedAuthor responded, needs response from dev team.bugstaleFor issues that haven't had activity in some time.triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions