Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic method static virtuals with default implementation behaves fails to compile #89101

Closed
davidwrighton opened this issue Jul 18, 2023 · 1 comment · Fixed by #91781
Closed

Comments

@davidwrighton
Copy link
Member

Description

When compiling the Loader\classloader\StaticVirtualMethods\RegressionTests\StaticVirtualsAndMethodConstraintsAndDefaultImplementation.csproj test on the windows-x64 Checked NativeAOT PR test leg, the test fails to build. This test is new with PR
#89061 In the PR, I will disable this test for AOT compilation, so repro'ing it will require re-enabling the test.

Reproduction Steps

Attempt to compile the test for native aot in conditions equivalent to the windows-x64 Checked NativeAOT PR test leg.

Expected behavior

Test compiles and runs correctly

Actual behavior

Test fails with the following call stack

2023-07-18T01:16:07.2409969Z     Unhandled Exception: System.Diagnostics.DebugProvider+DebugAssertException:    at System.Diagnostics.DebugProvider.Fail(String, String) + 0x37
2023-07-18T01:16:07.2745593Z        at System.Diagnostics.Debug.Fail(String, String) + 0x32
2023-07-18T01:16:07.3004774Z        at ILCompiler.DependencyAnalysis.GenericVirtualMethodImplNode..ctor(MethodDesc) + 0xb0
2023-07-18T01:16:07.3042616Z        at ILCompiler.DependencyAnalysis.NodeFactory.<>c.<CreateNodeCaches>b__38_17(MethodDesc method) + 0x23
2023-07-18T01:16:07.3213051Z        at ILCompiler.DependencyAnalysis.GVMDependenciesNode.SearchDynamicDependencies(List`1, Int32, NodeFactory) + 0x6a5
2023-07-18T01:16:07.3283770Z        at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.DynamicDependencyNode.MarkNewDynamicDependencies(DependencyAnalyzer`2) + 0x43
2023-07-18T01:16:07.3292593Z        at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ProcessMarkStack() + 0x251
2023-07-18T01:16:07.3304774Z        at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeMarkedNodes() + 0x4b
2023-07-18T01:16:07.3315794Z        at ILCompiler.ILScanner.ILCompiler.IILScanner.Scan() + 0x14
2023-07-18T01:16:07.3328324Z        at ILCompiler.Program.<Run>g__RunScanner|4_0(Program.<>c__DisplayClass4_0&) + 0x18b
2023-07-18T01:16:07.3370343Z        at ILCompiler.Program.Run() + 0x22a8
2023-07-18T01:16:07.3436919Z        at ILCompiler.ILCompilerRootCommand.<>c__DisplayClass221_0.<.ctor>b__0(ParseResult result) + 0x31d
2023-07-18T01:16:07.3477815Z        at System.CommandLine.Invocation.InvocationPipeline.Invoke(ParseResult) + 0xa5
2023-07-18T01:16:07.3524685Z        at ilc!<BaseAddress>+0x83e97c
2023-07-18T01:16:07.6055018Z     CctorThrowInlinedStatic -> D:\a\_work\1\s\artifacts\tests\coreclr\windows.x64.Checked\Loader\classloader\TypeInitialization\CctorsWithSideEffects\CctorThrowInlinedStatic\CctorThrowInlinedStatic.dll
2023-07-18T01:16:09.7164270Z     Generating native code
2023-07-18T01:16:10.1492821Z     Generating native code
2023-07-18T01:16:13.0582306Z D:\a\_work\1\s\artifacts\bin\coreclr\windows.x64.Checked\build\Microsoft.NETCore.Native.targets(297,5): error MSB3073: The command ""D:\a\_work\1\s\artifacts\bin\coreclr\windows.x64.Checked\ilc-published\\ilc" @"D:\a\_work\1\s\artifacts\tests\coreclr/obj/windows.x64.Checked/Managed/Loader\classloader\StaticVirtualMethods\RegressionTests\StaticVirtualsAndMethodConstraintsAndDefaultImplementation\native\StaticVirtualsAndMethodConstraintsAndDefaultImplementation.ilc.rsp"" exited with code 57005. [D:\a\_work\1\s\src\tests\Loader\classloader\StaticVirtualMethods\RegressionTests\StaticVirtualsAndMethodConstraintsAndDefaultImplementation.csproj] [D:\a\_work\1\s\src\tests\build.proj]
2023-07-18T01:16:13.0631667Z ##[error]artifacts\bin\coreclr\windows.x64.Checked\build\Microsoft.NETCore.Native.targets(297,5): error MSB3073: The command ""D:\a\_work\1\s\artifacts\bin\coreclr\windows.x64.Checked\ilc-published\\ilc" @"D:\a\_work\1\s\artifacts\tests\coreclr/obj/windows.x64.Checked/Managed/Loader\classloader\StaticVirtualMethods\RegressionTests\StaticVirtualsAndMethodConstraintsAndDefaultImplementation\native\StaticVirtualsAndMethodConstraintsAndDefaultImplementation.ilc.rsp"" exited with code 57005. [D:\a\_work\1\s\src\tests\Loader\classloader\StaticVirtualMethods\RegressionTests\StaticVirtualsAndMethodConstraintsAndDefaultImplementation.csproj]

Regression?

No

Known Workarounds

No response

Configuration

No response

Other information

No response

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jul 18, 2023
@ghost
Copy link

ghost commented Jul 18, 2023

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

When compiling the Loader\classloader\StaticVirtualMethods\RegressionTests\StaticVirtualsAndMethodConstraintsAndDefaultImplementation.csproj test on the windows-x64 Checked NativeAOT PR test leg, the test fails to build. This test is new with PR
#89061 In the PR, I will disable this test for AOT compilation, so repro'ing it will require re-enabling the test.

Reproduction Steps

Attempt to compile the test for native aot in conditions equivalent to the windows-x64 Checked NativeAOT PR test leg.

Expected behavior

Test compiles and runs correctly

Actual behavior

Test fails with the following call stack

2023-07-18T01:16:07.2409969Z     Unhandled Exception: System.Diagnostics.DebugProvider+DebugAssertException:    at System.Diagnostics.DebugProvider.Fail(String, String) + 0x37
2023-07-18T01:16:07.2745593Z        at System.Diagnostics.Debug.Fail(String, String) + 0x32
2023-07-18T01:16:07.3004774Z        at ILCompiler.DependencyAnalysis.GenericVirtualMethodImplNode..ctor(MethodDesc) + 0xb0
2023-07-18T01:16:07.3042616Z        at ILCompiler.DependencyAnalysis.NodeFactory.<>c.<CreateNodeCaches>b__38_17(MethodDesc method) + 0x23
2023-07-18T01:16:07.3213051Z        at ILCompiler.DependencyAnalysis.GVMDependenciesNode.SearchDynamicDependencies(List`1, Int32, NodeFactory) + 0x6a5
2023-07-18T01:16:07.3283770Z        at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.DynamicDependencyNode.MarkNewDynamicDependencies(DependencyAnalyzer`2) + 0x43
2023-07-18T01:16:07.3292593Z        at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ProcessMarkStack() + 0x251
2023-07-18T01:16:07.3304774Z        at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeMarkedNodes() + 0x4b
2023-07-18T01:16:07.3315794Z        at ILCompiler.ILScanner.ILCompiler.IILScanner.Scan() + 0x14
2023-07-18T01:16:07.3328324Z        at ILCompiler.Program.<Run>g__RunScanner|4_0(Program.<>c__DisplayClass4_0&) + 0x18b
2023-07-18T01:16:07.3370343Z        at ILCompiler.Program.Run() + 0x22a8
2023-07-18T01:16:07.3436919Z        at ILCompiler.ILCompilerRootCommand.<>c__DisplayClass221_0.<.ctor>b__0(ParseResult result) + 0x31d
2023-07-18T01:16:07.3477815Z        at System.CommandLine.Invocation.InvocationPipeline.Invoke(ParseResult) + 0xa5
2023-07-18T01:16:07.3524685Z        at ilc!<BaseAddress>+0x83e97c
2023-07-18T01:16:07.6055018Z     CctorThrowInlinedStatic -> D:\a\_work\1\s\artifacts\tests\coreclr\windows.x64.Checked\Loader\classloader\TypeInitialization\CctorsWithSideEffects\CctorThrowInlinedStatic\CctorThrowInlinedStatic.dll
2023-07-18T01:16:09.7164270Z     Generating native code
2023-07-18T01:16:10.1492821Z     Generating native code
2023-07-18T01:16:13.0582306Z D:\a\_work\1\s\artifacts\bin\coreclr\windows.x64.Checked\build\Microsoft.NETCore.Native.targets(297,5): error MSB3073: The command ""D:\a\_work\1\s\artifacts\bin\coreclr\windows.x64.Checked\ilc-published\\ilc" @"D:\a\_work\1\s\artifacts\tests\coreclr/obj/windows.x64.Checked/Managed/Loader\classloader\StaticVirtualMethods\RegressionTests\StaticVirtualsAndMethodConstraintsAndDefaultImplementation\native\StaticVirtualsAndMethodConstraintsAndDefaultImplementation.ilc.rsp"" exited with code 57005. [D:\a\_work\1\s\src\tests\Loader\classloader\StaticVirtualMethods\RegressionTests\StaticVirtualsAndMethodConstraintsAndDefaultImplementation.csproj] [D:\a\_work\1\s\src\tests\build.proj]
2023-07-18T01:16:13.0631667Z ##[error]artifacts\bin\coreclr\windows.x64.Checked\build\Microsoft.NETCore.Native.targets(297,5): error MSB3073: The command ""D:\a\_work\1\s\artifacts\bin\coreclr\windows.x64.Checked\ilc-published\\ilc" @"D:\a\_work\1\s\artifacts\tests\coreclr/obj/windows.x64.Checked/Managed/Loader\classloader\StaticVirtualMethods\RegressionTests\StaticVirtualsAndMethodConstraintsAndDefaultImplementation\native\StaticVirtualsAndMethodConstraintsAndDefaultImplementation.ilc.rsp"" exited with code 57005. [D:\a\_work\1\s\src\tests\Loader\classloader\StaticVirtualMethods\RegressionTests\StaticVirtualsAndMethodConstraintsAndDefaultImplementation.csproj]

Regression?

No

Known Workarounds

No response

Configuration

No response

Other information

No response

Author: davidwrighton
Assignees: -
Labels:

area-NativeAOT-coreclr

Milestone: -

@MichalStrehovsky MichalStrehovsky added this to the 9.0.0 milestone Jul 19, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Jul 19, 2023
MichalStrehovsky added a commit that referenced this issue Sep 8, 2023
I don't see a problem with this locally. Fixes #89101.
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Sep 8, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Sep 23, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Oct 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants