runtime: `JIT/jit64/opt/rngchk/RngchkStress2.cs` failing to build with `error CS8078: An expression is too long or complex to compile`

Failing on osx-x64 Release AllSubsets_Mono_Minijit_RuntimeTests minijit:

Failing build:

/Users/runner/work/1/s/src/tests/JIT/jit64/opt/rngchk/RngchkStress2.cs(527,796): error CS8078: An expression is too long or complex to compile [/Users/runner/work/1/s/src/tests/JIT/jit64/opt/rngchk/RngchkStress2_o.csproj] [/Users/runner/work/1/s/src/tests/build.proj]
##[error]src/tests/JIT/jit64/opt/rngchk/RngchkStress2.cs(527,796): error CS8078: An expression is too long or complex to compile [/Users/runner/work/1/s/src/tests/JIT/jit64/opt/rngchk/RngchkStress2_o.csproj]

This was hit on https://github.com/dotnet/runtime/pull/87522 .

{
  "ErrorMessage": "An expression is too long or complex to compile",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: πŸ”Ž https://dev.azure.com/dnceng-public/public/_build/results?buildId=315357 Result validation: βœ… Known issue matched with the provided build.

Report

Build Definition Step Name Console log Pull Request
533692 dotnet/runtime Build Tests Log dotnet/runtime#95758
532325 dotnet/runtime Build Tests Log dotnet/runtime#95758
531205 dotnet/runtime Build Tests Log dotnet/runtime#95758
528402 dotnet/runtime Build Tests Log

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 4

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 46 (45 by maintainers)

Commits related to this issue

Most upvoted comments

I think .Net should just guarantee some minimum stack size (like 2MB) on all platforms for consistency.

@jaredpar I was definitely not suggesting to lower the current limit, we now have it set to 1.5MB, my point was whether we should move it to 4MB or just say 2MB.

Guessing Roslyn is not alone here.

Agreed, but I would expect this to be a much smaller class of applications than applications that use the thread pool. In any case the to idea make the stack limits consistent across platforms seems good to me.

I would like to understand what exactly has changed since we are seeing this while building a number of different tests, even some innocent looking ones. I hit this while building https://github.com/dotnet/runtime/blob/261e3a40cd9faa240da82aacd8d821469703e339/src/tests/JIT/Methodical/VT/etc/ctor_recurse.cs locally today, and I have seen it on https://github.com/dotnet/runtime/blob/1aded3f65f6fd13a60eb43c191f4ea8aa27bf5dc/src/tests/JIT/Regression/JitBlue/Runtime_85602/Runtime_85602.cs in CI recently as well. These do not look super complex, so it’s a weird coincidence if nothing major has changed.

This was hit on https://github.com/dotnet/runtime/pull/87522 .

This PR upgraded the .NET SDK used to build the repo to .NET 8 Preview 5.

This intermittent build error is likely caused by tiered PGO instrumentation that was enabled in .NET 8 Preview 5 by default. The PGO instrumentation may cause program to use different amount of stack space from run to run.