Summary
crossgen2 crashes with an AccessViolationException while processing PGO instrumentation data during the SDK crossgen (ReadyToRun) layout step on win-x86. The crash occurs in ILCompiler.ProfileDataManager.GetAllowSynthesis and appears to be a threading/memory corruption issue in the PGO data path.
Crash Stack
Process terminated. Access Violation: Attempted to read or write protected memory.
at ILCompiler.ProfileDataManager.GetAllowSynthesis(Compilation, MethodDesc, Boolean&) + 0x31
at Internal.JitInterface.CorInfoImpl.getPgoInstrumentationResults(...) + 0xab
at Internal.JitInterface.CorInfoImpl._getPgoInstrumentationResults(...) + 0x60
at Internal.JitInterface.CorInfoImpl.JitCompileMethod(...) + 0xc5
at Internal.JitInterface.CorInfoImpl.CompileMethodInternal(IMethodNode, MethodIL) + 0xc4
at Internal.JitInterface.CorInfoImpl.CompileMethod(MethodWithGCInfo, Logger) + 0x3f2
at ILCompiler.ReadyToRunCodegenCompilation.<>c__DisplayClass50_0.<ComputeDependencyNodeDependencies>g__CompileOneMethod|5(...) + 0x37e
at ILCompiler.ReadyToRunCodegenCompilation.<>c__DisplayClass50_0.<ComputeDependencyNodeDependencies>g__CompileOnThread|4(Int32) + 0x37
at ILCompiler.ReadyToRunCodegenCompilation.<>c__DisplayClass50_0.<ComputeDependencyNodeDependencies>g__CompilationThread|3(Object) + 0x43
at System.Threading.Thread.StartThread(IntPtr)
at System.Threading.Thread.ThreadEntryPoint(IntPtr)
Build
Analysis
- The crash is in crossgen2's PGO data processing path during multi-threaded R2R compilation.
CompileOnThread → CompileOneMethod → getPgoInstrumentationResults → GetAllowSynthesis suggests multiple compilation threads reading ProfileDataManager state.
- The AV at
GetAllowSynthesis+0x31 likely dereferences a null or corrupt pointer in PGO schema data.
- x86-only — this targets
win-x86 (32-bit). Could be pointer truncation, address space pressure, or an x86-specific codegen bug.
- Non-deterministic — single occurrence in this window but possibly related to a parallel IBCMerge PGO crash on internal builds (dotnet/dotnet#4138), also x86-only.
Possibly Related
dotnet/dotnet#4138 — IBCMerge BadImageFormatException processing PGO profile data on Windows_Pgo_x86. Different tool (IBCMerge vs crossgen2) but same class of problem: PGO data corruption/crash isolated to x86 platforms.
Summary
crossgen2 crashes with an
AccessViolationExceptionwhile processing PGO instrumentation data during the SDK crossgen (ReadyToRun) layout step onwin-x86. The crash occurs inILCompiler.ProfileDataManager.GetAllowSynthesisand appears to be a threading/memory corruption issue in the PGO data path.Crash Stack
Build
Crossgen.targets:171)Analysis
CompileOnThread→CompileOneMethod→getPgoInstrumentationResults→GetAllowSynthesissuggests multiple compilation threads readingProfileDataManagerstate.GetAllowSynthesis+0x31likely dereferences a null or corrupt pointer in PGO schema data.win-x86(32-bit). Could be pointer truncation, address space pressure, or an x86-specific codegen bug.Possibly Related
dotnet/dotnet#4138 — IBCMerge
BadImageFormatExceptionprocessing PGO profile data onWindows_Pgo_x86. Different tool (IBCMerge vs crossgen2) but same class of problem: PGO data corruption/crash isolated to x86 platforms.