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

[release/8.0][wasm] Define getWasmIndirectFunctionTable before initializing the #92683

Closed
wants to merge 5 commits into from

Conversation

radical
Copy link
Member

@radical radical commented Sep 27, 2023

.. runtime also, so it is available at that time.

Based on feedback from Katelyn Gadd.

Customer impact

Ensure that the indirect function table is available when the runtime is being initialized. This is a precautionary measure, and was not breaking any existing tests.

Testing

Unit tests.

Risk

Low.

.. runtime also, so it is available at that time.
@radical radical added the arch-wasm WebAssembly architecture label Sep 27, 2023
@ghost
Copy link

ghost commented Sep 27, 2023

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

Issue Details

.. runtime also, so it is available at that time.

Based on feedback from Katelyn Gadd.

Author: radical
Assignees: -
Labels:

arch-wasm

Milestone: -

@ghost ghost assigned radical Sep 27, 2023
@radical radical added the Servicing-consider Issue for next servicing release review label Sep 27, 2023
@radical radical changed the title [release/8.0][wasm] Define getWasmIndirectFunctionTable before intializing the [release/8.0][wasm] Define getWasmIndirectFunctionTable before initializing the Sep 27, 2023
@radical radical marked this pull request as draft September 27, 2023 05:21
@radical radical removed the Servicing-consider Issue for next servicing release review label Sep 27, 2023
@radical radical marked this pull request as ready for review September 27, 2023 08:13
Copy link
Member

@pavelsavara pavelsavara left a comment

Choose a reason for hiding this comment

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

Could you please explain the scenarios under which this is necessary ?

@ghost ghost added the needs-author-action An issue or pull request that requires more info or actions from the author. label Sep 27, 2023
@ghost ghost removed the needs-author-action An issue or pull request that requires more info or actions from the author. label Sep 27, 2023
@kg
Copy link
Contributor

kg commented Sep 27, 2023

Could you please explain the scenarios under which this is necessary ?

startup can engage the interpreter, which could under rare circumstances (i.e. if you set low thresholds, disable tiering) engage the jiterpreter which will need these tables

@radical
Copy link
Member Author

radical commented Sep 27, 2023

Could you please explain the scenarios under which this is necessary ?

Address your suggestion in #92664 (comment) . I didn't change getMemory though, to match what we have in main.

This reverts commit 4975dc3.

This caused library aot tests to fail with:
```
info: MONO_WASM: mono_wasm_load_runtime () failed TypeError: t.getWasmIndirectFunctionTable is not a function
info: MONO_WASM: TypeError: t.getWasmIndirectFunctionTable is not a function
info:     at Ma (/root/helix/work/workitem/e/wasm_build/AppBundle/_framework/dotnet.runtime.js:3:80285)
info:     at Ul (/root/helix/work/workitem/e/wasm_build/AppBundle/_framework/dotnet.runtime.js:3:174663)
info:     at do_jit_call (do_jit_call (wasm://wasm/0dec238a:wasm-function[90022]:0x16bba99))
info:     at mono_interp_exec_method (mono_interp_exec_method (wasm://wasm/0dec238a:wasm-function[90012]:0x16af791))
info:     at interp_runtime_invoke (interp_runtime_invoke (wasm://wasm/0dec238a:wasm-function[90052]:0x16bc9da))
info:     at mono_jit_runtime_invoke (mono_jit_runtime_invoke (wasm://wasm/0dec238a:wasm-function[95289]:0x17c5028))
info:     at do_runtime_invoke (do_runtime_invoke (wasm://wasm/0dec238a:wasm-function[94085]:0x178e3d3))
info:     at mono_runtime_invoke_checked (mono_runtime_invoke_checked (wasm://wasm/0dec238a:wasm-function[94084]:0x178e38f))
info:     at mono_runtime_install_appctx_properties (mono_runtime_install_appctx_properties (wasm://wasm/0dec238a:wasm-function[91526]:0x17054e4))
info:     at mono_runtime_init_checked (mono_runtime_init_checked (wasm://wasm/0dec238a:wasm-function[91521]:0x1704d4e))
info:     at mini_init (mini_init (wasm://wasm/0dec238a:wasm-function[95272]:0x17c43ea))
info:     at mono_jit_init_version (mono_jit_init_version (wasm://wasm/0dec238a:wasm-function[95408]:0x17ca553))
info:     at mono_wasm_load_runtime (mono_wasm_load_runtime (wasm://wasm/0dec238a:wasm-function[103299]:0x1900987))
info:     at Module._mono_wasm_load_runtime (/root/helix/work/workitem/e/wasm_build/AppBundle/_framework/dotnet.native.js:6817:114)
info:     at ccall (/root/helix/work/workitem/e/wasm_build/AppBundle/_framework/dotnet.native.js:5851:22)
info:     at Object.mono_wasm_load_runtime (/root/helix/work/workitem/e/wasm_build/AppBundle/_framework/dotnet.native.js:5877:16)
info:     at Dl (/root/helix/work/workitem/e/wasm_build/AppBundle/_framework/dotnet.runtime.js:3:215804)
info:     at /root/helix/work/workitem/e/wasm_build/AppBundle/_framework/dotnet.runtime.js:3:205340
info:     at /root/helix/work/workitem/e/wasm_build/AppBundle/_framework/dotnet.runtime.js:3:206020
```
@radical
Copy link
Member Author

radical commented Sep 27, 2023

@kg interestingly removing getWasmIndirectFunctionTable after the runtime is initialized, only failed the AOT tests here.

@radical
Copy link
Member Author

radical commented Sep 28, 2023

Failing tests will be fixed by - #92747

@radical radical closed this Sep 28, 2023
@radical radical reopened this Sep 28, 2023
@carlossanlop
Copy link
Member

@radical if this is ready, please send an email to Tactics requesting approval (unless you're waiting for @pavelsavara to approve the change first).

@carlossanlop
Copy link
Member

@radical @kg @pavelsavara the CI is green after the latest feedback was addressed. When you're ready, please send the email to Tactics requesting approval. And please get a code review sign-off from an area owner.

Copy link
Member

@pavelsavara pavelsavara left a comment

Choose a reason for hiding this comment

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

This is good enough fix for Net8 (because it's low risk), but for Net9 we need better solution (because it's ugly).

@radical radical added the Servicing-consider Issue for next servicing release review label Oct 4, 2023
@radical
Copy link
Member Author

radical commented Oct 13, 2023

This was not approved for 8.

@radical radical closed this Oct 13, 2023
@radical radical removed the Servicing-consider Issue for next servicing release review label Oct 13, 2023
@radical radical deleted the wasm-strip-fixes-8 branch October 13, 2023 17:02
@ghost ghost locked as resolved and limited conversation to collaborators Nov 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants