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] withDumpThreadsOnNonZeroExit #98052

Merged
merged 8 commits into from
Feb 7, 2024

Conversation

pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented Feb 6, 2024

I hope this will help to troubleshoot the GC deadlocks

  • call mono shutdown mono_jit_cleanup only when exit code is zero
  • implement dumpThreadsOnNonZeroExit and withDumpThreadsOnNonZeroExit, when exit code is not zero
  • EmscriptenBuildOptions into separate object
  • pass more of it into RuntimeAPI.runtimeBuildInfo
  • move MONO_LOG_LEVEL, MONO_LOG_MASK, DOTNET_DebugWriteToStdErr, MONO_SLEEP_ABORT_LIMIT to test-main.js
  • implement mono_native_thread_set_name via mono_wasm_pthread_set_name
  • implement mono_native_thread_create
  • renamed set_thread_prefix

- pass more of it into RuntimeAPI.runtimeBuildInfo
- move MONO_LOG_LEVEL, MONO_LOG_MASK, DOTNET_DebugWriteToStdErr, MONO_SLEEP_ABORT_LIMIT to test-main.js
- implement dumpThreadsOnExit and withDumpThreadsOnExit
- implement mono_native_thread_set_name via mono_wasm_pthread_set_name
- implement mono_native_thread_create
- renamed set_thread_prefix
@pavelsavara pavelsavara added arch-wasm WebAssembly architecture area-VM-threading-mono os-browser Browser variant of arch-wasm labels Feb 6, 2024
@pavelsavara pavelsavara added this to the 9.0.0 milestone Feb 6, 2024
@pavelsavara pavelsavara self-assigned this Feb 6, 2024
@ghost
Copy link

ghost commented Feb 6, 2024

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

Issue Details

I hope this will help to troubleshoot the GC deadlocks

  • implement dumpThreadsOnExit and withDumpThreadsOnExit, when exit code is not zero
  • EmscriptenBuildOptions into separate object
  • pass more of it into RuntimeAPI.runtimeBuildInfo
  • move MONO_LOG_LEVEL, MONO_LOG_MASK, DOTNET_DebugWriteToStdErr, MONO_SLEEP_ABORT_LIMIT to test-main.js
  • implement mono_native_thread_set_name via mono_wasm_pthread_set_name
  • implement mono_native_thread_create
  • renamed set_thread_prefix
Author: pavelsavara
Assignees: pavelsavara
Labels:

arch-wasm, area-VM-threading-mono, os-browser

Milestone: 9.0.0

@pavelsavara pavelsavara requested a review from maraf February 6, 2024 19:21
@pavelsavara
Copy link
Member Author

/azp run runtime-wasm

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara
Copy link
Member Author

/azp run runtime-wasm

src/mono/browser/runtime/es6/dotnet.es6.lib.js Outdated Show resolved Hide resolved
src/mono/browser/runtime/loader/config.ts Show resolved Hide resolved
src/mono/browser/runtime/loader/run.ts Outdated Show resolved Hide resolved
src/mono/browser/test-main.js Outdated Show resolved Hide resolved
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara
Copy link
Member Author

/azp run runtime-wasm

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara pavelsavara changed the title [browser][MT] dumpThreadsOnExit [browser][MT] withDumpThreadsOnNonZeroExit Feb 7, 2024
@pavelsavara pavelsavara requested a review from maraf February 7, 2024 08:41
Co-authored-by: Marek Fišera <mara@neptuo.com>
@pavelsavara
Copy link
Member Author

/azp run runtime-wasm

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara
Copy link
Member Author

/azp run runtime-wasm

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara
Copy link
Member Author

pavelsavara commented Feb 7, 2024

I filled #98086

Unfortunately the CI is not in great shape today. Build browser-wasm linux Release LibraryTests_Threading was canceled.

At least Build browser-wasm linux Release LibraryTests_Threading_Smoke passed, so it should be OK to merge.

@pavelsavara pavelsavara merged commit 97aba78 into dotnet:main Feb 7, 2024
49 of 53 checks passed
@pavelsavara pavelsavara deleted the browser_mt_thread_names branch February 7, 2024 11:36
@github-actions github-actions bot locked and limited conversation to collaborators Mar 9, 2024
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 os-browser Browser variant of arch-wasm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants