Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Wasm runs failing with empty WasmAssembliesToBundle #3984

Closed
dotnet/BenchmarkDotNet
#2531

Description

@LoopedBard3

Starting on 02/19, Wasm runs switched from hitting one failure (now seemingly fixed: dotnet/runtime#98334) to hitting a new failure: WasmApp.Common.targets(350,5): error : WasmAssembliesToBundle item is empty. No assemblies to process [/home/helixbot/work/9CCA0950/w/B41609A7/e/performance/artifacts/bin/for-running/MicroBenchmarks/Job-HFTUUL/BenchmarkDotNet.Autogenerated.csproj] when building the BenchmarkDotNet.Autogenerated.csproj (WasmNestedPublishApp) -> PrepareInputsForWasmBuild Target.

This failure seems to correspond with when we updated our BDN version from '0.13.11-nightly.20231126.107' -> '0.13.13-nightly.20240213.132'. Digging into a binlog from a previous working run and a recent failing run, the TargetDir property now has /AppBundle at the end and the configuration in the path, the TargetDir is being set to the same path for all of the projects, and the Target PrepareForWasmBuild is not adding any items (.dlls). The path TargetDir path update seems to be from dotnet/BenchmarkDotNet@e6fdc6b. Was able to repro with updated perf repo using command line: sudo python3 ./scripths/benchmarks_local.py --commits cc95b08e0060d388c5a48268f85d454fbe8e64fe --run-types WasmInterpreter --filter *Span.IndexerBench.CoveredIndex2* *WriteReadAsync* --wasm-engine-path /<path>/.jsvu/engines/v8/v8 --rebuild-artifacts --reinstall-dotnet

FYI: @adamsitnik, @ilonatommy

Activity

  1. added
    bug
    on Feb 22, 2024
  2. LoopedBard3 commented on Feb 23, 2024

    @LoopedBard3
    MemberAuthor

    @caaavik-msft and I found that path used by the PrepareForWasmBuild task and the path the files are being put do not match, /AppBundle/publish/ and /AppBundlepublish/ respectively. This seems to stem from the update here: dotnet/BenchmarkDotNet@e6fdc6b#diff-77e0d627a9d7c20f6d24179d3ca8dbe29aba70b95b5f464786ee93386e63412aR262-R268 missing trailing slashes, at least for OutDir: https://learn.microsoft.com/en-us/cpp/build/reference/common-macros-for-build-commands-and-properties?view=msvc-170

  3. LoopedBard3 commented on Feb 23, 2024

    @LoopedBard3
    MemberAuthor

    After some testing with the trailing slash added for the different properties, the build-no-restore step was able to find some of the WasmAssembliesToBundle. However, it is now hitting an error due to not being able to find the test-main.js file for testing. With the trailing slashes, this file is being put in one folder too deep, specifically into ./AppBundle/AppBundle/test-main.js instead of ./AppBundle/test-main.js, so there is a duplication to track down somewhere.

  4. adamsitnik commented on Feb 23, 2024

    @adamsitnik
    Member
  5. timcassell commented on Feb 23, 2024

    @timcassell
    Contributor

    missing trailing slashes, at least for OutDir: https://learn.microsoft.com/en-us/cpp/build/reference/common-macros-for-build-commands-and-properties?view=msvc-170

    Interesting, when I implemented that change, I followed https://learn.microsoft.com/en-us/visualstudio/msbuild/common-msbuild-project-properties?view=vs-2022 which doesn't mention trailing slash (only for IntermediateOutputPath). It doesn't appear to be necessary for CoreCLR or NativeAOT builds. Do we need to conditionally add it depending on the runtime, or it would be fine to include it always? [Edit] It seems that it's fine to always have it.

  6. radical commented on Feb 23, 2024

    @radical
    Member
  7. timcassell commented on Feb 23, 2024

    @timcassell
    Contributor

    With the trailing slashes, this file is being put in one folder too deep, specifically into ./AppBundle/AppBundle/test-main.js instead of ./AppBundle/test-main.js, so there is a duplication to track down somewhere.

    Does the wasm build auto append AppBundle to the output path? If so, that would explain it, as previously BDN was only reading the path to get the executable, and now it's passing it to the cli which it wasn't doing before. If that's how it works, we may need to pass a different path to the cli with AppBundle removed.

  8. LoopedBard3 commented on Feb 23, 2024

    @LoopedBard3
    MemberAuthor

    Does the wasm build auto append AppBundle to the output path? If so, that would explain it, as previously BDN was only reading the path to get the executable, and now it's passing it to the cli which it wasn't doing before. If that's how it works, we may need to pass a different path to the cli with AppBundle removed.

    I don't know for sure, but that is definitely a possibility and would make sense as to why the additional AppBundle is occuring.

  9. self-assigned this
    on Feb 23, 2024
  10. LoopedBard3 commented on Feb 23, 2024

    @LoopedBard3
    MemberAuthor

    Does the wasm build auto append AppBundle to the output path? If so, that would explain it, as previously BDN was only reading the path to get the executable, and now it's passing it to the cli which it wasn't doing before. If that's how it works, we may need to pass a different path to the cli with AppBundle removed.

    I don't know for sure, but that is definitely a possibility and would make sense as to why the additional AppBundle is occuring.

    Likely found it. In the _InitializeCommonProperties from _WasmBuildAppCore, the WasmAppDir which is used later for where to copy test-main.js to is being set with: <WasmAppDir Condition="'$(WasmAppDir)' == ''">$([MSBuild]::NormalizeDirectory($(OutputPath), 'AppBundle'))</WasmAppDir>.

  11. timcassell commented on Feb 23, 2024

    @timcassell
    Contributor

    Likely found it. In the _InitializeCommonProperties from _WasmBuildAppCore, the WasmAppDir which is used later for where to copy test-main.js to is being set with: <WasmAppDir Condition="'$(WasmAppDir)' == ''">$([MSBuild]::NormalizeDirectory($(OutputPath), 'AppBundle'))</WasmAppDir>.

    So what's the best fix? Do we pass output paths without AppBundle? Do we pass WasmAppDir? Something else?

  12. LoopedBard3 commented on Mar 4, 2024

    @LoopedBard3
    MemberAuthor

    This has been fixed by dotnet/BenchmarkDotNet#2531.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions