runtime: Test failure: XmlSerializerTests.XmlMembersMapping_With_ChoiceIdentifier, XmlSerializerTests.XmlMembersMapping_IntArray
pipeline: runtime-coreclr libraries-jitstressregs
win-arm64, JitStressRegs=1 or JitStressRegs=8
D:\h\w\AFED094C\w\AE650933\e>set COMPlus
COMPlus_JitStressRegs=8
COMPlus_TieredCompilation=0
D:\h\w\AFED094C\w\AE650933\e>call RunTests.cmd --runtime-path D:\h\w\AFED094C\p
----- start Sun 04/24/2022 6:38:34.80 =============== To repro directly: =====================================================
pushd D:\h\w\AFED094C\w\AE650933\e\
"D:\h\w\AFED094C\p\dotnet.exe" exec --runtimeconfig System.Xml.XmlSerializer.Tests.runtimeconfig.json --depsfile System.Xml.XmlSerializer.Tests.deps.json xunit.console.dll System.Xml.XmlSerializer.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing
popd
===========================================================================================================
D:\h\w\AFED094C\w\AE650933\e>"D:\h\w\AFED094C\p\dotnet.exe" exec --runtimeconfig System.Xml.XmlSerializer.Tests.runtimeconfig.json --depsfile System.Xml.XmlSerializer.Tests.deps.json xunit.console.dll System.Xml.XmlSerializer.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing
Discovering: System.Xml.XmlSerializer.Tests (method display = ClassAndMethod, method display options = None)
Discovered: System.Xml.XmlSerializer.Tests (found 242 of 243 test cases)
Starting: System.Xml.XmlSerializer.Tests (parallel test collections = on, max threads = 8)
XmlSerializerTests.XmlMembersMapping_With_ChoiceIdentifier [FAIL]
System.InvalidOperationException : There is an error in XML document (1, 176).
---- System.NullReferenceException : Object reference not set to an instance of an object.
Stack Trace:
/_/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializer.cs(495,0): at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
/_/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializer.cs(427,0): at System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream)
/_/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs(2043,0): at XmlSerializerTests.RoundTripWithXmlMembersMapping(Object[] value, String baseline, Boolean skipStringCompare, XmlReflectionMember[] members, String ns, String wrapperName, Boolean rpc)
/_/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.RuntimeOnly.cs(2438,0): at XmlSerializerTests.XmlMembersMapping_With_ChoiceIdentifier()
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
/_/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.CoreCLR.cs(383,0): at System.Reflection.RuntimeMethodInfo.InvokeNonEmitUnsafe(Object obj, IntPtr* arguments, Span`1 argsForTemporaryMonoSupport, BindingFlags invokeAttr)
----- Inner Stack Trace -----
/_/src/coreclr/System.Private.CoreLib/src/System/Array.CoreCLR.cs(307,0): at System.Array.GetLowerBound(Int32 dimension)
/_/src/coreclr/System.Private.CoreLib/src/System/Array.CoreCLR.cs(51,0): at System.Array.Copy(Array sourceArray, Array destinationArray, Int32 length)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read2_wrapper()
/_/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializer.cs(480,0): at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
XmlSerializerTests.XmlMembersMapping_IntArray [FAIL]
System.InvalidOperationException : There is an error in XML document (1, 176).
---- System.NullReferenceException : Object reference not set to an instance of an object.
Stack Trace:
/_/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializer.cs(495,0): at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
/_/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializer.cs(427,0): at System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream)
/_/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs(2043,0): at XmlSerializerTests.RoundTripWithXmlMembersMapping(Object[] value, String baseline, Boolean skipStringCompare, XmlReflectionMember[] members, String ns, String wrapperName, Boolean rpc)
/_/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.RuntimeOnly.cs(2194,0): at XmlSerializerTests.XmlMembersMapping_IntArray()
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
/_/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.CoreCLR.cs(383,0): at System.Reflection.RuntimeMethodInfo.InvokeNonEmitUnsafe(Object obj, IntPtr* arguments, Span`1 argsForTemporaryMonoSupport, BindingFlags invokeAttr)
----- Inner Stack Trace -----
/_/src/coreclr/System.Private.CoreLib/src/System/Array.CoreCLR.cs(307,0): at System.Array.GetLowerBound(Int32 dimension)
/_/src/coreclr/System.Private.CoreLib/src/System/Array.CoreCLR.cs(51,0): at System.Array.Copy(Array sourceArray, Array destinationArray, Int32 length)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read1_wrapper()
/_/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializer.cs(480,0): at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
Finished: System.Xml.XmlSerializer.Tests
=== TEST EXECUTION SUMMARY ===
System.Xml.XmlSerializer.Tests Total: 242, Errors: 0, Failed: 2, Skipped: 0, Time: 22.740s
----- end Sun 04/24/2022 6:39:02.17 ----- exit code 1 ----------------------------------------------------------
I verified that the failure does not occur without JitStressRegs=1 or JitStressRegs=8.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (17 by maintainers)
Commits related to this issue
- JIT: fix bad arm64 move peephole `IF_DR_2G` `(mov sp/reg, reg/sp)` has an implicit reg2, so an unwary peephole opt might mistakenly think it is `mov reg, x0`. If the opt is unlucky and the next instr... — committed to AndyAyersMS/runtime by AndyAyersMS 2 years ago
- JIT: fix bad arm64 move peephole `IF_DR_2G` `(mov sp/reg, reg/sp)` has an implicit reg2, so an unwary peephole opt might mistakenly think it is `mov reg, x0`. If the opt is unlucky and the next instr... — committed to AndyAyersMS/runtime by AndyAyersMS 2 years ago
- JIT: fix bad arm64 move peephole (#68631) `IF_DR_2G` `(mov sp/reg, reg/sp)` has an implicit reg2, so an unwary peephole opt might mistakenly think it is `mov reg, x0`. If the opt is unlucky and the ... — committed to dotnet/runtime by AndyAyersMS 2 years ago
Eventually this narrows down to
and the second one looks like the likely suspect. We can confirm via:
(note there could be more than one bad method, but in this case there’s just one, as confirmed by the second test, which enables register stress for all methods other than
Read2_wrapper.So now we know which method goes bad.