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][mt] Unify multithreading switches #97560

Merged
merged 23 commits into from
Feb 1, 2024

Conversation

ilonatommy
Copy link
Member

@ilonatommy ilonatommy commented Jan 26, 2024

We used to have a runtime build switch: /p:MonoWasmBuildVariant=multithread and a public property WasmEnableThreads. When running library tests it was required to pass both switches, otherwise we got an error:

fail: [out of order message from the browser]: http://127.0.0.1:65215/_framework/dotnet.js 1759:18 Uncaught Error: Assert failed: SharedArrayBuffer is not enabled on.ers. See also https://aka.ms/dotnet-wasm-features

This PR removes MonoWasmBuildVariant and replaces it with WasmEnableThreads that will be used for runtime build and running mt-based apps / lib tests.
Rename FEATURE_WASM_THREADS -> FEATURE_WASM_MANAGED_THREADS, FeatureWasmThreads -> FeatureWasmManagedThreads. Removing MonoWasmThreads.

@ghost
Copy link

ghost commented Jan 26, 2024

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

We used to have a runtime build switch: /p:MonoWasmBuildVariant=multithread and a public property WasmEnableThreads. When running library tests it was required to pass both switches, otherwise we got an error:

fail: [out of order message from the browser]: http://127.0.0.1:65215/_framework/dotnet.js 1759:18 Uncaught Error: Assert failed: SharedArrayBuffer is not enabled on.ers. See also https://aka.ms/dotnet-wasm-features

This PR removes MonoWasmBuildVariant and replaces it with WasmEnableThreads that will be used for runtime build and running mt-based apps / lib tests.

Author: ilonatommy
Assignees: ilonatommy
Labels:

arch-wasm, area-VM-threading-mono

Milestone: -

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

eng/pipelines/runtime.yml Outdated Show resolved Hide resolved
eng/testing/workloads-browser.targets Outdated Show resolved Hide resolved
src/libraries/System.Net.Http/src/System.Net.Http.csproj Outdated Show resolved Hide resolved
src/mono/browser/browser.proj Outdated Show resolved Hide resolved
src/mono/browser/build/BrowserWasmApp.targets Outdated Show resolved Hide resolved
Copy link
Member

@maraf maraf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@pavelsavara
Copy link
Member

/azp run runtime-wasm

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ilonatommy
Copy link
Member Author

/azp run runtime-wasm

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ilonatommy ilonatommy merged commit 765090f into dotnet:main Feb 1, 2024
187 of 192 checks passed
@radical
Copy link
Member

radical commented Feb 5, 2024

@kg
Copy link
Contributor

kg commented Feb 5, 2024

It seems like this also broke WBT for me locally:

  ** Preparing /home/kate/Projects/dotnet-runtime-wasm/artifacts/bin/dotnet-latest **
      - wasm-tools: Installing workload
      - wasm-experimental: Installing workload
/home/kate/Projects/dotnet-runtime-wasm/eng/testing/workloads-testing.targets(222,5): warning : Workload installation failed: Version 9.0.0-dev of package microsoft.netcore.app.runtime.mono.multithread.browser-wasm is not found in NuGet feeds /home/kate/Projects/dotnet-runtime-wasm/artifacts/packages/Release/Shipping/;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries-transport/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9-transport/nuget/v3/index.json". [/home/kate/Projects/dotnet-runtime-wasm/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj]
/home/kate/Projects/dotnet-runtime-wasm/eng/testing/workloads-testing.targets(222,5): error : workload install failed with exit code 1: Installing pack Microsoft.NET.Runtime.WebAssembly.Templates version 9.0.0-dev... [/home/kate/Projects/dotnet-runtime-wasm/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj]
/home/kate/Projects/dotnet-runtime-wasm/eng/testing/workloads-testing.targets(222,5): error : Skipping NuGet package signature verification. [/home/kate/Projects/dotnet-runtime-wasm/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj]
/home/kate/Projects/dotnet-runtime-wasm/eng/testing/workloads-testing.targets(222,5): error : Writing workload pack installation record for Microsoft.NET.Runtime.WebAssembly.Templates version 9.0.0-dev... [/home/kate/Projects/dotnet-runtime-wasm/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj]
/home/kate/Projects/dotnet-runtime-wasm/eng/testing/workloads-testing.targets(222,5): error : Installing pack Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm version 9.0.0-dev... [/home/kate/Projects/dotnet-runtime-wasm/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj]
/home/kate/Projects/dotnet-runtime-wasm/eng/testing/workloads-testing.targets(222,5): error : Workload installation failed. Rolling back installed packs... [/home/kate/Projects/dotnet-runtime-wasm/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj]
/home/kate/Projects/dotnet-runtime-wasm/eng/testing/workloads-testing.targets(222,5): error : Rolling back pack Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm installation... [/home/kate/Projects/dotnet-runtime-wasm/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj]
/home/kate/Projects/dotnet-runtime-wasm/eng/testing/workloads-testing.targets(222,5): error : Rolling back pack Microsoft.NET.Runtime.WebAssembly.Templates installation... [/home/kate/Projects/dotnet-runtime-wasm/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj]
/home/kate/Projects/dotnet-runtime-wasm/eng/testing/workloads-testing.targets(222,5): error : Uninstalling workload pack Microsoft.NET.Runtime.WebAssembly.Templates version 9.0.0-dev... [/home/kate/Projects/dotnet-runtime-wasm/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj]
/home/kate/Projects/dotnet-runtime-wasm/eng/testing/workloads-testing.targets(222,5): error : Workload installation failed: Version 9.0.0-dev of package microsoft.netcore.app.runtime.mono.multithread.browser-wasm is not found in NuGet feeds /home/kate/Projects/dotnet-runtime-wasm/artifacts/packages/Release/Shipping/;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries-transport/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9-transport/nuget/v3/index.json". [/home/kate/Projects/dotnet-runtime-wasm/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-VM-threading-mono
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants