-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[WASM] Browser tab crashes when dotnet-crypto-worker.js fails to connect to WebSocket #72941
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsDescriptionWhen I'm running the It appears that the It seems this bug was introduced in #71693 Reproduction Steps
Expected behaviorThe browser tab doesn't crash. Actual behaviorThe browser tab crashes. Regression?No response Known WorkaroundsNo response Configuration
Other informationNo response
|
I think that |
@pavelsavara your PR #73468 fixed the issue so I'm closing the issue |
good, thanks. |
Description
When I'm running the
browser
sample, occasionally the browser tab crashes reporting "Out of Memory".It appears that the
setup_proxy_console
(debug.ts
) called from thedotnet-crypto-worker.js
modifies theconsole
functions to send all logs over a websocket. The crash that I ran into occurs when the websocket connection fails and theonerror
event logs this failure. This leads to an indirect infinite recursion bertween the local functionsend
and theconsole.log
replacement function and the browser tab runs out of memory in just a few seconds (the worker allocates over 3.5 GB of memory).It seems this bug was introduced in #71693
Reproduction Steps
.\build.cmd mono+libs+packs -os Browser -c Release
browser
sample:.\dotnet.cmd build src\mono\sample\wasm\browser
.\dotnet.cmd serve -d:src\mono\sample\wasm\browser\bin\Release\AppBundle -h "Cross-Origin-Opener-Policy:same-origin" -h "Cross-Origin-Embedder-Policy:require-corp" -o -p:8000
WebSocket connection to 'ws://localhost:8000/console' failed
in the console. It doesn't happen every time but it happens very often so you might need to refresh the page several times.Expected behavior
The browser tab doesn't crash.
Actual behavior
The browser tab crashes.
Regression?
No response
Known Workarounds
No response
Configuration
main
branch (after Better error handling in SubtleCrypto workers #71693)Other information
No response
The text was updated successfully, but these errors were encountered: