dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.17k stars 4.72k forks source link

Test failure JIT/jit64/opt/cse/HugeArray1/HugeArray1.cmd #85747

Open v-wenyuxu opened 1 year ago

v-wenyuxu commented 1 year ago

Failed in: runtime-coreclr outerloop 20230503.8

Failed tests:

R2R-CG2 windows x86 Checked @ Windows.10.Amd64.Open
    - JIT/jit64/opt/cse/HugeArray1/HugeArray1.cmd

Error message:

 Fatal error. 0xC0000005
   at Internal.JitInterface.CorInfoImpl.JitCompileMethod(IntPtr ByRef, IntPtr, IntPtr, IntPtr, Internal.JitInterface.CORINFO_METHOD_INFO ByRef, UInt32, IntPtr ByRef, UInt32 ByRef)
   at Internal.JitInterface.CorInfoImpl.CompileMethodInternal(ILCompiler.DependencyAnalysis.IMethodNode, Internal.IL.MethodIL)
   at Internal.JitInterface.CorInfoImpl.CompileMethod(ILCompiler.DependencyAnalysis.ReadyToRun.MethodWithGCInfo, ILCompiler.Logger)
   at ILCompiler.ReadyToRunCodegenCompilation+<>c__DisplayClass46_0.<ComputeDependencyNodeDependencies>g__CompileOneMethod|5(ILCompiler.DependencyAnalysisFramework.DependencyNodeCore`1<ILCompiler.DependencyAnalysis.NodeFactory>, Int32)
   at ILCompiler.ReadyToRunCodegenCompilation+<>c__DisplayClass46_0.<ComputeDependencyNodeDependencies>g__CompileOnThread|4(Int32)
   at ILCompiler.ReadyToRunCodegenCompilation+<>c__DisplayClass46_0.<ComputeDependencyNodeDependencies>g__CompilationThread|3(System.Object)
   at System.Threading.Thread.StartCallback()

Return code:      1
Raw output file:      C:hwBD450A02wB2680959uploadsoptcseHugeArray1output.txt
Raw output:
BEGIN EXECUTION
HugeArray1.dll
        1 file(s) copied.
 2:50:57.39
Response file: C:hwBD450A02wB2680959eJITjit64optcseHugeArray1HugeArray1.dll.rsp
C:hwBD450A02wB2680959eJITjit64optcseHugeArray1IL-CG2HugeArray1.dll
-o:C:hwBD450A02wB2680959eJITjit64optcseHugeArray1HugeArray1.dll
--targetarch:x86
--targetos:windows
--verify-type-and-field-layout
--method-layout:random
-r:C:hwBD450A02pSystem.*.dll
-r:C:hwBD450A02pMicrosoft.*.dll
-r:C:hwBD450A02p\xunit.*.dll
-r:C:hwBD450A02pmscorlib.dll
-r:C:hwBD450A02p
etstandard.dll
-O
" "dotnet" "C:hwBD450A02pcrossgen2crossgen2.dll" @"C:hwBD450A02wB2680959eJITjit64optcseHugeArray1HugeArray1.dll.rsp"   -r:C:hwBD450A02wB2680959eJITjit64jit64_othersIL-CG2*.dll  -r:C:hwBD450A02wB2680959eJITjit64optcseHugeArray1IL-CG2*.dll"
 2:52:11.83
Crossgen2 failed with exitcode - -1073741819
Test failed. Trying to see if dump file was created in C:cores since 5/4/2023 2:50:57 AM
Processing C:coresdotnet.exe.33712.dmp
Invoking: C:Program Files (x86)Windows Kits10Debuggers†cdb.exe -c "$<C:hwBD450A02       mpnqsnpb.tmp" -z "C:coresdotnet.exe.33712.dmp"
stdout: 
Microsoft (R) Windows Debugger Version 10.0.18362.1 X86
Copyright (c) Microsoft Corporation. All rights reserved.

Loading Dump File [C:coresdotnet.exe.33712.dmp]
User Mini Dump File with Full Memory: Only application data is available

************* Path validation summary **************
Response                         Time (ms)     Location
OK                                             C:hwBD450A02pPDB
Symbol search path is: C:hwBD450A02pPDB
Executable search path is: 
Windows 10 Version 14393 MP (4 procs) Free x86 compatible
Product: Server, suite: TerminalServer DataCenter SingleUserTS
10.0.14393.5125 (rs1_release.220429-1732)
Machine Name:
Debug session time: Thu May  4 02:52:08.000 2023 (UTC + 0:00)
System Uptime: 0 days 2:34:55.798
Process Uptime: 0 days 0:01:11.000
...............................................................

************* Symbol Loading Error Summary **************
Module name            Error
ntdll                  The system cannot find the file specified

You can troubleshoot most symbol related issues by turning on symbol loading diagnostics (!sym noisy) and repeating the command that caused symbols to be loaded.
You should also verify that your symbol search path (.sympath) is correct.
This dump file has an exception of interest stored in it.
The stored exception information can be accessed via .ecxr.
(83b0.3bd0): Access violation - code c0000005 (first/second chance not available)
For analysis of this file, run !analyze -v
eax=30ebdb10 ebx=6f32d6c2 ecx=00000000 edx=c0000005 esi=00000000 edi=c0000005
eip=6f3c4cdd esp=30ebda9c ebp=30ebdde8 iopl=0         nv up ei pl nz ac pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000216
coreclr!GetCLRRuntimeHost+0x3e2ad:
6f3c4cdd 8d442420        lea   

Stack trace:

    at Xunit.Assert.True(Nullable`1 condition, String userMessage) in /_/src/xunit.assert/Asserts/BooleanAsserts.cs:line 132
   at TestLibrary.OutOfProcessTest.RunOutOfProcessTest(String basePath, String assemblyPath)
   at Program.<<Main>$>g__TestExecutor4|0_3(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass0_0&)
BruceForstall commented 1 year ago

Failed again:

https://dev.azure.com/dnceng-public/public/_build/results?buildId=267008&view=ms.vss-test-web.build-test-results-tab&runId=5258748&resultId=114432&paneView=debug

Maybe a different failure mode? Out of memory:

10:58:58.263 Running test: JIT/jit64/opt/cse/HugeArray1/HugeArray1.cmd
Unhandled exception. ILCompiler.CodeGenerationFailedException: Code generation failed for method '[HugeArray1]CseTest.Test_Main.TestEntryPoint()'
 ---> System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
   at System.Runtime.InteropServices.Marshal.AllocHGlobal(IntPtr cb)
   at Internal.JitInterface.CorInfoImpl._allocateArray(IntPtr thisHandle, IntPtr* ppException, UIntPtr cBytes) in /_/src/coreclr/tools/Common/JitInterface/CorInfoImpl_generated.cs:line 1602
   --- End of inner exception stack trace ---
   at Internal.JitInterface.CorInfoImpl.CompileMethodInternal(IMethodNode methodCodeNodeNeedingCode, MethodIL methodIL) in /_/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs:line 383
   at Internal.JitInterface.CorInfoImpl.CompileMethod(MethodWithGCInfo methodCodeNodeNeedingCode, Logger logger) in /_/src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs:line 659
   at ILCompiler.ReadyToRunCodegenCompilation.<>c__DisplayClass46_0.<ComputeDependencyNodeDependencies>g__CompileOneMethod|5(DependencyNodeCore`1 dependency, Int32 compileThreadId) in /_/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs:line 841
   at ILCompiler.ReadyToRunCodegenCompilation.<>c__DisplayClass46_0.<ComputeDependencyNodeDependencies>g__CompileOnThread|4(Int32 compilationThreadId) in /_/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs:line 775
   at ILCompiler.ReadyToRunCodegenCompilation.<>c__DisplayClass46_0.<ComputeDependencyNodeDependencies>g__CompilationThread|3(Object objThreadId) in /_/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs:line 753
   at System.Threading.Thread.StartCallback()
BruceForstall commented 1 year ago

@dotnet/crossgen-contrib @dotnet/jit-contrib

trylek commented 1 year ago

We can try another pass to see how to reduce Crossgen2 memory footprint but there will always be a limit to what we can compile within the 32-bit x86 address space.

BruceForstall commented 1 year ago

The failures seem pretty pervasive in recent pipeline runs:

https://dev.azure.com/dnceng-public/public/_build/results?buildId=267865&view=ms.vss-test-web.build-test-results-tab https://dev.azure.com/dnceng-public/public/_build/results?buildId=267863&view=ms.vss-test-web.build-test-results-tab