dotnet / runtime

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

Test Failed: NETClient COM tests fail on Windows/arm #11360

Open echesakov opened 5 years ago

echesakov commented 5 years ago

The following tests were disabled in and

janvorli commented 5 years ago

These tests now work fine on my local Windows ARM64 device. I just had to patch registry as follows: Under HKEY_LOCAL_MACHINE\SOFTWARE\WowAA32Node\Microsoft\Windows NT\CurrentVersion, add REG_SZ InstallationType with value client. It was missing it in the wow node while it was present in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion. I've found it by stepping through the code in Windows.

BruceForstall commented 5 years ago

@AaronRobinsonMSFT Is it correct that this "Future", not "3.0"?

AaronRobinsonMSFT commented 5 years ago

@BruceForstall Unclear. I am not sure how important this scenario is for 3.0. cc @jeffschwMSFT.

RussKeldorph commented 5 years ago

This is now blocking the official build.

https://mc.dot.net/#/product/netcore/master/source/official~2Fdotnet~2Fcoreclr~2Frefs~2Fheads~2Fmaster/type/test~2Ffunctional~2Fcli~2F/build/20190521.72/workItem/Interop/analysis/xunit/Interop_WinRT._NETClients_Primitives_NETClientPrimitives_NETClientPrimitives_~2F_NETClients_Primitives_NETClientPrimitives_NETClientPrimitives_cmd

Unhandled Exception: System.Exception: Invalid RegGetValueW result: 0x2 type: RegNone
   at TestLibrary.Utilities.GetRegistryValueString(String key, String value) in F:\\workspace\\_work\\1\\s\\tests\\src\\Common\\CoreCLRTestLibrary\\Utilities.cs:line 247
   at TestLibrary.Utilities.GetInstallationTypeForWindows() in F:\\workspace\\_work\\1\\s\\tests\\src\\Common\\CoreCLRTestLibrary\\Utilities.cs:line 193
   at TestLibrary.Utilities.GetInstallationType() in F:\\workspace\\_work\\1\\s\\tests\\src\\Common\\CoreCLRTestLibrary\\Utilities.cs:line 181
   at TestLibrary.Utilities.get_IsWindowsNanoServer() in F:\\workspace\\_work\\1\\s\\tests\\src\\Common\\CoreCLRTestLibrary\\Utilities.cs:line 71
   at TestLibrary.Utilities.get_IsWinRTSupported() in F:\\workspace\\_work\\1\\s\\tests\\src\\Common\\CoreCLRTestLibrary\\Utilities.cs:line 70
   at NetClient.Program.Main(String[] args) in F:\\workspace\\_work\\1\\s\\tests\\src\\Interop\\WinRT\\NETClients\\Primitives\\Program.cs:line 13

@jkoritzinsky @AaronRobinsonMSFT

jkoritzinsky commented 5 years ago

The official build break has been fixed, moving back to Future.

JulieLeeMSFT commented 1 year ago

Failed again in run: runtime-coreclr outerloop 20230121.3

Failed tests:

R2R-CG2 windows arm Checked no_tiered_compilation @ Windows.11.Arm64.Open
  - Interop\\COM\\NETClients\\Events\\NETClientEvents\\NETClientEvents.cmd

Error message:

Fatal error. Internal CLR error. (0x80131506)
at System.GC.AllocateNewArray(IntPtr, Int32, GC_ALLOC_FLAGS)
at System.Text.StringBuilder.ExpandByABlock(Int32)
at System.Text.StringBuilder.Append(Char, Int32)
at System.Text.StringBuilder.Append(Char)
at System.Diagnostics.StackTrace.ToString(TraceFormat, System.Text.StringBuilder)
at System.Diagnostics.StackTrace.ToString(TraceFormat)
at System.Exception.get_StackTrace()
at System.Exception.ToString()
at Internal.JitInterface.CorInfoImpl.AllocException(System.Exception)
at Internal.JitInterface.CorInfoImpl._resolveToken(IntPtr, IntPtr*, Internal.JitInterface.CORINFO_RESOLVED_TOKEN*)
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:\h\w\B65C09A6\w\A1F30920\uploads\Reports\Interop.COM\NETClients\Events\NETClientEvents\NETClientEvents.output.txt
Raw output:
BEGIN EXECUTION
COMNativeServer.dll
NETClientEvents.dll
TestLibrary.dll
3 file(s) copied.
3:04:07.09
Response file: C:\h\w\B65C09A6\w\A1F30920\e\Interop\COM\NETClients\Events\NETClientEvents\COMNativeServer.dll.rsp
C:\h\w\B65C09A6\w\A1F30920\e\Interop\COM\NETClients\Events\NETClientEvents\IL-CG2\COMNativeServer.dll
-o:C:\h\w\B65C09A6\w\A1F30920\e\Interop\COM\NETClients\Events\NETClientEvents\COMNativeServer.dll
--targetarch:arm
--targetos:windows
--verify-type-and-field-layout
--method-layout:random
-r:C:\h\w\B65C09A6\p\System..dll
-r:C:\h\w\B65C09A6\p\Microsoft..dll
-r:C:\h\w\B65C09A6\p\mscorlib.dll
-r:C:\h\w\B65C09A6\p\netstandard.dll
-O
" "dotnet" "C:\h\w\B65C09A6\p\crossgen2\crossgen2.dll" @"C:\h\w\B65C09A6\w\A1F30920\e\Interop\COM\NETClients\Events\NETClientEvents\COMNativeServer.dll.rsp"   -r:C:\h\w\B65C09A6\w\A1F30920\e\Interop\COM\NETClients\Events\NETClientEvents\IL-CG2*.dll"
No input files are loadable
3:04:07.78
3:04:07.79
Response file: C:\h\w\B65C09A6\w\A1F30920\e\Interop\COM\NETClients\Events\NETClientEvents\NETClientEvents.dll.rsp
C:\h\w\B65C09A6\w\A1F30920\e\Interop\COM\NETClients\Events\NETClientEvents\IL-CG2\NETClientEvents.dll
-o:C:\h\w\B65C09A6\w\A1F30920\e\Interop\COM\NETClients\Events\NETClientEvents\NETClientEvents.dll
--targetarch:arm
--targetos:windows
--verify-type-and-field-layout
--method-layout:random
-r:C:\h\w\B65C09A6\p\System..dll
-r:C:\h\w\B65C09A6\p\Microsoft..dll
-r:C:\h\w\B65C09A6\p\mscorlib.dll
-r:C:\h\w\B65C09A6\p\netstandard.dll
-O
" "dotnet" "C:\h\w\B65C09A6\p\crossgen2\crossgen2.dll" @"C:\h\w\B65C09A6\w\A1F30920\e\Interop\COM\NETClients\Events\NETClientEvents\NETClientEvents.dll.rsp"   -r:C:\h\w\B65C09A6\w\A1F30920\e\Interop\COM\NETClients\Events\NETClientEvents\IL-CG2*.dll"
Emitting R2R PE file: C:\h\w\B65C09A6\w\A1F30920\e\Interop\COM\NETClients\Events\NETClientEvents\NETClientEvents.dll
" "dotnet" "C:\h\w\B65C09A6\p\r2rdump\r2rdump.dll" --header --sc --in C:\h\w\B65C09A6\w\A1F30920\e\Interop\COM\NETClients\Events\NETClientEvents\NETClientEvents.dll --out C:\h\w\B65C09A6\w\A1F30920\e\Interop\COM\NETClients\Events\

Stack trace:

   at Interop_COM._NETClients_Events_NETClientEvents_NETClientEvents_._NETClients_Events_NETClientEvents_NETClientEvents_cmd()
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
JulieLeeMSFT commented 1 year ago

@AaronRobinsonMSFT, it failed in an outerloop test. PTAL.

AaronRobinsonMSFT commented 1 year ago

The stack here seems to indicate the managed exception stack trace logic is failing during an attempt to allocate an array. Also, this seems to be during the run of crossgen2. I will take a look, but I think @trylek or someone from @dotnet/crossgen-contrib may be able to offer more insight.

Fatal error. Internal CLR error. (0x80131506)
at System.GC.AllocateNewArray(IntPtr, Int32, GC_ALLOC_FLAGS)
at System.Text.StringBuilder.ExpandByABlock(Int32)
at System.Text.StringBuilder.Append(Char, Int32)
at System.Text.StringBuilder.Append(Char)
at System.Diagnostics.StackTrace.ToString(TraceFormat, System.Text.StringBuilder)
at System.Diagnostics.StackTrace.ToString(TraceFormat)
at System.Exception.get_StackTrace()
at System.Exception.ToString()
at Internal.JitInterface.CorInfoImpl.AllocException(System.Exception)
JulieLeeMSFT commented 1 year ago

Thanks @AaronRobinsonMSFT. When looking closely, the same error happened in other tests - https://github.com/dotnet/runtime/issues/81109 and https://github.com/dotnet/runtime/issues/81118.