Skip to content

Access violation (0xC0000005) in clrjit.dll #122759

@twoelfer

Description

@twoelfer

Description

Access violation (0xC0000005) in clrjit.dll during background JIT compilation in .NET 10.0.1.

The crash occurs consistently in Release builds but NOT in Debug builds. It happens in the ".NET Tiered Compilation Worker" thread during method optimization.

Exception Details:

  • Exception Type: 0xC0000005 (Access Violation)
  • Location: clrjit.dll!00007ffb8ea768b3
  • Memory Address: 0x0000000000000008 (null pointer + 8 offset)
  • Thread: .NET Tiered Compilation Worker

Reproduction Steps

  1. Build large Windows Forms application with C++/CLI interop (native calculation libraries)
  2. Target net10.0-windows10.0.19041.0
  3. Build in Release configuration
  4. Run application
  5. Crash occurs during background JIT recompilation (tiered compilation)

Expected behavior

Application should run without crashing. Debug builds work fine.

Actual behavior

Random access violation in clrjit.dll during background compilation.

Regression?

Unknown if this worked in previous .NET versions. (I am currently porting our net framework 4.8 application to net core.)

Known Workarounds

❌ Disabling TieredCompilation - Does NOT help
❌ Setting Optimize=false - Does NOT help
❌ Adding DebugSymbols=true - Does NOT help

Configuration

Operating System:

  • Windows 11 v25H2 Build 26200.7462

Architecture:

  • x64

.NET SDK Version:
.NET SDK:
Version: 10.0.101
Commit: fad253f51b
Workload version: 10.0.100-manifests.9f71effe
MSBuild version: 18.0.6+fad253f51

Laufzeitumgebung:
OS Name: Windows
OS Version: 10.0.26200
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.101\

Installierte .NET-Workloads:
Es sind keine installierten Workloads zum Anzeigen vorhanden.
Für die Verwendung von workload sets bei der Installation neuer Manifeste konfiguriert.
Es sind keine Workloadsätze installiert. Führen Sie „dotnet workload restore“ aus, um einen Workloadsatz zu installieren.

Host:
Version: 10.0.1
Architecture: x64
Commit: fad253f51b

.NET SDKs installed:
8.0.416 [C:\Program Files\dotnet\sdk]
9.0.308 [C:\Program Files\dotnet\sdk]
10.0.101 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.22 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.22 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download
PS C:\Users\twoel>

Other information

  • Application uses extensive C++/CLI interop with native calculation libraries
  • Multiple native DLLs: kernel.native.calculations.*.dll
  • Crash happens after application loads many assemblies
  • Last assemblies loaded before crash: concrete design calculation modules

Call Stack:
[1] clrjit.dll!00007ffb8ea768b3 [2] clrjit.dll!00007ffb8ea73feb [3] clrjit.dll!00007ffb8ea7592c [4] clrjit.dll!00007ffb8ea757c8 [5] clrjit.dll!00007ffb8ea89587 [6] clrjit.dll!00007ffb8e9b25f7 [7] clrjit.dll!00007ffb8e9f5233 [8] clrjit.dll!00007ffb8e9f6d20 [9] clrjit.dll!00007ffb8e9f4def [10] kernel32.dll!00007ffcb47ae8d7

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIuntriagedNew issue has not been triaged by the area owner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions