Skip to content

[wasm] Emscripten 2.0.34 bump - #62499

Merged
radical merged 28 commits into
dotnet:mainfrom
radekdoulik:pr-emscripten-34-bump
Feb 3, 2022
Merged

[wasm] Emscripten 2.0.34 bump#62499
radical merged 28 commits into
dotnet:mainfrom
radekdoulik:pr-emscripten-34-bump

Conversation

@radekdoulik

@radekdoulikradekdoulik commented Dec 7, 2021

Copy link
Copy Markdown
Member

Performance wise it looks similar to 2.0.23. Didn't notice any regression here. The managed startup is slightly slower, in second run I measured 223ms, so it is probably just measurement error.

measurement2.0.23 time2.0.34
AppStart, Page show63.0000ms63.4458ms
AppStart, Reach managed222.5600ms226.1304ms
Exceptions, NoExceptionHandling0.0921us0.0843us
Exceptions, TryCatch0.0955us0.0885us
Exceptions, TryCatchThrow0.0026ms0.0026ms
Exceptions, TryCatchFilter0.1018us0.0929us
Exceptions, TryCatchFilterInline0.0869us0.0800us
Exceptions, TryCatchFilterThrow0.0033ms0.0034ms
Exceptions, TryCatchFilterThrowApplies0.0025ms0.0025ms
Json, non-ASCII text serialize9.0376ms7.9638ms
Json, non-ASCII text deserialize14.0856ms11.7460ms
Json, small serialize0.2351ms0.2203ms
Json, small deserialize0.3556ms0.3359ms
Json, large serialize69.6667ms63.6420ms
Json, large deserialize99.6792ms92.1754ms
WebSocket, PartialSend 1B0.0017ms0.0017ms
WebSocket, PartialSend 64KB0.0653ms0.0658ms
WebSocket, PartialSend 1MB0.9636ms0.9364ms
WebSocket, PartialReceive 1B0.0026ms0.0025ms
WebSocket, PartialReceive 10KB0.0060ms0.0040ms
WebSocket, PartialReceive 100KB0.0000us0.0000us

@vargaz

vargaz commented Dec 8, 2021

Copy link
Copy Markdown
Contributor

Might need this as well:

 <_EmccCommonFlags Include="-s ENVIRONMENT=&quot;web,webview,worker,node,shell&quot;" />

Newer versions of emscripten no longer build with 'shell' support by default, i.e. running under v8.

@vargaz

Copy link
Copy Markdown
Contributor

Fix for the build failure:
https://gist.github.com/vargaz/4bfce768ed19d283ddc31be124cc82a9

Radek Doulikand others added 4 commits December 9, 2021 17:02
Co-authored-by: Zoltan Varga <vargaz@gmail.com>
 src/mono/mono/mini/mini-runtime.c:3407:25: error: ‘invoke’ undeclared (first use in this function); did you mean ‘revoke’?
3407 | invoke = mono_marshal_get_runtime_invoke_dynamic ();
Environment setting https://github.com/emscripten-core/emscripten/blob/2.0.34/src/settings.js#L616-L641
From emscripten 2.0.25 release notes
- Support for the 'shell' environment is now disabled by default. Running under
`d8`, `js`, or `jsc` is not something that most emscripten users ever want to
do, so including the support code is, more often than not, unnecessary. Users
who want shell support can enable it by including 'shell' in `-s ENVIRONMENT`
(dotnet#14535).
Example of the the size increase for bench sample:
-a--- 12/10/2021 3:35 PM 382113 dotnet.js
-a--- 12/13/2021 10:37 AM 383589 dotnet.js
@radekdoulik

Copy link
Copy Markdown
MemberAuthor

Related: #62708

Comment threadsrc/mono/wasm/wasm.proj Outdated
@lewing

Copy link
Copy Markdown
Member

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@lewing

Copy link
Copy Markdown
Member

looks like we need to bump Emscripten in icu dotnet/icu#177

@lewing

Copy link
Copy Markdown
Member

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@lewing
lewing marked this pull request as ready for review February 1, 2022 15:48
@radekdoulik

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

To avoid these errors:
WasmApp.Native.targets(342,5): error : Failed to compile .../Microsoft.CodeAnalysis.CSharp.dll.bc -> /datadisks/disk1/work/B9F209B7/w/B1710A2F/e/wasm_build/obj/wasm/for-build/Microsoft.CodeAnalysis.CSharp.dll.o
WasmApp.Native.targets(342,5): error : emcc: warning: linker setting ignored during compilation: 'TOTAL_MEMORY' [-Wunused-command-line-argument]
WasmApp.Native.targets(342,5): error : emcc: warning: linker setting ignored during compilation: 'ERROR_ON_UNDEFINED_SYMBOLS' [-Wunused-command-line-argument]
@radekdoulik

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@radekdoulik

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@radekdoulik

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

lewingand others added 2 commits February 2, 2022 17:31
When running with nodejs, the managed app would exit with code 42, but
node would exit with 1. Use `process.exit` for node, instead of
`mono_wasm_exit`.
@radical

Copy link
Copy Markdown
Member

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@radical

Copy link
Copy Markdown
Member

@radical
radical merged commit 724c4e1 into dotnet:mainFeb 3, 2022
@sbomer

Copy link
Copy Markdown
Member

Why was this merged with known runtime-extra-platforms failures? I ask because we are trying to keep get runtime and runtime-extra-platforms to green to make it easier to detect new failures. Would it be reasonable to disable the failing tests before merging in the future? Just curious what we can do to meet our build health goals without unnecessarily slowing down development.

@radical

Copy link
Copy Markdown
Member

Why was this merged with known runtime-extra-platforms failures?

This was part of a bigger mess, which started with an update dependencies PR from emsdk getting merged, which bumped the emscripten version being used, which broken Wasm.Build.Tests (on main, and PRs), which got mixed with many helix queues getting removed, and all that combining to cause a badly red main, and lots of PRs being blocked. Merging this unblocked them, and made main much less red. And I opened a PR to disable those tests today (#64759).

I ask because we are trying to keep get runtime and runtime-extra-platforms to green to make it easier to detect new failures. Would it be reasonable to disable the failing tests before merging in the future? Just curious what we can do to meet our build health goals without unnecessarily slowing down development.

I completely agree with that, and avoid merging with any failures caused by the PR. But this was an unusual case.

@sbomer

Copy link
Copy Markdown
Member

Thanks @radical, I appreciate the explanation

radekdoulik added a commit to radekdoulik/runtime that referenced this pull request Feb 17, 2022
@ghostghost locked as resolved and limited conversation to collaborators Mar 6, 2022
Sign up for freeto 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.

9 participants

@radekdoulik@vargaz@lewing@SamMonoRT@radical@sbomer@pavelsavara@BrzVlad@naricc