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

CG2 Outerloop Test Failure: TypeGeneratorTests asserting in MethodDesc::FindOrCreateAssociatedMethodDesc #43467

Closed
nattress opened this issue Oct 15, 2020 · 1 comment · Fixed by #44041

Comments

@nattress
Copy link
Contributor

nattress commented Oct 15, 2020

Example run:
https://dev.azure.com/dnceng/public/_build/results?buildId=853947&view=ms.vss-test-web.build-test-results-tab&runId=27279090&resultId=105033&paneView=dotnet-dnceng.dnceng-build-release-tasks.helix-test-information-tab

Platform:
Win10 (x64, arm64)

Item log:
Full log example since it's a verbose test, just the failure stack is below.

Could Not Find C:\h\w\B90C0986\w\A45F08B7\e\Loader\classloader\TypeGeneratorTests\TypeGeneratorTest295\Generated295\composite-r2r.dll.rsp
      
      Assert failure(PID 3544 [0x00000dd8], Thread: 3848 [0x0f08]): false
      
      CORECLR! MethodDesc::FindOrCreateAssociatedMethodDesc + 0x1F9E (0x00007ff9`b4efc3b6)
      CORECLR! ZapSig::DecodeMethod + 0x5A1 (0x00007ff9`b4e2e021)
      CORECLR! ZapSig::DecodeMethod + 0xF0 (0x00007ff9`b4e2e2bc)
      CORECLR! LoadDynamicInfoEntry + 0xB8A (0x00007ff9`b4ceeb92)
      CORECLR! Module::FixupNativeEntry + 0x28B (0x00007ff9`b4bc239b)
      CORECLR! Module::FixupDelayListAux + 0x485 (0x00007ff9`b4e2ed6d)
      CORECLR! ReadyToRunInfo::GetEntryPoint + 0x390 (0x00007ff9`b4e30840)
      CORECLR! MethodDesc::GetPrecompiledR2RCode + 0xD8 (0x00007ff9`b4d98de4)
      CORECLR! MethodDesc::GetPrecompiledCode + 0xBE (0x00007ff9`b4d98b4a)
      CORECLR! MethodDesc::PrepareILBasedCode + 0x20D (0x00007ff9`b4d9ba79)
          File: F:\workspace\_work\1\s\src\coreclr\src\vm\genmeth.cpp Line: 811
          Image: C:\h\w\B90C0986\p\CoreRun.exe

Tests failing:
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest1\Generated1\Generated1.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest14\Generated14\Generated14.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest15\Generated15\Generated15.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest16\Generated16\Generated16.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest17\Generated17\Generated17.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest18\Generated18\Generated18.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest19\Generated19\Generated19.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest20\Generated20\Generated20.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest21\Generated21\Generated21.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest22\Generated22\Generated22.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest23\Generated23\Generated23.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest24\Generated24\Generated24.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest25\Generated25\Generated25.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest26\Generated26\Generated26.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest27\Generated27\Generated27.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest28\Generated28\Generated28.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest62\Generated62\Generated62.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest63\Generated63\Generated63.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest64\Generated64\Generated64.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest65\Generated65\Generated65.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest66\Generated66\Generated66.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest67\Generated67\Generated67.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest68\Generated68\Generated68.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest69\Generated69\Generated69.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest70\Generated70\Generated70.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest171\Generated171\Generated171.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest192\Generated192\Generated192.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest193\Generated193\Generated193.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest194\Generated194\Generated194.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest195\Generated195\Generated195.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest196\Generated196\Generated196.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest197\Generated197\Generated197.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest198\Generated198\Generated198.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest199\Generated199\Generated199.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest200\Generated200\Generated200.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest201\Generated201\Generated201.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest202\Generated202\Generated202.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest203\Generated203\Generated203.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest204\Generated204\Generated204.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest205\Generated205\Generated205.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest206\Generated206\Generated206.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest207\Generated207\Generated207.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest208\Generated208\Generated208.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest209\Generated209\Generated209.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest210\Generated210\Generated210.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest211\Generated211\Generated211.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest212\Generated212\Generated212.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest213\Generated213\Generated213.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest214\Generated214\Generated214.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest215\Generated215\Generated215.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest292\Generated292\Generated292.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest293\Generated293\Generated293.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest294\Generated294\Generated294.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest295\Generated295\Generated295.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest296\Generated296\Generated296.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest297\Generated297\Generated297.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest298\Generated298\Generated298.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest299\Generated299\Generated299.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest300\Generated300\Generated300.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest301\Generated301\Generated301.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest302\Generated302\Generated302.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest303\Generated303\Generated303.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest304\Generated304\Generated304.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest305\Generated305\Generated305.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest306\Generated306\Generated306.cmd
Loader\classloader\TypeGeneratorTests\TypeGeneratorTest307\Generated307\Generated307.cmd

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Oct 15, 2020
@nattress
Copy link
Contributor Author

Prior attempt at fixing and discussion: #38366

@mangod9 mangod9 removed the untriaged New issue has not been triaged by the area owner label Oct 16, 2020
@mangod9 mangod9 added this to the 6.0.0 milestone Oct 16, 2020
davidwrighton added a commit that referenced this issue Nov 1, 2020
- Fix issue where method token referred to derived type but method was actually defined on base type
  - Previously the methods did not carry enough state to determine when to emit the owner type of the method, and which exact type was the owning type. The new logic computes it from the token in the presence of a proper instantiation context, which allows for correct operation.

- Fix issue where constrained dispatch on a method of a valuetype would not put in the correct owner type
  - Issue fixed by determining if the token resolves to a method on the same type as the eventual target method, or if it needs to have a specific owning type specified

In general these issues where both caused by confusion around exactly the correct owning type, and it turned out that computation could not be computed within the signature emitter code, but instead needed to be computed in the JIT at point of use. Fortunately, we had a structure `MethodWithToken` that is used in these (and only these situations). Finally, I also made a pass through the emitter and related logic to remove various band-aids that had built up over the last few years to make all the tests and applications pass. I believe that the new logic should be correct in the general case.

Bonus tweak...  Use parallelism when compiling the framework composite images with crossgen2, and fix bug in composite image generation where mangled symbol names might conflict.

Fixes #43466 and fixes #43467
@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants