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

[wasm] emscripten bump 3.1.56 #100334

Merged
merged 59 commits into from
Jul 15, 2024

Conversation

radekdoulik
Copy link
Member

@radekdoulik radekdoulik commented Mar 27, 2024

Remaining issues:

WBT linux

  • dotnet.native.wasm missing 2x - this is missing native lib in SkiaSharp - we need to disable it temporarily
  • wrong exit code value 3x
  • timeouts 4x
  • SkiaSharp problem 1x - that is expected as it is built against older emscripten, disable it until newer version is available

WBT windows

  • 66 failures

Library tests

  • timeout in WasmTestOnFirefox-ST-System.Private.Xml.Tests - known issue
  • timeout in System.Memory.Tests - known issue

Release LibraryTests_Smoke_AOT

  • build fails during AOT compilation - OOM? unable to reproduce locally

LibraryTests_Threading

5 failures - known issues - build analysis is green

  • assert in mono-threads
  • timeout 4x

more failures in runtime-wasm pipeline

TODO

  • update aspnetcore for .mjs mimetype
  • create new issue for MT - already covered by build analysis [Ilona]
  • try to increase MT tests timeout lengths
  • another round of build dance to get binaryen fix all the way down to the runtime
  • disable WBT tests using skiasharp

Fixes #103977.

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.

the .mjs extension will likely miss MIME type in the Blazor server

@radekdoulik
Copy link
Member Author

the errors are related to wrong binaryen version

        emcc: error: unexpected binaryen version: 112 (expected 117) [-Wversion-check] [-Werror]
        make[1]: *** [cmTC_fe167.js] Error 1
        make: *** [cmTC_fe167/fast] Error 2

dotnet/binaryen#101 for the rescue

@pavelsavara
Copy link
Member

pavelsavara commented Jul 8, 2024

There is interesting ST fail V8 Log Chrome Log

[09:04:21] info: [FAIL] System.Text.Json.Serialization.Tests.RequiredKeywordTests_Pipe.RequiredKeywordAndJsonRequiredCustomAttributeWorkCorrectlyTogether
[09:04:21] info: System.Threading.SynchronizationLockException : Object synchronization method was called from an unsynchronized block of code.
[09:04:21] info:    at System.IO.Pipelines.Pipe.AllocateWriteHeadSynchronized(Int32 )
[09:04:21] info:    at System.Text.Json.Serialization.JsonConverter`1[[System.Text.Json.Serialization.Tests.RequiredKeywordTests.ClassWithRequiredKeywordAndJsonRequiredCustomAttribute, System.Text.Json.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]].WriteCore(Utf8JsonWriter , ClassWithRequiredKeywordAndJsonRequiredCustomAttribute& , JsonSerializerOptions , WriteStack& )
[09:04:21] info:    at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.<SerializeAsync>d__12[[System.Text.Json.Serialization.Tests.RequiredKeywordTests.ClassWithRequiredKeywordAndJsonRequiredCustomAttribute, System.Text.Json.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]].MoveNext()
[09:04:21] info:    at System.IO.Pipelines.Pipe.AllocateWriteHeadSynchronized(Int32 )
[09:04:21] info:    at System.Text.Json.Serialization.JsonConverter`1[[System.Text.Json.Serialization.Tests.RequiredKeywordTests.ClassWithRequiredKeywordAndJsonRequiredCustomAttribute, System.Text.Json.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]].WriteCore(Utf8JsonWriter , ClassWithRequiredKeywordAndJsonRequiredCustomAttribute& , JsonSerializerOptions , WriteStack& )
[09:04:21] info:    at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.<SerializeAsync>d__12[[System.Text.Json.Serialization.Tests.RequiredKeywordTests.ClassWithRequiredKeywordAndJsonRequiredCustomAttribute, System.Text.Json.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]].MoveNext()
[09:04:21] info:    at System.IO.Pipelines.Pipe.AllocateWriteHeadSynchronized(Int32 )
[09:04:21] info:    at System.Text.Json.Serialization.JsonConverter`1[[System.Text.Json.Serialization.Tests.RequiredKeywordTests.ClassWithRequiredKeywordAndJsonRequiredCustomAttribute, System.Text.Json.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]].WriteCore(Utf8JsonWriter , ClassWithRequiredKeywordAndJsonRequiredCustomAttribute& , JsonSerializerOptions , WriteStack& )
[09:04:21] info:    at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.<SerializeAsync>d__12[[System.Text.Json.Serialization.Tests.RequiredKeywordTests.ClassWithRequiredKeywordAndJsonRequiredCustomAttribute, System.Text.Json.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]].MoveNext()
[09:04:21] info:    at System.IO.Pipelines.Pipe.AllocateWriteHeadSynchronized(Int32 )
[09:04:21] info:    at System.Text.Json.Serialization.JsonConverter`1[[System.Text.Json.Serialization.Tests.RequiredKeywordTests.ClassWithRequiredKeywordAndJsonRequiredCustomAttribute, System.Text.Json.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]].WriteCore(Utf8JsonWriter , ClassWithRequiredKeywordAndJsonRequiredCustomAttribute& , JsonSerializerOptions , WriteStack& )
[09:04:21] info:    at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncPipelinesSerializerWrapper.<SerializeWrapper>d__10`1[[System.Text.Json.Serialization.Tests.RequiredKeywordTests.ClassWithRequiredKeywordAndJsonRequiredCustomAttribute, System.Text.Json.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]].MoveNext()
[09:04:21] info:    at System.IO.Pipelines.Pipe.AllocateWriteHeadSynchronized(Int32 )
[09:04:21] info:    at System.Text.Json.Serialization.JsonConverter`1[[System.Text.Json.Serialization.Tests.RequiredKeywordTests.ClassWithRequiredKeywordAndJsonRequiredCustomAttribute, System.Text.Json.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]].WriteCore(Utf8JsonWriter , ClassWithRequiredKeywordAndJsonRequiredCustomAttribute& , JsonSerializerOptions , WriteStack& )
[09:04:21] info:    at System.Text.Json.Serialization.Tests.RequiredKeywordTests.RequiredKeywordAndJsonRequiredCustomAttributeWorkCorrectlyTogether()
[09:04:21] info:    at System.IO.Pipelines.Pipe.AllocateWriteHeadSynchronized(Int32 )
[09:04:21] info:    at System.Text.Json.Serialization.JsonConverter`1[[System.Text.Json.Serialization.Tests.RequiredKeywordTests.ClassWithRequiredKeywordAndJsonRequiredCustomAttribute, System.Text.Json.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]].WriteCore(Utf8JsonWriter , ClassWithRequiredKeywordAndJsonRequiredCustomAttribute& , JsonSerializerOptions , WriteStack& )
[09:04:21] info: --- End of stack trace from previous location ---
[09:04:21] info:    at System.IO.Pipelines.Pipe.AllocateWriteHeadSynchronized(Int32 )
[09:04:21] info:    at System.Text.Json.Serialization.JsonConverter`1[[System.Text.Json.Serialization.Tests.RequiredKeywordTests.ClassWithRequiredKeywordAndJsonRequiredCustomAttribute, System.Text.Json.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]].WriteCore(Utf8JsonWriter , ClassWithRequiredKeywordAndJsonRequiredCustomAttribute& , JsonSerializerOptions , WriteStack& )
[09:04:21] info:    at System.IO.Pipelines.Pipe.AllocateWriteHeadSynchronized(Int32 )
[09:04:21] info:    at System.Text.Json.Serialization.JsonConverter`1[[System.Text.Json.Serialization.Tests.RequiredKeywordTests.ClassWithRequiredKeywordAndJsonRequiredCustomAttribute, System.Text.Json.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]].WriteCore(Utf8JsonWriter , ClassWithRequiredKeywordAndJsonRequiredCustomAttribute& , JsonSerializerOptions , WriteStack& )

@pavelsavara
Copy link
Member

In the 27134031523 MT run deadlocks are

  • [STRT] TaskCoverage.Coverage.TaskAwaiter
  • [STRT] System.Threading.Tasks.Tests.AsyncEnumerableToBlockingEnumerableTests.AsyncEnumerableWithException
  • something after [PASS] System.Runtime.InteropServices.JavaScript.Tests.WebWorkerTest.WaitAssertsOnSyncJSExport
  • something after [PASS] System.Threading.Tests.SemaphoreSlimTests.RunSemaphoreSlimTest0_Ctor_Negative
  • something after [PASS] System.Threading.Tests.SemaphoreSlimTests.RunSemaphoreSlimTest2_Release

NuGet.config Outdated
@@ -20,6 +20,7 @@
<add key="dotnet-libraries-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries-transport/nuget/v3/index.json" />
<add key="dotnet9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" />
<add key="dotnet9-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9-transport/nuget/v3/index.json" />
<add key="general-testing" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json" />
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to keep this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

this will be removed once the dependencies are in the flow

src/mono/wasm/build/WasmApp.Common.targets Show resolved Hide resolved
@pavelsavara
Copy link
Member

/azp run runtime-wasm

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara
Copy link
Member

OOM in System.Buffers.ArrayPool.Tests.CollectionTests.ThreadLocalIsCollectedUnderHighPressure
I don't know if this is related to the emscripten bump or not

Details in #102195 (comment)

@pavelsavara
Copy link
Member

AOT

System.Collections.Tests - null function or function signature mismatch Log
System.Collections.Immutable.Tests - null function or function signature mismatch Log
System.ComponentModel.TypeConverter.Tests - null function or function signature mismatch Log

Common.Tests - Assertion: should not be reached at D:/a/_work/1/s/src/mono/mono/metadata/class-accessors.c:92 Log

@pavelsavara
Copy link
Member

AOT
ST-System.Text.Json.Tests - MONO_WASM: memory access out of bounds Log

Assert at interp.c:2663 Log

Assertion at D:/a/_work/1/s/src/mono/mono/mini/interp/interp.c:2663, condition 
`is_ok (error)' not met, function:init_jit_call_info, 
Attempting to JIT compile method '(wrapper other) void object:gsharedvt_out_sig (intptr,System.Text.RegularExpressions.Symbolic.SymbolicRegexBuilder`1/NodeCacheKey<object>&,intptr)' 
while running in aot-only mode.

@@ -83,7 +83,7 @@ static void AddDictionary(StringBuilder sb, Dictionary<string, string>? res)
public Dictionary<string, string>? GetNativeResourceTargetInBootConfig(BootJsonData bootConfig, string resourceName)
{
string resourceExtension = Path.GetExtension(resourceName);
if (resourceName.StartsWith("dotnet.native.worker", StringComparison.OrdinalIgnoreCase) && string.Equals(resourceExtension, ".js", StringComparison.OrdinalIgnoreCase))
if (resourceName.StartsWith("dotnet.native.worker", StringComparison.OrdinalIgnoreCase) && string.Equals(resourceExtension, ".mjs", StringComparison.OrdinalIgnoreCase))
Copy link
Member

Choose a reason for hiding this comment

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

if this is code that impacts Net8, it still needs to consider .js, I think

@radekdoulik
Copy link
Member Author

AOT ST-System.Text.Json.Tests - MONO_WASM: memory access out of bounds Log

Assert at interp.c:2663 Log

Assertion at D:/a/_work/1/s/src/mono/mono/mini/interp/interp.c:2663, condition 
`is_ok (error)' not met, function:init_jit_call_info, 
Attempting to JIT compile method '(wrapper other) void object:gsharedvt_out_sig (intptr,System.Text.RegularExpressions.Symbolic.SymbolicRegexBuilder`1/NodeCacheKey<object>&,intptr)' 
while running in aot-only mode.

this is happening on main too, I tried to run runtime-wasm pipeline few days ago in #104356 to compare it

@pavelsavara
Copy link
Member

pavelsavara commented Jul 10, 2024

AOT ST-System.Text.Json.Tests - MONO_WASM: memory access out of bounds Log

this is happening on main too, I tried to run runtime-wasm pipeline few days ago in #104356 to compare it

note this is single-threaded, could you please point me to the specific log on main ?

@radekdoulik
Copy link
Member Author

AOT ST-System.Text.Json.Tests - MONO_WASM: memory access out of bounds Log

this is happening on main too, I tried to run runtime-wasm pipeline few days ago in #104356 to compare it

note this is single-threaded, could you please point me to the specific log on main ?

the build is gone, the log is still alive. it is ST as well

Console log: 'WasmTestOnV8-ST-System.Text.RegularExpressions.Tests' from job 3bd75066-e30b-4b0b-9738-2a055329014c (ubuntu.2204.amd64.open.rt) using docker image mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-webassembly on a00FUH7
...
[12:07:59] info: [MONO] * Assertion at /__w/1/s/src/mono/mono/mini/interp/interp.c:2663, condition `is_ok (error)' not met, function:init_jit_call_info, Attempting to JIT compile method '(wrapper other) void object:gsharedvt_out_sig (intptr,System.Text.RegularExpressions.Symbolic.SymbolicRegexBuilder`1/NodeCacheKey<object>&,intptr)' while running in aot-only mode. See https://learn.microsoft.com/xamarin/ios/internals/limitations for more information.
[12:07:59] info:  assembly:<unknown assembly> type:<unknown type> member:(null)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Emscripten SDK for .NET 9
7 participants