Deadlock when coordinator, static-graph restore, and MT are all used
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
There is a deadlock when static-graph restore, MSBuild coordinator, and multithreaded mode are all used together.
```sh-session
❯ cd .\hangify\
❯ dotnet new console
The template "Console App" was created successfully.
Processing post-creation actions...
Restoring S:\play\hangify\hangify.csproj:
Restore succeeded.
❯ $env:MSBUILDUSECOORDINATOR=1
❯ msbuild -t:Restore -p:RestoreUseStaticGraphEvaluation=true -mt -m
MSBuild version 18.12.0-1.26454.5+fcb368d88 for .NET Framework
Build started 9/8/2026 4:44:00 PM.
Coordinator granted 32 node(s) for this build.
1>Project "S:\play\hangify\hangify.csproj" on node 2 (Restore target(s)).
1>Restore:
Determining projects to restore...
Waiting for coordinator to grant build resources...
```
From debugging, it looks like the environment variable `MSBUILDCOORDINATORGRANTID` is set in the `BuildManager` but isn't in the environment inherited in the `NuGet.Build.Tasks.Console.exe` process that is spawned by static-graph restore, so the requested grant isn't considered nested and thus blocks.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.