Repository navigation
Closed
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMItest-run-coreTest failures in .NET Core test runsTest failures in .NET Core test runs
Milestone
Description
Test: System.Net.Tests.ServicePointManagerTest.FindServicePoint_ReturnedServicePointMatchesExpectedValues
Failures 6/1-8/1 (incl. PRs):
| Day | Run | OS |
|---|---|---|
| 7/25 | fullpgo | Windows.10.Arm64v8.Open |
| 7/31 | PR #56651 - fullpgo | Ubuntu.1804.Arm64.Open |
| 7/31 | fullpgo | Ubuntu.1804.Arm64.Open |
Failure:
System.MissingMethodException : .ctor
at System.RuntimeMethodHandle.IsCAVisibleFromDecoratedType(QCallTypeHandle attrTypeHandle, RuntimeMethodHandleInternal attrCtor, QCallTypeHandle sourceTypeHandle, QCallModule sourceModule)
at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1 derivedAttributes) in /_/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeCustomAttributeData.cs:line 1263
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType) in /_/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeCustomAttributeData.cs:line 1132
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) in /_/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeCustomAttributeData.cs:line 1051
at System.Reflection.RuntimeAssembly.GetCustomAttributes(Type attributeType, Boolean inherit) in /_/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs:line 307
at System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit) in /_/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs:line 737
at System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit) in /_/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs:line 782
at System.Attribute.GetCustomAttribute(Assembly element, Type attributeType) in /_/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs:line 775
at System.Reflection.CustomAttributeExtensions.GetCustomAttribute(Assembly element, Type attributeType) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/CustomAttributeExtensions.cs:line 13
at System.Reflection.CustomAttributeExtensions.GetCustomAttribute[T](Assembly element) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/CustomAttributeExtensions.cs:line 30
at System.Environment.get_Version() in /_/src/libraries/System.Private.CoreLib/src/System/Environment.cs:line 193
at Microsoft.DotNet.RemoteExecutor.RemoteExecutor.IsNetCore() in /_/src/Microsoft.DotNet.RemoteExecutor/src/RemoteExecutor.cs:line 96
at Microsoft.DotNet.RemoteExecutor.RemoteExecutor.GetConsoleAppArgs(RemoteInvokeOptions options, IEnumerable`1& toDispose) in /_/src/Microsoft.DotNet.RemoteExecutor/src/RemoteExecutor.cs:line 421
at Microsoft.DotNet.RemoteExecutor.RemoteExecutor.Invoke(MethodInfo method, String[] args, RemoteInvokeOptions options, Boolean pasteArguments) in /_/src/Microsoft.DotNet.RemoteExecutor/src/RemoteExecutor.cs:line 397
at Microsoft.DotNet.RemoteExecutor.RemoteExecutor.Invoke(Action method, RemoteInvokeOptions options) in /_/src/Microsoft.DotNet.RemoteExecutor/src/RemoteExecutor.cs:line 118
at System.Net.Tests.ServicePointManagerTest.FindServicePoint_ReturnedServicePointMatchesExpectedValues() in /_/src/libraries/System.Net.ServicePoint/tests/ServicePointManagerTest.cs:line 307
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMItest-run-coreTest failures in .NET Core test runsTest failures in .NET Core test runs
Activity
karelz commentedon Aug 1, 2021
@dotnet/jit-contrib this looks like PGO run failure only + missing method ... is it a known problem?
JulieLeeMSFT commentedon Aug 2, 2021
@jakobbotsch PTAL.
AndyAyersMS commentedon Aug 3, 2021
@jakobbotsch I'll probably be looking at this some too, since this is the last major failure symptom in the libraries-pgo runs, so let's share notes/progress.
AndyAyersMS commentedon Aug 3, 2021
Assuming this is codegen, so updated area label.
1 remaining item
AndyAyersMS commentedon Aug 4, 2021
Also note this test DLL seems unable to be run via corerun, you need to swap parts into the test host and run that way, as some tests try to re-exec
dotnet.AndyAyersMS commentedon Aug 4, 2021
Ok, I can repro if I bog the machine down with
stress -c 4...AndyAyersMS commentedon Aug 5, 2021
I've isolated this down to something PGO does to
System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder1 derivedAttributes).Suspect it involves inlining so will try and pin that down next.
AndyAyersMS commentedon Aug 6, 2021
Inline analysis indicates it's likely this chain of inlines (plus maybe some others)
AndyAyersMS commentedon Aug 6, 2021
I don't have a general-purpose inline XML reducer (yet). The method normally does 136 inlines, and if I cut off inlining at 104, the tests pass, and at 105 they fail.
Inline 105 is
RuntimeTypeHandle:get_Valuenoted above. While it is a small method, it has control flow, and biased PGO data, and inlining it leads to wide scale block reordering, so it's not that easy to diff between the 104 and 105 codegen to see if there are any unexpected changes. DisablingoptOptimizeLayoutin an attempt to minimize the ordering diffs makes the 105 case pass, so layout plays some kind of role in the bug.So I may work on reducing the inline set further; I suspect there's a version that does a much smaller number of inlines that perhaps will have more tractable diffs.
Other options are to try and debug the failure, try disabling other parts of the jit, find a simpler test case that also fails, or rely on some psychic debugging skills. I've tried the latter two and so far they haven't panned out.
AndyAyersMS commentedon Aug 7, 2021
I managed to narrow it down by first noting that the failure required assertion prop and then by limiting the number of allowed assertions. This lead to a one-instruction diff in the generated code:
and the upshot it looks like there's another invalid peephole:
wondering why arm64's
emitter::IsRedundantMovdoes not checkisValidLastInsFormatsfor same src/same dest movs.AndyAyersMS commentedon Aug 7, 2021
This seems to fix things, as best I can tell:
Issue was seemingly there from the start, eg #38179.
JIT: arm64 redundant move peephole must check instruction format
JIT: arm64 redundant move peephole must check instruction format (#57016