Skip to content

Re-Bootstrap to .NET 11.0.100-preview.2.26117.112#4933

Closed
dotnet-bot wants to merge 1 commit intomainfrom
release-pr-11.0.100-preview.2.26117.112
Closed

Re-Bootstrap to .NET 11.0.100-preview.2.26117.112#4933
dotnet-bot wants to merge 1 commit intomainfrom
release-pr-11.0.100-preview.2.26117.112

Conversation

@dotnet-bot
Copy link
Collaborator

Re-Bootstrap .NET to 11.0.0-preview.2.26117.112 / 11.0.100-preview.2.26117.112.

Copy link
Member

@ViktorHofer ViktorHofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Memory leak most likely. @agocke is investigating. cc @jkotas

@agocke
Copy link
Member

agocke commented Feb 18, 2026

It's something in MSBuild. Trying to get a dump -- tricky when it's consuming all my memory.

@agocke
Copy link
Member

agocke commented Feb 18, 2026

Yeah, something has definitely changed with MSBuild memory use.

❯ MiB Mem :  32019.2 total,    194.4 free,  31137.1 used,   2706.5 buff/cache
  MiB Swap:   8192.0 total,     22.5 free,   8169.5 used.    882.0 avail Mem

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
  48454 andy      20   0   71.1g   3.8g  40560 S  22.9  12.1   0:36.90 /home/andy/code/vmr/.dotnet/dotnet /home/andy/cod+
  48462 andy      20   0   71.2g   3.8g  41788 S  26.8  12.1   0:39.18 /home/andy/code/vmr/.dotnet/dotnet /home/andy/cod+
  48461 andy      20   0   71.0g   3.5g  51364 S  36.3  11.1   0:39.31 /home/andy/code/vmr/.dotnet/dotnet /home/andy/cod+
  48459 andy      20   0   70.7g   3.3g  38344 S  25.2  10.4   0:37.61 /home/andy/code/vmr/.dotnet/dotnet /home/andy/cod+
  49523 andy      20   0   69.7g   3.1g  38588 S  23.5  10.1   0:32.14 /home/andy/code/vmr/.dotnet/dotnet /home/andy/cod+
  48456 andy      20   0   69.9g   2.8g  55572 S  44.1   9.0   0:38.30 /home/andy/code/vmr/.dotnet/dotnet /home/andy/cod+
  47687 andy      20   0   73.1g   2.8g  54964 S  44.8   8.9   2:19.79 /home/andy/code/vmr/.dotnet/dotnet msbuild /m /no+
  48359 andy      20   0   71.4g   2.4g  61544 S  22.5   7.6   1:59.89 /home/andy/code/vmr/.dotnet/dotnet msbuild /m /no+
  52306 andy      20   0  267.3g   1.0g 145388 S 520.3   3.3   4:03.11 /home/andy/code/vmr/.dotnet/sdk/11.0.100-preview.+
  52085 andy      20   0  262.7g 330696  70172 R  37.9   1.0   0:29.19 /home/andy/code/vmr/.d

@rainersigwald could you take a look? Those are the MSBuild worker processes.

@rainersigwald
Copy link
Member

Nothing is jumping out at me in dotnet/msbuild@6b7a28c...81815e5 as likely to cause a problem like that. Will try to get a local repro.

@rainersigwald
Copy link
Member

Behavior appears different on Windows vs Linux; my Windows build is failing but not crashing but my Linux build crashed the entire WSL VM?

@rainersigwald
Copy link
Member

Looks like it's not a single process going bananas but an accumulation of them--my initial WSL attempt crashed during runtime restore (as best as I can tell from logs) but continuing from that point got through runtime and then crashed while building sourcelink + efcore.

Could/should we try reverting MSBuild to the prior state to see if it's in MSBuild vs. runtime?

@agocke
Copy link
Member

agocke commented Feb 19, 2026

FWIW vbcscompiler seemed relatively similar to where it was before, so that's why I hypothesized MSBuild, not CLR.

@rainersigwald
Copy link
Member

Could/should we try reverting MSBuild to the prior state to see if it's in MSBuild vs. runtime?

Tried to simulate this on my machine by manually patching the MSBuild bits back to the LKG:

cp ~/src/lkg_sdk/sdk/11.0.100-preview.1.26104.118/{MSBuild,Microsoft.Build{,.{Framework,{Tasks,Utilities}.Core}}}.dll .dotnet/sdk/11.0.100-preview.2.26117.112/

And see very similar crash symptoms (during runtime restore). Since I keep seeing it during restore I'm going to try patching NuGet back next.

@rainersigwald
Copy link
Member

I'm going to try patching NuGet back next.

Still crashes with NuGet built at the commit from the old SDK.

I think that leaves SDK and runtime as the likeliest suspects?

@rainersigwald
Copy link
Member

Nope, spoke too soon, runtime failed with pinned-back NuGet but it didn't crash.

Duplicate project System.Threading [/home/raines/src/dotnet/src/runtime/Build.proj]
   at NuGet.ProjectModel.PackageSpecReferenceDependencyProvider..ctor(IEnumerable`1 externalProjects, IEnvironment
   at NuGet.ProjectModel.PackageSpecReferenceDependencyProvider..ctor(IEnumerable`1 externalProjects, ILogger logg
   at NuGet.Commands.RestoreCommand.ExecuteRestoreAsync(NuGetv3LocalRepository userPackageFolder, IReadOnlyList`1 

@rainersigwald
Copy link
Member

^ and that's because I built debug, I think. Trying with release nuget.

@rainersigwald
Copy link
Member

With just NuGet@1f8b2d8c release overlaid on the SDK I still get a crash, this one seems to be when restoring Roslyn and runtime (and doing various other things).

rg '\] Building' C:\Users\raines\Downloads\overall.log
42:  [19:36:41.49] Building arcade
61:  [19:39:05.70] Building arcade...done
107:  [19:39:06.64] Building razor
133:  [19:39:06.66] Building winforms
159:  [19:39:06.76] Building templating
175:  [19:39:06.77] Building command-line-api
211:  [19:39:06.77] Building cecil
237:  [19:39:06.79] Building symreader
263:  [19:39:06.80] Building deployment-tools
289:  [19:39:06.81] Building nuget-client
315:  [19:39:06.83] Building emsdk
341:  [19:39:06.84] Building msbuild
367:  [19:39:06.88] Building fsharp
393:  [19:39:06.90] Building diagnostics
419:  [19:39:06.99] Building xdt
445:  [19:39:22.56] Building cecil...done
449:  [19:39:36.04] Building xdt...done
453:  [19:39:45.76] Building deployment-tools...done
456:  [19:39:55.31] Building symreader...done
460:  [19:40:05.70] Building diagnostics...done
464:  [19:40:08.18] Building winforms...done
470:  [19:40:15.86] Building vstest
496:  [19:40:18.14] Building wpf
523:  [19:40:18.22] Building command-line-api...done
529:  [19:40:34.22] Building runtime
555:  [19:40:39.98] Building roslyn
581:  [19:41:50.04] Building templating...done
619:  [19:42:03.12] Building wpf...done
625:  [19:42:06.28] Building windowsdesktop
654:  [19:42:44.87] Building windowsdesktop...done

@agocke is there a good way to falsify CLR involvement here? Maybe a set of files I can patch in the SDK to keep that constant while updating everything else?

@agocke
Copy link
Member

agocke commented Feb 24, 2026

You mean like the shared framework? netcoreapp, basically?

@agocke
Copy link
Member

agocke commented Feb 24, 2026

Does this replicate when we build from source? Without using the LKG? That would let us bisect commit-by-commit, presumably.

AndyAyersMS added a commit to dotnet/runtime that referenced this pull request Feb 27, 2026
#124928)

This reverts commit 92741be.

This was causing excessive memory allocation during jitting (see
dotnet/dotnet#4933).
akoeplinger pushed a commit to dotnet/runtime that referenced this pull request Feb 27, 2026
…AP) + VN cache (#124132)" (#124955)

Backport of #124928 to release/11.0-preview2

/cc @akoeplinger @AndyAyersMS

## Customer Impact

- [ ] Customer reported
- [x] Found internally

This was causing excessive memory allocation during jitting (see
dotnet/dotnet#4933).
## Regression

- [X] Yes
- [ ] No

Caused by:
92741be

## Testing

Manual testing.

## Risk

Low. Reverts an earlier change.

[High/Medium/Low. Justify the indication by mentioning how risks were
measured and addressed.]

**IMPORTANT**: If this backport is for a servicing release, please
verify that:

- For .NET 8 and .NET 9: The PR target branch is `release/X.0-staging`,
not `release/X.0`.
- For .NET 10+: The PR target branch is `release/X.0` (no `-staging`
suffix).

## Package authoring no longer needed in .NET 9

**IMPORTANT**: Starting with .NET 9, you no longer need to edit a NuGet
package's csproj to enable building and bump the version.
Keep in mind that we still need package authoring in .NET 8 and older
versions.

Co-authored-by: Andy Ayers <andya@microsoft.com>
@ViktorHofer ViktorHofer closed this Mar 4, 2026
@ViktorHofer ViktorHofer deleted the release-pr-11.0.100-preview.2.26117.112 branch March 4, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants