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] improve abort on web worker #100610

Merged
merged 5 commits into from
Apr 9, 2024

Conversation

pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented Apr 3, 2024

  • replace mono_wasm_abort with Module.abort to be able to pass reason string
  • register onAbort and onExit also on worker
  • improve stack trace reporting across threads
  • _emscripten_force_exit if the UI thread is spin-waiting
    • trigger it 3000ms after critical mono_wasm_trace_logger like g_assert
    • trigger it 3000ms after nativeAbort
  • fix error formatting
  • max delay for teardown_proxy_console 3000ms
  • only print WASM EXIT on UI thread
  • rename cancelThreads to postCancelThreads
  • move mono_wasm_install_js_worker_interop and mono_wasm_uninstall_js_worker_interop to file worker-interop.ts
  • nativeAbort now also calls terminateAllThreads on UI thread
  • report navigator.userAgent during test-main.js to be able to validate browser version

Contributes to #98309
Contributes to #99888
Contributes to #100249

@pavelsavara pavelsavara added arch-wasm WebAssembly architecture area-System.Runtime.InteropServices.JavaScript os-browser Browser variant of arch-wasm labels Apr 3, 2024
@pavelsavara pavelsavara added this to the 9.0.0 milestone Apr 3, 2024
@pavelsavara pavelsavara self-assigned this Apr 3, 2024
Copy link
Contributor

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

# Conflicts:
#	src/mono/browser/runtime/pthreads/index.ts
# Conflicts:
#	src/mono/browser/runtime/types/internal.ts
@pavelsavara
Copy link
Member Author

Part of the failures are #100275
I also filed new #100831 which is uncovered by this PR

@pavelsavara pavelsavara merged commit 552b5e9 into dotnet:main Apr 9, 2024
34 of 36 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-System.Runtime.InteropServices.JavaScript os-browser Browser variant of arch-wasm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants