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

[browser] Wasm linux/windows HighResource LibrariestTests AOT are failing on build #101104

Closed
matouskozak opened this issue Apr 16, 2024 · 7 comments · Fixed by #101299
Closed
Labels
arch-wasm WebAssembly architecture area-Codegen-AOT-mono blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab os-browser Browser variant of arch-wasm
Milestone

Comments

@matouskozak
Copy link
Member

matouskozak commented Apr 16, 2024

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=644416
Build error leg or test failing: Build product
Failing jobs on runtime-extra-platforms:

  • browser-wasm windows Release LibraryTests_HighResource_AOT
  • browser-wasm linux Release LibraryTests_HighResource_AOT

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorPattern": "Assertion at .*mini-llvm\\.c:6194, condition `lhs' not met",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=644416
Error message validated: [Assertion at .*mini-llvm\.c:6194, condition lhs' not met`]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 4/16/2024 6:29:40 AM UTC

Report

Build Definition Test Pull Request
651298 dotnet/runtime WasmTestOnChrome-System.Reflection.MetadataLoadContext.Tests.WorkItemExecution
649141 dotnet/runtime WasmTestOnChrome-System.Reflection.MetadataLoadContext.Tests.WorkItemExecution
644416 dotnet/runtime normal-System.Reflection.MetadataLoadContext.Tests.WorkItemExecution

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 2 3
@matouskozak matouskozak added blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' area-Codegen-AOT-mono Known Build Error Use this to report build issues in the .NET Helix tab os-browser Browser variant of arch-wasm labels Apr 16, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Apr 16, 2024
@matouskozak
Copy link
Member Author

matouskozak commented Apr 16, 2024

fyi: @lewing

@lewing lewing added this to the 9.0.0 milestone Apr 16, 2024
@lewing lewing removed the untriaged New issue has not been triaged by the area owner label Apr 16, 2024
@pavelsavara
Copy link
Member

There are many more on this build

Log

/root/helix/work/correlation/build/wasm-shared/WasmApp.Common.targets(682,5): error : Precompiling failed for /root/helix/work/workitem/e/wasm_build/obj/wasm/for-build/aot-in/System.Private.CoreLib.dll with exit code 1. [/root/helix/work/workitem/e/publish/ProxyProjectForAOTOnHelix.proj]
/root/helix/work/correlation/build/wasm-shared/WasmApp.Common.targets(682,5): error : * Assertion at /__w/1/s/src/mono/mono/mini/mini-llvm.c:6194, condition `lhs' not met [/root/helix/work/workitem/e/publish/ProxyProjectForAOTOnHelix.proj]
/root/helix/work/correlation/build/wasm-shared/WasmApp.Common.targets(682,5): error : Aborted (core dumped) [/root/helix/work/workitem/e/publish/ProxyProjectForAOTOnHelix.proj]

To replicate, just run /azp run runtime-wasm, probably on any branch

@pavelsavara pavelsavara added the arch-wasm WebAssembly architecture label Apr 18, 2024
@pavelsavara
Copy link
Member

System.Reflection.MetadataLoadContext.Tests could be good candidate to add to the AOT smoke test, so that we would see it break on runtime pipeline

@radekdoulik
Copy link
Member

In browser targeted build I see it assert on:

converting llvm method System.Runtime.Intrinsics.Vector64`1<uint16> System.Runtime.Intrinsics.Arm.AdvSimd:Abs (System.Runtime.Intrinsics.Vector64`1<int16>)
* Assertion at /Users/rodo/git/runtime/src/mono/mono/mini/mini-llvm.c:6194, condition `lhs' not met

There are 2 problems we need to solve.

  1. The aot compiler is now failing to compile this method:
// System.Runtime.Intrinsics.Arm.AdvSimd
public static Vector64<ushort> Abs(Vector64<short> P_0)
{
	throw new PlatformNotSupportedException();
}
  1. The System.Runtime.Intrinsics.Arm.AdvSimd should be linked away and it is not.

@vitek-karas what is the best way to find out why it was preserved during trimming? Still the illink analyzer or do we have some other way to find out?

@vitek-karas
Copy link
Member

Set _TrimmerDumpDependencies=True and _TrimmerDependenciesFileFormat=dgml and then use https://github.com/dotnet/runtime/tree/main/src/coreclr/tools/aot/DependencyGraphViewer to inspect the file. Search for the symbol which was included (and shouldn't be) and then you can walk back to what kept it.

@radekdoulik
Copy link
Member

Nice, I should try the viewer when I will be on a windows machine. Meanwhile I used the linker analyzer, interestingly it still worked.

> illinkanalyzer -t AdvSimd artifacts/obj/System.Text.Json.Tests/Debug//net9.0/browser-wasm/linked/linker-dependencies.xml
Loading dependency tree from: artifacts/obj/System.Text.Json.Tests/Debug//net9.0/browser-wasm/linked/linker-dependencies.xml

--- Type dependencies: 'AdvSimd' ---------------------------------------

--- TypeDef:System.Runtime.Intrinsics.Arm.AdvSimd dependencies ---------
Dependency #1
        TypeDef:System.Runtime.Intrinsics.Arm.AdvSimd
        | Other:/Users/rodo/git/runtime/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/ILLink.Descriptors.xml
...

It looks like we are not trimming a lot of stuff after #100669 was merged.

The AdvSimd is not trimmed away primarily because of these descriptors https://github.com/dotnet/runtime/pull/100669/files#diff-de4bf248fdfcb99fde3d06fd924756ab0073f5deaf5bb5218288fdc52ce16864R308-R310

@kotlarmilos It is only affecting tests, I wonder though if we should make the use of these linker descriptors conditional and use them only for ios? I guess it also made browser AOT tests slower on CI and possibly other tests too.

@kotlarmilos
Copy link
Member

@kotlarmilos It is only affecting tests, I wonder though if we should make the use of these linker descriptors conditional and use them only for ios? I guess it also made browser AOT tests slower on CI and possibly other tests too.

Yes, I've included these changes in the PR. Thank you for investigation and bringing this up.

@github-actions github-actions bot locked and limited conversation to collaborators May 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Codegen-AOT-mono blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab os-browser Browser variant of arch-wasm
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants