Skip to content

Intermittent errors building CoreCLR on Windows ARM #104674

@eiriktsarpalis

Description

@eiriktsarpalis

When building CoreCLR on Windows ARM I sometimes get a Failed to create virtual memory for PCH error. I'm using a Snapdragon X Elite 78-100 CPU with 32 GB RAM and building the repo inside a Dev Drive. A few examples:

  FAILED: utilcode/CMakeFiles/utilcode_dac.dir/stgpool.cpp.obj
  C:\PROGRA~1\MICROS~3\2022\Preview\VC\Tools\MSVC\1441~1.340\bin\Hostx86\arm64\cl.exe  /nologo /TP -DDACCESS_COMPILE -DDEBUGGING_SUPPORTED -DDISABLE_C
  ONTRACTS -DFEATURE_BASICFREEZE -DFEATURE_CODE_VERSIONING -DFEATURE_COLLECTIBLE_TYPES -DFEATURE_COMINTEROP -DFEATURE_COMINTEROP_APARTMENT_SUPPORT -DF
  EATURE_COMINTEROP_UNMANAGED_ACTIVATION -DFEATURE_COMWRAPPERS -DFEATURE_CORECLR -DFEATURE_DEFAULT_INTERFACES -DFEATURE_EH_FUNCLETS -DFEATURE_EVENT_TR
  ACE -DFEATURE_HIJACK -DFEATURE_ICASTABLE -DFEATURE_IJW -DFEATURE_INSTANTIATINGSTUB_AS_IL -DFEATURE_INTEROP_DEBUGGING -DFEATURE_ISYM_READER -DFEATURE
  _MANUALLY_MANAGED_CARD_BUNDLES -DFEATURE_METADATA_UPDATER -DFEATURE_MULTICOREJIT -DFEATURE_MULTIREG_RETURN -DFEATURE_ON_STACK_REPLACEMENT -DFEATURE_
  PERFTRACING -DFEATURE_PGO -DFEATURE_PORTABLE_SHUFFLE_THUNKS -DFEATURE_READYTORUN -DFEATURE_REJIT -DFEATURE_REMAP_FUNCTION -DFEATURE_SPECIAL_USER_MOD
  E_APC -DFEATURE_STANDALONE_GC -DFEATURE_STUBS_AS_IL -DFEATURE_SVR_GC -DFEATURE_SYMDIFF -DFEATURE_TIERED_COMPILATION -DFEATURE_TYPEEQUIVALENCE -DFEAT
  URE_USE_ASM_GC_WRITE_BARRIERS -DFEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP -DHOST_64BIT -DHOST_ARM64 -DHOST_WINDOWS -DNDEBUG -DNOMINMAX -DPROFILIN
  G_SUPPORTED_DATA -DSELF_NO_HOST -DTARGET_64BIT -DTARGET_ARM64 -DTARGET_WINDOWS -DUNICODE -DURTBLDENV_FRIENDLY=Retail -DWIN32 -DWIN32_LEAN_AND_MEAN -
  DWINVER=0x0602 -D_CRT_SECURE_NO_WARNINGS -D_FILE_OFFSET_BITS=64 -D_SECURE_SCL=0 -D_TIME_BITS=64 -D_UNICODE -D_WIN32 -D_WIN32_WINNT=0x0602 -IC:\Users
  \eitsarpa\devel\dotnet\runtime-baseline\artifacts\obj\coreclr\windows.arm64.Release\utilcode -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\c
  oreclr\utilcode -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\native -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\native\inc -IC:\U
  sers\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\pal\prebuilt\inc -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\artifacts\obj -IC:\Users\
  eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\inc -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\debug\inc -IC:\Users\eitsarpa\d
  evel\dotnet\runtime-baseline\src\coreclr\debug\inc\arm64 -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\debug\inc\dump -IC:\Users\eit
  sarpa\devel\dotnet\runtime-baseline\src\coreclr\md\inc -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\classlibnative\bcltype -IC:\Use
  rs\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\classlibnative\inc -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\artifacts\obj\coreclr\win
  dows.arm64.Release\inc -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\hosts\inc -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src
  \coreclr\minipal -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\artifacts\obj\coreclr\windows.arm64.Release\inc\etw /DWIN32 /D_WINDOWS  /GR- /O2
  /Ob2 /DNDEBUG -MT /GL /Ox /EHa /nologo /W4 /WX /Oi /Oy- /Gm- /Zp8 /Gy /GS /fp:precise /FC /MP /Zm200 /Zc:strictStrings /Zc:wchar_t /Zc:inline /Zc:fo
  rScope /wd4065 /wd4100 /wd4127 /wd4131 /wd4189 /wd4200 /wd4201 /wd4206 /wd4239 /wd4245 /wd4291 /wd4310 /wd4324 /wd4366 /wd4456 /wd4457 /wd4458 /wd44
  59 /wd4463 /wd4505 /wd4702 /wd4706 /wd4733 /wd4815 /wd4838 /wd4918 /wd4960 /wd4961 /wd5105 /wd5205 /we4007 /we4013 /we4102 /we4551 /we4640 /we4806 /
  we4055 /we4146 /we4242 /we4244 /we4267 /we4302 /we4308 /we4509 /we4510 /we4532 /we4533 /we4610 /we4611 /we4700 /we4701 /we4703 /we4789 /we4995 /we49
  96 /w34092 /w34121 /w34125 /w34130 /w34132 /w34212 /w34530 /w35038 /w44177 /Zi /ZH:SHA_256 /source-charset:utf-8 /guard:cf /Zl /YuC:/Users/eitsarpa/
  devel/dotnet/runtime-baseline/artifacts/obj/coreclr/windows.arm64.Release/utilcode/CMakeFiles/utilcode_dac.dir/cmake_pch.hxx /FpC:/Users/eitsarpa/de
  vel/dotnet/runtime-baseline/artifacts/obj/coreclr/windows.arm64.Release/utilcode/CMakeFiles/utilcode_dac.dir/./cmake_pch.cxx.pch /FIC:/Users/eitsarp
  a/devel/dotnet/runtime-baseline/artifacts/obj/coreclr/windows.arm64.Release/utilcode/CMakeFiles/utilcode_dac.dir/cmake_pch.hxx /showIncludes /Foutil
  code\CMakeFiles\utilcode_dac.dir\stgpool.cpp.obj /Fdutilcode\CMakeFiles\utilcode_dac.dir\utilcode_dac.pdb /FS -c C:\Users\eitsarpa\devel\dotnet\runt
  ime-baseline\src\coreclr\utilcode\stgpool.cpp
  c1xx: error C3859: Failed to create virtual memory for PCH
  c1xx: note: PCH: Unable to get the requested block of memory
  c1xx: note: consider using /Fp to allow the compiler to reserve the memory early
  c1xx: note: please visit https://aka.ms/pch-help for more details
  c1xx: fatal error C1076: compiler limit: internal heap limit reached
  [1092/2405] Building CXX object jit\CMakeFiles\clrjit_unix_x64_arm64.dir\likelyclass.cpp.obj
  FAILED: jit/CMakeFiles/clrjit_unix_x64_arm64.dir/likelyclass.cpp.obj
  C:\PROGRA~1\MICROS~3\2022\Preview\VC\Tools\MSVC\1441~1.340\bin\Hostx86\arm64\cl.exe  /nologo /TP -DDEBUGGING_SUPPORTED -DDISABLE_CONTRACTS -DFEATURE
  _BASICFREEZE -DFEATURE_CODE_VERSIONING -DFEATURE_COLLECTIBLE_TYPES -DFEATURE_COMINTEROP -DFEATURE_COMINTEROP_APARTMENT_SUPPORT -DFEATURE_COMINTEROP_
  UNMANAGED_ACTIVATION -DFEATURE_COMWRAPPERS -DFEATURE_CORECLR -DFEATURE_DEFAULT_INTERFACES -DFEATURE_EVENT_TRACE -DFEATURE_HIJACK -DFEATURE_HW_INTRIN
  SICS -DFEATURE_ICASTABLE -DFEATURE_IJW -DFEATURE_INSTANTIATINGSTUB_AS_IL -DFEATURE_INTEROP_DEBUGGING -DFEATURE_ISYM_READER -DFEATURE_MANUALLY_MANAGE
  D_CARD_BUNDLES -DFEATURE_MASKED_HW_INTRINSICS -DFEATURE_METADATA_UPDATER -DFEATURE_MULTICOREJIT -DFEATURE_MULTIREG_RETURN -DFEATURE_NO_HOST -DFEATUR
  E_ON_STACK_REPLACEMENT -DFEATURE_PERFTRACING -DFEATURE_PGO -DFEATURE_PORTABLE_SHUFFLE_THUNKS -DFEATURE_PROFAPI_ATTACH_DETACH -DFEATURE_READYTORUN -D
  FEATURE_REJIT -DFEATURE_REMAP_FUNCTION -DFEATURE_SIMD -DFEATURE_SPECIAL_USER_MODE_APC -DFEATURE_STANDALONE_GC -DFEATURE_STUBS_AS_IL -DFEATURE_SVR_GC
   -DFEATURE_SYMDIFF -DFEATURE_TIERED_COMPILATION -DFEATURE_TYPEEQUIVALENCE -DFEATURE_USE_ASM_GC_WRITE_BARRIERS -DFEATURE_USE_SOFTWARE_WRITE_WATCH_FOR
  _GC_HEAP -DFX_VER_INTERNALNAME_STR=clrjit_unix_x64_arm64.dll -DHOST_64BIT -DHOST_ARM64 -DHOST_WINDOWS -DJIT_BUILD -DNDEBUG -DNOMINMAX -DPROFILING_SU
  PPORTED -DSELF_NO_HOST -DTARGET_64BIT -DTARGET_AMD64 -DTARGET_UNIX -DTARGET_UNIX_ANYOS -DUNICODE -DUNIX_AMD64_ABI -DURTBLDENV_FRIENDLY=Retail -DWIN3
  2 -DWIN32_LEAN_AND_MEAN -DWINVER=0x0602 -DWITH_NATIVE_PGO -D_CRT_SECURE_NO_WARNINGS -D_FILE_OFFSET_BITS=64 -D_SECURE_SCL=0 -D_TIME_BITS=64 -D_UNICOD
  E -D_WIN32 -D_WIN32_WINNT=0x0602 -Dclrjit_unix_x64_arm64_EXPORTS -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\artifacts\obj\coreclr\windows.arm
  64.Release\jit -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\jit -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\native -IC:\U
  sers\eitsarpa\devel\dotnet\runtime-baseline\src\native\inc -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\pal\prebuilt\inc -IC:\Users
  \eitsarpa\devel\dotnet\runtime-baseline\artifacts\obj -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\inc -IC:\Users\eitsarpa\devel\do
  tnet\runtime-baseline\src\coreclr\debug\inc -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\debug\inc\arm64 -IC:\Users\eitsarpa\devel\
  dotnet\runtime-baseline\src\coreclr\debug\inc\dump -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\md\inc -IC:\Users\eitsarpa\devel\do
  tnet\runtime-baseline\src\coreclr\classlibnative\bcltype -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\classlibnative\inc -IC:\Users
  \eitsarpa\devel\dotnet\runtime-baseline\artifacts\obj\coreclr\windows.arm64.Release\inc -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\corecl
  r\hosts\inc -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\minipal -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\artifacts\obj\co
  reclr\windows.arm64.Release\inc\etw -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\jit\.\jitstd -IC:\Users\eitsarpa\devel\dotnet\runt
  ime-baseline\src\coreclr\jit\..\inc /DWIN32 /D_WINDOWS  /GR- /O2 /Ob2 /DNDEBUG -MT /GL /Ox /EHa /nologo /W4 /WX /Oi /Oy- /Gm- /Zp8 /Gy /GS /fp:preci
  se /FC /MP /Zm200 /Zc:strictStrings /Zc:wchar_t /Zc:inline /Zc:forScope /wd4065 /wd4100 /wd4127 /wd4131 /wd4189 /wd4200 /wd4201 /wd4206 /wd4239 /wd4
  245 /wd4291 /wd4310 /wd4324 /wd4366 /wd4456 /wd4457 /wd4458 /wd4459 /wd4463 /wd4505 /wd4702 /wd4706 /wd4733 /wd4815 /wd4838 /wd4918 /wd4960 /wd4961
  /wd5105 /wd5205 /we4007 /we4013 /we4102 /we4551 /we4640 /we4806 /we4055 /we4146 /we4242 /we4244 /we4267 /we4302 /we4308 /we4509 /we4510 /we4532 /we4
  533 /we4610 /we4611 /we4700 /we4701 /we4703 /we4789 /we4995 /we4996 /w34092 /w34121 /w34125 /w34130 /w34132 /w34212 /w34530 /w35038 /w44177 /Zi /ZH:
  SHA_256 /source-charset:utf-8 /guard:cf /Zl /permissive- /YuC:/Users/eitsarpa/devel/dotnet/runtime-baseline/artifacts/obj/coreclr/windows.arm64.Rele
  ase/jit/CMakeFiles/clrjit_unix_x64_arm64.dir/cmake_pch.hxx /FpC:/Users/eitsarpa/devel/dotnet/runtime-baseline/artifacts/obj/coreclr/windows.arm64.Re
  lease/jit/CMakeFiles/clrjit_unix_x64_arm64.dir/./cmake_pch.cxx.pch /FIC:/Users/eitsarpa/devel/dotnet/runtime-baseline/artifacts/obj/coreclr/windows.
  arm64.Release/jit/CMakeFiles/clrjit_unix_x64_arm64.dir/cmake_pch.hxx /showIncludes /Fojit\CMakeFiles\clrjit_unix_x64_arm64.dir\likelyclass.cpp.obj /
  Fdjit\CMakeFiles\clrjit_unix_x64_arm64.dir\ /FS -c C:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\jit\likelyclass.cpp
  c1xx: error C3859: Failed to create virtual memory for PCH
  c1xx: note: PCH: Unable to get the requested block of memory
  c1xx: note: consider using /Fp to allow the compiler to reserve the memory early
  c1xx: note: please visit https://aka.ms/pch-help for more details
  c1xx: fatal error C1076: compiler limit: internal heap limit reached
  [892/2405] Building CXX object jit\CMakeFiles\clrjit.dir\codegenarm64.cpp.obj
  FAILED: jit/CMakeFiles/clrjit.dir/codegenarm64.cpp.obj
  C:\PROGRA~1\MICROS~3\2022\Preview\VC\Tools\MSVC\1441~1.340\bin\Hostx86\arm64\cl.exe  /nologo /TP -DDEBUGGING_SUPPORTED -DDISABLE_CONTRACTS -DFEATURE
  _BASICFREEZE -DFEATURE_CODE_VERSIONING -DFEATURE_COLLECTIBLE_TYPES -DFEATURE_COMINTEROP -DFEATURE_COMINTEROP_APARTMENT_SUPPORT -DFEATURE_COMINTEROP_
  UNMANAGED_ACTIVATION -DFEATURE_COMWRAPPERS -DFEATURE_CORECLR -DFEATURE_DEFAULT_INTERFACES -DFEATURE_EVENT_TRACE -DFEATURE_HIJACK -DFEATURE_HW_INTRIN
  SICS -DFEATURE_ICASTABLE -DFEATURE_IJW -DFEATURE_INSTANTIATINGSTUB_AS_IL -DFEATURE_INTEROP_DEBUGGING -DFEATURE_ISYM_READER -DFEATURE_MANUALLY_MANAGE
  D_CARD_BUNDLES -DFEATURE_MASKED_HW_INTRINSICS -DFEATURE_METADATA_UPDATER -DFEATURE_MULTICOREJIT -DFEATURE_MULTIREG_RETURN -DFEATURE_NO_HOST -DFEATUR
  E_ON_STACK_REPLACEMENT -DFEATURE_PERFTRACING -DFEATURE_PGO -DFEATURE_PORTABLE_SHUFFLE_THUNKS -DFEATURE_PROFAPI_ATTACH_DETACH -DFEATURE_READYTORUN -D
  FEATURE_REJIT -DFEATURE_REMAP_FUNCTION -DFEATURE_SIMD -DFEATURE_SPECIAL_USER_MODE_APC -DFEATURE_STANDALONE_GC -DFEATURE_STUBS_AS_IL -DFEATURE_SVR_GC
   -DFEATURE_SYMDIFF -DFEATURE_TIERED_COMPILATION -DFEATURE_TYPEEQUIVALENCE -DFEATURE_USE_ASM_GC_WRITE_BARRIERS -DFEATURE_USE_SOFTWARE_WRITE_WATCH_FOR
  _GC_HEAP -DFX_VER_INTERNALNAME_STR=clrjit.dll -DHOST_64BIT -DHOST_ARM64 -DHOST_WINDOWS -DJIT_BUILD -DNDEBUG -DNOMINMAX -DPROFILING_SUPPORTED -DSELF_
  NO_HOST -DTARGET_64BIT -DTARGET_ARM64 -DTARGET_WINDOWS -DUNICODE -DURTBLDENV_FRIENDLY=Retail -DWIN32 -DWIN32_LEAN_AND_MEAN -DWINVER=0x0602 -DWITH_NA
  TIVE_PGO -D_CRT_SECURE_NO_WARNINGS -D_FILE_OFFSET_BITS=64 -D_SECURE_SCL=0 -D_TIME_BITS=64 -D_UNICODE -D_WIN32 -D_WIN32_WINNT=0x0602 -Dclrjit_EXPORTS
   -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\artifacts\obj\coreclr\windows.arm64.Release\jit -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline
  \src\coreclr\jit -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\native -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\native\inc -IC:\
  Users\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\pal\prebuilt\inc -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\artifacts\obj -IC:\Users
  \eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\inc -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\debug\inc -IC:\Users\eitsarpa\
  devel\dotnet\runtime-baseline\src\coreclr\debug\inc\arm64 -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\debug\inc\dump -IC:\Users\ei
  tsarpa\devel\dotnet\runtime-baseline\src\coreclr\md\inc -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\classlibnative\bcltype -IC:\Us
  ers\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\classlibnative\inc -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\artifacts\obj\coreclr\wi
  ndows.arm64.Release\inc -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\hosts\inc -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\sr
  c\coreclr\minipal -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\artifacts\obj\coreclr\windows.arm64.Release\inc\etw -IC:\Users\eitsarpa\devel\do
  tnet\runtime-baseline\src\coreclr\jit\.\jitstd -IC:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\jit\..\inc /DWIN32 /D_WINDOWS  /GR- /O2
   /Ob2 /DNDEBUG -MT /GL /Ox /EHa /nologo /W4 /WX /Oi /Oy- /Gm- /Zp8 /Gy /GS /fp:precise /FC /MP /Zm200 /Zc:strictStrings /Zc:wchar_t /Zc:inline /Zc:f
  orScope /wd4065 /wd4100 /wd4127 /wd4131 /wd4189 /wd4200 /wd4201 /wd4206 /wd4239 /wd4245 /wd4291 /wd4310 /wd4324 /wd4366 /wd4456 /wd4457 /wd4458 /wd4
  459 /wd4463 /wd4505 /wd4702 /wd4706 /wd4733 /wd4815 /wd4838 /wd4918 /wd4960 /wd4961 /wd5105 /wd5205 /we4007 /we4013 /we4102 /we4551 /we4640 /we4806
  /we4055 /we4146 /we4242 /we4244 /we4267 /we4302 /we4308 /we4509 /we4510 /we4532 /we4533 /we4610 /we4611 /we4700 /we4701 /we4703 /we4789 /we4995 /we4
  996 /w34092 /w34121 /w34125 /w34130 /w34132 /w34212 /w34530 /w35038 /w44177 /Zi /ZH:SHA_256 /source-charset:utf-8 /guard:cf /Zl /permissive- /YuC:/U
  sers/eitsarpa/devel/dotnet/runtime-baseline/artifacts/obj/coreclr/windows.arm64.Release/jit/CMakeFiles/clrjit.dir/cmake_pch.hxx /FpC:/Users/eitsarpa
  /devel/dotnet/runtime-baseline/artifacts/obj/coreclr/windows.arm64.Release/jit/CMakeFiles/clrjit.dir/./cmake_pch.cxx.pch /FIC:/Users/eitsarpa/devel/
  dotnet/runtime-baseline/artifacts/obj/coreclr/windows.arm64.Release/jit/CMakeFiles/clrjit.dir/cmake_pch.hxx /showIncludes /Fojit\CMakeFiles\clrjit.d
  ir\codegenarm64.cpp.obj /Fdjit\CMakeFiles\clrjit.dir\ /FS -c C:\Users\eitsarpa\devel\dotnet\runtime-baseline\src\coreclr\jit\codegenarm64.cpp
  c1xx: error C3859: Failed to create virtual memory for PCH
  c1xx: note: PCH: Unable to get the requested block of memory
  c1xx: note: consider using /Fp to allow the compiler to reserve the memory early
  c1xx: note: please visit https://aka.ms/pch-help for more details
  c1xx: fatal error C1076: compiler limit: internal heap limit reached

cc @jkotas

Metadata

Metadata

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions