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

[SIMD] Blazor Web App will not load webassembly component on virtualized machines with Chromium browser #103072

Closed
1 task done
mtbayley opened this issue Jun 4, 2024 · 10 comments
Labels
arch-wasm WebAssembly architecture area-VM-meta-mono os-browser Browser variant of arch-wasm
Milestone

Comments

@mtbayley
Copy link

mtbayley commented Jun 4, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I can't think of how this is possible, but I get this message on startup of my published AOT compiled Blazor Web App. Some machines have no problem loading the site, but some machines show this error consistently.

Any help on where to look would be appreciated

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

blazor.web.js:1  Error: AggregateException_ctor_DefaultMessage (EndOfStringNotFound Path: $['__internal__AntiforgeryRequestToken'] | LineNumber: 0 | BytePositionInLine: 2340.)
    at Jn (dotnet.runtime.8.0.6.cfhqwq2l7j.js:3:31614)
    at Tl (dotnet.runtime.8.0.6.cfhqwq2l7j.js:3:182415)
    at 0fd5c22a:0x27ba236
    at 0fd5c22a:0x27bbcf8
    at 0fd5c22a:0x27c169c
    at 0fd5c22a:0x2f2f5a4
    at 0fd5c22a:0x31d0e0e
    at 0fd5c22a:0x31ede66
    at 0fd5c22a:0x31cd780
    at 0fd5c22a:0x31c0b7d
callEntryPoint @ blazor.web.js:1
await in callEntryPoint (async)
ti @ blazor.web.js:1
await in ti (async)
ei @ blazor.web.js:1
startWebAssemblyIfNotStarted @ blazor.web.js:1
resolveRendererIdForDescriptor @ blazor.web.js:1
determinePendingOperation @ blazor.web.js:1
refreshRootComponents @ blazor.web.js:1
(anonymous) @ blazor.web.js:1
setTimeout (async)
rootComponentsMayRequireRefresh @ blazor.web.js:1
onDocumentUpdated @ blazor.web.js:1
Ki @ blazor.web.js:1
Ji @ blazor.web.js:1
(anonymous) @ (index):770

.NET Version

8.0.6

Anything else?

No response

@mtbayley
Copy link
Author

mtbayley commented Jun 4, 2024

I can confirm that the issue is gone when RunAOTCompilation is false

@javiercn
Copy link
Member

javiercn commented Jun 5, 2024

@mtbayley thanks for contacting us.

This seems like a bug in the AoT process. Do you happen to have a repro project that we can use to troubleshoot this issue? In the meantime I'm going to transfer this to the runtime so they can investigate.

@javiercn javiercn transferred this issue from dotnet/aspnetcore Jun 5, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jun 5, 2024
@javiercn
Copy link
Member

javiercn commented Jun 5, 2024

@lewing FYI

@mtbayley
Copy link
Author

mtbayley commented Jun 5, 2024

Hi @javiercn, @lewing
Here's a link to a minimal repro project. It is just the Blazor web app template with RunAOTCompilation set to true

https://github.com/mtbayley/TestAot

I've been able to trigger it on some machines by navigating to the Counter page. Then loading the Weather page. Then going back to the Counter page. Same exception occurs.

@mtbayley
Copy link
Author

mtbayley commented Jun 5, 2024

Another update:
The machines that it fails on are all virtualized. All physical machines I have tested so far have no issues

@mtbayley
Copy link
Author

mtbayley commented Jun 5, 2024

On the virtualized machines, only chromium based browsers do not work (chrome, edge). Firefox works.

@mtbayley mtbayley changed the title Blazor Web App will not load webassembly component on some machines Blazor Web App will not load webassembly component on virtualized machines with Chromium browser Jun 5, 2024
@mtbayley
Copy link
Author

mtbayley commented Jun 5, 2024

Setting WasmEnableSIMD to false works around the issue. I can't understand why. SIMD should be supported by all major browsers

@maraf
Copy link
Member

maraf commented Jun 6, 2024

Looks similar as #96004

@steveisok steveisok removed the untriaged New issue has not been triaged by the area owner label Jun 10, 2024
@steveisok
Copy link
Member

@maraf is there any action we can take?

@jeffschwMSFT jeffschwMSFT added the arch-wasm WebAssembly architecture label Jun 13, 2024
@lewing lewing added this to the 10.0.0 milestone Aug 12, 2024
@pavelsavara pavelsavara changed the title Blazor Web App will not load webassembly component on virtualized machines with Chromium browser [SIMD] Blazor Web App will not load webassembly component on virtualized machines with Chromium browser Dec 12, 2024
@pavelsavara pavelsavara added the os-browser Browser variant of arch-wasm label Dec 12, 2024
@pavelsavara
Copy link
Member

This is likely that the VM + browser can't use SIMD. The workaround is to disabler the SIMD.

See https://github.com/dotnet/runtime/blob/main/src/mono/wasm/features.md on how to do it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-VM-meta-mono os-browser Browser variant of arch-wasm
Projects
None yet
Development

No branches or pull requests

7 participants