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] Multiple runtime crashes, and asserts in System.Collections.Immutable.Tests #65335

Closed
Tracked by #65464
radical opened this issue Feb 14, 2022 · 12 comments
Closed
Tracked by #65464
Assignees
Labels
arch-wasm WebAssembly architecture area-Codegen-Interpreter-mono disabled-test The test is disabled in source code against the issue
Milestone

Comments

@radical
Copy link
Member

radical commented Feb 14, 2022

Build, and log.

Hit on #63958 but the PR itself should be unrelated to this.

Starting:    System.Collections.Immutable.Tests.dll
{}
RuntimeError: memory access out of bounds
    at <anonymous>:wasm-function[218]:0x1a7d5
    at <anonymous>:wasm-function[1699]:0x7c4c4
    at <anonymous>:wasm-function[1698]:0x7c469
    at <anonymous>:wasm-function[1734]:0x7e1e1
    at <anonymous>:wasm-function[529]:0x371e6
    at <anonymous>:wasm-function[8374]:0x1b64a1
    at <anonymous>:wasm-function[8373]:0x1b635e
    at <anonymous>:wasm-function[526]:0x37141
    at <anonymous>:wasm-function[551]:0x37781
    at <anonymous>:wasm-function[1541]:0x75c32
    at <anonymous>:wasm-function[1540]:0x757a0
    at <anonymous>:wasm-function[1525]:0x745c2
    at <anonymous>:wasm-function[1524]:0x7411c
    at <anonymous>:wasm-function[359]:0x2710e
    at <anonymous>:wasm-function[327]:0x240cb
    at <anonymous>:wasm-function[379]:0x28933
    at <anonymous>:wasm-function[223]:0x1a857
    at <anonymous>:wasm-function[169]:0x18b9f
    at <anonymous>:wasm-function[168]:0xbccf
    at <anonymous>:wasm-function[7732]:0x196d0d
    at <anonymous>:wasm-function[1900]:0x83f79
    at <anonymous>:wasm-function[1904]:0x845e0
    at mono_wasm_invoke_method (<anonymous>:wasm-function[118]:0x991c)
    at Module._mono_wasm_invoke_method (./dotnet.js:12:128850)
    at Object.t.<computed> (./dotnet.js:3:4100)
    at _call_method_with_converted_args (./dotnet.js:3:48191)
    at call_method (./dotnet.js:3:47309)
    at ./dotnet.js:3:49132
    at mono_call_assembly_entry_point (./dotnet.js:3:49260)
    at Object.mono_run_main (./dotnet.js:3:57765)
    at Object.init (test-main.js:214:43)
    at Object.onDotnetReady (test-main.js:153:17)
    at finalize_startup (./dotnet.js:3:62585)
    at mono_wasm_after_runtime_initialized (./dotnet.js:3:59479)
    at callRuntimeCallbacks (./dotnet.js:12:17800)
    at postRun (./dotnet.js:12:13708)
    at doRun (./dotnet.js:12:145047)
    at run (./dotnet.js:12:145204)
    at runCaller (./dotnet.js:12:144684)
    at removeRunDependency (./dotnet.js:12:14500)
    at receiveInstance (./dotnet.js:12:16355)
    at receiveInstantiationResult (./dotnet.js:12:16476)
Process v8 exited with 1
@radical radical added the arch-wasm WebAssembly architecture label Feb 14, 2022
@dotnet-issue-labeler dotnet-issue-labeler bot added area-Codegen-Interpreter-mono untriaged New issue has not been triaged by the area owner labels Feb 14, 2022
@ghost
Copy link

ghost commented Feb 14, 2022

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

Issue Details

[Build][(https://dev.azure.com/dnceng/public/_build/results?buildId=1611827&view=logs&jobId=11c5c840-d20a-5536-428b-70d8cd9c6259&j=11c5c840-d20a-5536-428b-70d8cd9c6259&t=73598586-463f-5241-5dc8-b8ffdebf8b89), and log.

Hit on #63958 but the PR itself should be unrelated to this.

Starting:    System.Collections.Immutable.Tests.dll
{}
RuntimeError: memory access out of bounds
    at <anonymous>:wasm-function[218]:0x1a7d5
    at <anonymous>:wasm-function[1699]:0x7c4c4
    at <anonymous>:wasm-function[1698]:0x7c469
    at <anonymous>:wasm-function[1734]:0x7e1e1
    at <anonymous>:wasm-function[529]:0x371e6
    at <anonymous>:wasm-function[8374]:0x1b64a1
    at <anonymous>:wasm-function[8373]:0x1b635e
    at <anonymous>:wasm-function[526]:0x37141
    at <anonymous>:wasm-function[551]:0x37781
    at <anonymous>:wasm-function[1541]:0x75c32
    at <anonymous>:wasm-function[1540]:0x757a0
    at <anonymous>:wasm-function[1525]:0x745c2
    at <anonymous>:wasm-function[1524]:0x7411c
    at <anonymous>:wasm-function[359]:0x2710e
    at <anonymous>:wasm-function[327]:0x240cb
    at <anonymous>:wasm-function[379]:0x28933
    at <anonymous>:wasm-function[223]:0x1a857
    at <anonymous>:wasm-function[169]:0x18b9f
    at <anonymous>:wasm-function[168]:0xbccf
    at <anonymous>:wasm-function[7732]:0x196d0d
    at <anonymous>:wasm-function[1900]:0x83f79
    at <anonymous>:wasm-function[1904]:0x845e0
    at mono_wasm_invoke_method (<anonymous>:wasm-function[118]:0x991c)
    at Module._mono_wasm_invoke_method (./dotnet.js:12:128850)
    at Object.t.<computed> (./dotnet.js:3:4100)
    at _call_method_with_converted_args (./dotnet.js:3:48191)
    at call_method (./dotnet.js:3:47309)
    at ./dotnet.js:3:49132
    at mono_call_assembly_entry_point (./dotnet.js:3:49260)
    at Object.mono_run_main (./dotnet.js:3:57765)
    at Object.init (test-main.js:214:43)
    at Object.onDotnetReady (test-main.js:153:17)
    at finalize_startup (./dotnet.js:3:62585)
    at mono_wasm_after_runtime_initialized (./dotnet.js:3:59479)
    at callRuntimeCallbacks (./dotnet.js:12:17800)
    at postRun (./dotnet.js:12:13708)
    at doRun (./dotnet.js:12:145047)
    at run (./dotnet.js:12:145204)
    at runCaller (./dotnet.js:12:144684)
    at removeRunDependency (./dotnet.js:12:14500)
    at receiveInstance (./dotnet.js:12:16355)
    at receiveInstantiationResult (./dotnet.js:12:16476)
Process v8 exited with 1
Author: radical
Assignees: -
Labels:

arch-wasm

Milestone: -

@lewing lewing removed the untriaged New issue has not been triaged by the area owner label Feb 14, 2022
@lewing lewing added this to the 7.0.0 milestone Feb 14, 2022
@radical
Copy link
Member Author

radical commented Feb 14, 2022

Another instance of a similar looking crash but running on nodejs, build, and log:

Hit on my debug #65178 (at 73c6e90), which is running each of the test libraries 6 times on helix.

RuntimeError: memory access out of bounds
    at strcmp (<anonymous>:wasm-function[8866]:0x1d1a4f)
    at mono_class_init_internal (<anonymous>:wasm-function[667]:0x3c04d)
    at mono_class_init_internal (<anonymous>:wasm-function[667]:0x3bd8a)
    at mono_class_vtable_checked (<anonymous>:wasm-function[1907]:0x848c2)
    at mono_array_new_checked (<anonymous>:wasm-function[1956]:0x874bc)
    at mono_glist_to_array (<anonymous>:wasm-function[2005]:0x88d03)
    at setup_stack_trace (<anonymous>:wasm-function[7960]:0x1a77dd)
    at mono_handle_exception_internal (<anonymous>:wasm-function[7938]:0x1a6081)
    at mono_handle_exception (<anonymous>:wasm-function[7921]:0x1a41d6)
    at interp_throw (<anonymous>:wasm-function[225]:0x1a916)
    at interp_exec_method (<anonymous>:wasm-function[169]:0x14547)
    at interp_runtime_invoke (<anonymous>:wasm-function[168]:0xbccf)
    at mono_jit_runtime_invoke (<anonymous>:wasm-function[7732]:0x196d0d)
    at do_runtime_invoke (<anonymous>:wasm-function[1900]:0x83f79)
    at mono_runtime_invoke_checked (<anonymous>:wasm-function[1898]:0x83eeb)
    at ves_icall_InternalInvoke_raw (<anonymous>:wasm-function[1261]:0x6522a)
    at do_icall (<anonymous>:wasm-function[258]:0x1b6d9)
    at do_icall_wrapper (<anonymous>:wasm-function[229]:0x1ad1b)
    at interp_exec_method (<anonymous>:wasm-function[169]:0xce1b)
    at interp_runtime_invoke (<anonymous>:wasm-function[168]:0xbccf)
    at mono_jit_runtime_invoke (<anonymous>:wasm-function[7732]:0x196d0d)
    at do_runtime_invoke (<anonymous>:wasm-function[1900]:0x83f79)
    at mono_runtime_try_invoke (<anonymous>:wasm-function[1904]:0x845e0)
    at mono_wasm_invoke_method (<anonymous>:mono_wasm_invoke_method (wasm-function[118]:0x991c))
    at Module._mono_wasm_invoke_method (/datadisks/disk1/work/AD3B0951/w/B5300A1F/e/dotnet.js:12:128850)
    at Object.t.<computed> (/datadisks/disk1/work/AD3B0951/w/B5300A1F/e/dotnet.js:3:4100)
    at _call_method_with_converted_args (/datadisks/disk1/work/AD3B0951/w/B5300A1F/e/dotnet.js:3:48191)
    at call_method (/datadisks/disk1/work/AD3B0951/w/B5300A1F/e/dotnet.js:3:47309)
    at /datadisks/disk1/work/AD3B0951/w/B5300A1F/e/dotnet.js:3:49132
    at mono_call_assembly_entry_point (/datadisks/disk1/work/AD3B0951/w/B5300A1F/e/dotnet.js:3:49260)
    at Object.mono_run_main (/datadisks/disk1/work/AD3B0951/w/B5300A1F/e/dotnet.js:3:57765)
    at Object.init (/datadisks/disk1/work/AD3B0951/w/B5300A1F/e/test-main.js:214:43)
    at Object.onDotnetReady (/datadisks/disk1/work/AD3B0951/w/B5300A1F/e/test-main.js:153:17)
    at finalize_startup (/datadisks/disk1/work/AD3B0951/w/B5300A1F/e/dotnet.js:3:62585)
    at mono_wasm_after_runtime_initialized (/datadisks/disk1/work/AD3B0951/w/B5300A1F/e/dotnet.js:3:59479)
    at callRuntimeCallbacks (/datadisks/disk1/work/AD3B0951/w/B5300A1F/e/dotnet.js:12:17800)
    at postRun (/datadisks/disk1/work/AD3B0951/w/B5300A1F/e/dotnet.js:12:13708)
    at doRun (/datadisks/disk1/work/AD3B0951/w/B5300A1F/e/dotnet.js:12:145047)
    at run (/datadisks/disk1/work/AD3B0951/w/B5300A1F/e/dotnet.js:12:145204)
    at runCaller (/datadisks/disk1/work/AD3B0951/w/B5300A1F/e/dotnet.js:12:144684)
    at Object.removeRunDependency (/datadisks/disk1/work/AD3B0951/w/B5300A1F/e/dotnet.js:12:14500)
    at mono_wasm_pre_init (/datadisks/disk1/work/AD3B0951/w/B5300A1F/e/dotnet.js:3:59319)
Process node exited with 1

@radical
Copy link
Member Author

radical commented Feb 14, 2022

Another failure with nodejs, on the same build:

[21:54:09] fail: RuntimeError: divide by zero
[21:54:09] fail:     at table_locator (<anonymous>:wasm-function[1068]:0x5a2f4)
[21:54:09] fail:     at mono_binary_search (<anonymous>:wasm-function[2690]:0xa8e7a)
[21:54:09] fail:     at mono_metadata_packing_from_typedef (<anonymous>:wasm-function[1770]:0x7f56c)
[21:54:09] fail:     at mono_class_setup_fields (<anonymous>:wasm-function[666]:0x3b988)
[21:54:09] fail:     at init_sizes_with_info (<anonymous>:wasm-function[670]:0x3d32b)
[21:54:09] fail:     at mono_class_init_internal (<anonymous>:wasm-function[667]:0x3bde7)
[21:54:09] fail:     at mono_class_init_internal (<anonymous>:wasm-function[667]:0x3bd8a)
[21:54:09] fail:     at mono_class_vtable_checked (<anonymous>:wasm-function[1907]:0x848c2)
[21:54:09] fail:     at mono_array_new_checked (<anonymous>:wasm-function[1956]:0x874bc)
[21:54:09] fail:     at mono_glist_to_array (<anonymous>:wasm-function[2005]:0x88d03)
[21:54:09] fail:     at setup_stack_trace (<anonymous>:wasm-function[7960]:0x1a77dd)
[21:54:09] fail:     at mono_handle_exception_internal (<anonymous>:wasm-function[7938]:0x1a6081)
[21:54:09] fail:     at mono_handle_exception (<anonymous>:wasm-function[7921]:0x1a41d6)
[21:54:09] fail:     at interp_throw (<anonymous>:wasm-function[225]:0x1a916)
[21:54:09] fail:     at interp_exec_method (<anonymous>:wasm-function[169]:0x14547)
[21:54:09] fail:     at interp_runtime_invoke (<anonymous>:wasm-function[168]:0xbccf)
[21:54:09] fail:     at mono_jit_runtime_invoke (<anonymous>:wasm-function[7732]:0x196d0d)
[21:54:09] fail:     at do_runtime_invoke (<anonymous>:wasm-function[1900]:0x83f79)
[21:54:09] fail:     at mono_runtime_invoke_checked (<anonymous>:wasm-function[1898]:0x83eeb)
[21:54:09] fail:     at ves_icall_InternalInvoke_raw (<anonymous>:wasm-function[1261]:0x6522a)
[21:54:09] fail:     at do_icall (<anonymous>:wasm-function[258]:0x1b6d9)
[21:54:09] fail:     at do_icall_wrapper (<anonymous>:wasm-function[229]:0x1ad1b)
[21:54:09] fail:     at interp_exec_method (<anonymous>:wasm-function[169]:0xce1b)
[21:54:09] fail:     at interp_runtime_invoke (<anonymous>:wasm-function[168]:0xbccf)
[21:54:09] fail:     at mono_jit_runtime_invoke (<anonymous>:wasm-function[7732]:0x196d0d)
[21:54:09] fail:     at do_runtime_invoke (<anonymous>:wasm-function[1900]:0x83f79)
[21:54:09] fail:     at mono_runtime_try_invoke (<anonymous>:wasm-function[1904]:0x845e0)
[21:54:09] fail:     at mono_wasm_invoke_method (<anonymous>:mono_wasm_invoke_method (wasm-function[118]:0x991c))
[21:54:09] fail:     at Module._mono_wasm_invoke_method (/datadisks/disk1/work/AD3B0951/w/A8B609AC/e/dotnet.js:12:128850)
[21:54:09] fail:     at Object.t.<computed> (/datadisks/disk1/work/AD3B0951/w/A8B609AC/e/dotnet.js:3:4100)
[21:54:09] fail:     at _call_method_with_converted_args (/datadisks/disk1/work/AD3B0951/w/A8B609AC/e/dotnet.js:3:48191)
[21:54:09] fail:     at call_method (/datadisks/disk1/work/AD3B0951/w/A8B609AC/e/dotnet.js:3:47309)
[21:54:09] fail:     at /datadisks/disk1/work/AD3B0951/w/A8B609AC/e/dotnet.js:3:49132
[21:54:09] fail:     at mono_call_assembly_entry_point (/datadisks/disk1/work/AD3B0951/w/A8B609AC/e/dotnet.js:3:49260)
[21:54:09] fail:     at Object.mono_run_main (/datadisks/disk1/work/AD3B0951/w/A8B609AC/e/dotnet.js:3:57765)
[21:54:09] fail:     at Object.init (/datadisks/disk1/work/AD3B0951/w/A8B609AC/e/test-main.js:214:43)
[21:54:09] fail:     at Object.onDotnetReady (/datadisks/disk1/work/AD3B0951/w/A8B609AC/e/test-main.js:153:17)
[21:54:09] fail:     at finalize_startup (/datadisks/disk1/work/AD3B0951/w/A8B609AC/e/dotnet.js:3:62585)
[21:54:09] fail:     at mono_wasm_after_runtime_initialized (/datadisks/disk1/work/AD3B0951/w/A8B609AC/e/dotnet.js:3:59479)
[21:54:09] fail:     at callRuntimeCallbacks (/datadisks/disk1/work/AD3B0951/w/A8B609AC/e/dotnet.js:12:17800)
[21:54:09] fail:     at postRun (/datadisks/disk1/work/AD3B0951/w/A8B609AC/e/dotnet.js:12:13708)
[21:54:09] fail:     at doRun (/datadisks/disk1/work/AD3B0951/w/A8B609AC/e/dotnet.js:12:145047)
[21:54:09] fail:     at run (/datadisks/disk1/work/AD3B0951/w/A8B609AC/e/dotnet.js:12:145204)
[21:54:09] fail:     at runCaller (/datadisks/disk1/work/AD3B0951/w/A8B609AC/e/dotnet.js:12:144684)
[21:54:09] fail:     at Object.removeRunDependency (/datadisks/disk1/work/AD3B0951/w/A8B609AC/e/dotnet.js:12:14500)
[21:54:09] fail:     at mono_wasm_pre_init (/datadisks/disk1/work/AD3B0951/w/A8B609AC/e/dotnet.js:3:59319)
[21:54:09] info: Process node exited with 1

@radical
Copy link
Member Author

radical commented Feb 14, 2022

Another with nodejs, build:

[21:54:15] info: Starting:    System.Collections.Immutable.Tests.dll
[21:54:34] fail: Trace: * Assertion at /__w/1/s/src/mono/mono/mini/mini-exceptions.c:1730, condition `<disabled>' not met
[21:54:34] fail: 
[21:54:34] fail:     at Object.mono_wasm_trace_logger (/datadisks/disk1/work/AD3B0951/w/AA4D093E/e/dotnet.js:3:15099)
[21:54:34] fail:     at _mono_wasm_trace_logger (/datadisks/disk1/work/AD3B0951/w/AA4D093E/e/dotnet.js:12:108815)
[21:54:34] fail:     at wasm_trace_logger (<anonymous>:wasm-function[111]:0x9755)
[21:54:34] fail:     at eglib_log_adapter (<anonymous>:wasm-function[2506]:0xa2d4f)
[21:54:34] fail:     at monoeg_g_logv_nofree (<anonymous>:wasm-function[8420]:0x1b7ae3)
[21:54:34] fail:     at monoeg_assertion_message (<anonymous>:wasm-function[8423]:0x1b7b72)
[21:54:34] fail:     at mono_assertion_message (<anonymous>:wasm-function[8425]:0x1b7bb5)
[21:54:34] fail:     at mono_assertion_message_disabled (<anonymous>:wasm-function[8424]:0x1b7b88)
[21:54:34] fail:     at setup_stack_trace (<anonymous>:wasm-function[7960]:0x1a78f0)
[21:54:34] fail:     at mono_handle_exception_internal (<anonymous>:wasm-function[7938]:0x1a6081)
[21:54:34] fail:     at mono_handle_exception (<anonymous>:wasm-function[7921]:0x1a41d6)
[21:54:34] fail:     at interp_throw (<anonymous>:wasm-function[225]:0x1a916)
[21:54:34] fail:     at interp_exec_method (<anonymous>:wasm-function[169]:0x14547)
[21:54:34] fail:     at interp_runtime_invoke (<anonymous>:wasm-function[168]:0xbccf)
[21:54:34] fail:     at mono_jit_runtime_invoke (<anonymous>:wasm-function[7732]:0x196d0d)
[21:54:34] fail:     at do_runtime_invoke (<anonymous>:wasm-function[1900]:0x83f79)
[21:54:34] fail:     at mono_runtime_invoke_checked (<anonymous>:wasm-function[1898]:0x83eeb)
[21:54:34] fail:     at ves_icall_InternalInvoke_raw (<anonymous>:wasm-function[1261]:0x6522a)
[21:54:34] fail:     at do_icall (<anonymous>:wasm-function[258]:0x1b6d9)
[21:54:34] fail:     at do_icall_wrapper (<anonymous>:wasm-function[229]:0x1ad1b)
[21:54:34] fail:     at interp_exec_method (<anonymous>:wasm-function[169]:0xce1b)
[21:54:34] fail:     at interp_runtime_invoke (<anonymous>:wasm-function[168]:0xbccf)
[21:54:34] fail:     at mono_jit_runtime_invoke (<anonymous>:wasm-function[7732]:0x196d0d)
[21:54:34] fail:     at do_runtime_invoke (<anonymous>:wasm-function[1900]:0x83f79)
[21:54:34] fail:     at mono_runtime_try_invoke (<anonymous>:wasm-function[1904]:0x845e0)
[21:54:34] fail:     at mono_wasm_invoke_method (<anonymous>:mono_wasm_invoke_method (wasm-function[118]:0x991c))
[21:54:34] fail:     at Module._mono_wasm_invoke_method (/datadisks/disk1/work/AD3B0951/w/AA4D093E/e/dotnet.js:12:128850)
[21:54:34] fail:     at Object.t.<computed> (/datadisks/disk1/work/AD3B0951/w/AA4D093E/e/dotnet.js:3:4100)
[21:54:34] fail:     at _call_method_with_converted_args (/datadisks/disk1/work/AD3B0951/w/AA4D093E/e/dotnet.js:3:48191)
[21:54:34] fail:     at call_method (/datadisks/disk1/work/AD3B0951/w/AA4D093E/e/dotnet.js:3:47309)
[21:54:34] fail:     at /datadisks/disk1/work/AD3B0951/w/AA4D093E/e/dotnet.js:3:49132
[21:54:34] fail:     at mono_call_assembly_entry_point (/datadisks/disk1/work/AD3B0951/w/AA4D093E/e/dotnet.js:3:49260)
[21:54:34] fail:     at Object.mono_run_main (/datadisks/disk1/work/AD3B0951/w/AA4D093E/e/dotnet.js:3:57765)
[21:54:34] fail:     at Object.init (/datadisks/disk1/work/AD3B0951/w/AA4D093E/e/test-main.js:214:43)
[21:54:34] fail:     at Object.onDotnetReady (/datadisks/disk1/work/AD3B0951/w/AA4D093E/e/test-main.js:153:17)
[21:54:34] fail:     at finalize_startup (/datadisks/disk1/work/AD3B0951/w/AA4D093E/e/dotnet.js:3:62585)
[21:54:34] fail:     at mono_wasm_after_runtime_initialized (/datadisks/disk1/work/AD3B0951/w/AA4D093E/e/dotnet.js:3:59479)
[21:54:34] fail:     at callRuntimeCallbacks (/datadisks/disk1/work/AD3B0951/w/AA4D093E/e/dotnet.js:12:17800)
[21:54:34] fail:     at postRun (/datadisks/disk1/work/AD3B0951/w/AA4D093E/e/dotnet.js:12:13708)
[21:54:34] fail:     at doRun (/datadisks/disk1/work/AD3B0951/w/AA4D093E/e/dotnet.js:12:145047)
[21:54:34] fail:     at run (/datadisks/disk1/work/AD3B0951/w/AA4D093E/e/dotnet.js:12:145204)
[21:54:34] fail:     at runCaller (/datadisks/disk1/work/AD3B0951/w/AA4D093E/e/dotnet.js:12:144684)
[21:54:34] fail:     at Object.removeRunDependency (/datadisks/disk1/work/AD3B0951/w/AA4D093E/e/dotnet.js:12:14500)
[21:54:34] fail:     at mono_wasm_pre_init (/datadisks/disk1/work/AD3B0951/w/AA4D093E/e/dotnet.js:3:59319)
[21:54:34] fail: * Assertion at /__w/1/s/src/mono/mono/mini/mini-exceptions.c:1730, condition `<disabled>' not met
[21:54:34] fail: 
[21:54:34] info: Process node exited with 1

@radical
Copy link
Member Author

radical commented Feb 14, 2022

Another with nodejs, build:

[21:54:13] fail: Trace: * Assertion at /__w/1/s/src/mono/mono/metadata/class-accessors.c:207, condition `<disabled>' not met
[21:54:13] fail: 
[21:54:13] fail:     at Object.mono_wasm_trace_logger (/datadisks/disk1/work/AD3B0951/w/B3D20A13/e/dotnet.js:3:15099)
[21:54:13] fail:     at _mono_wasm_trace_logger (/datadisks/disk1/work/AD3B0951/w/B3D20A13/e/dotnet.js:12:108815)
[21:54:13] fail:     at wasm_trace_logger (<anonymous>:wasm-function[111]:0x9755)
[21:54:13] fail:     at eglib_log_adapter (<anonymous>:wasm-function[2506]:0xa2d4f)
[21:54:13] fail:     at monoeg_g_logv_nofree (<anonymous>:wasm-function[8420]:0x1b7ae3)
[21:54:13] fail:     at monoeg_assertion_message (<anonymous>:wasm-function[8423]:0x1b7b72)
[21:54:13] fail:     at mono_assertion_message (<anonymous>:wasm-function[8425]:0x1b7bb5)
[21:54:13] fail:     at mono_assertion_message_disabled (<anonymous>:wasm-function[8424]:0x1b7b88)
[21:54:13] fail:     at mono_class_set_method_count (<anonymous>:wasm-function[723]:0x41730)
[21:54:13] fail:     at mono_class_init_internal (<anonymous>:wasm-function[667]:0x3c22b)
[21:54:13] fail:     at mono_class_init_internal (<anonymous>:wasm-function[667]:0x3bd8a)
[21:54:13] fail:     at mono_class_vtable_checked (<anonymous>:wasm-function[1907]:0x848c2)
[21:54:13] fail:     at mono_array_new_checked (<anonymous>:wasm-function[1956]:0x874bc)
[21:54:13] fail:     at mono_glist_to_array (<anonymous>:wasm-function[2005]:0x88d03)
[21:54:13] fail:     at setup_stack_trace (<anonymous>:wasm-function[7960]:0x1a77dd)
[21:54:13] fail:     at mono_handle_exception_internal (<anonymous>:wasm-function[7938]:0x1a6081)
[21:54:13] fail:     at mono_handle_exception (<anonymous>:wasm-function[7921]:0x1a41d6)
[21:54:13] fail:     at interp_throw (<anonymous>:wasm-function[225]:0x1a916)
[21:54:13] fail:     at interp_exec_method (<anonymous>:wasm-function[169]:0x14547)
[21:54:13] fail:     at interp_runtime_invoke (<anonymous>:wasm-function[168]:0xbccf)
[21:54:13] fail:     at mono_jit_runtime_invoke (<anonymous>:wasm-function[7732]:0x196d0d)
[21:54:13] fail:     at do_runtime_invoke (<anonymous>:wasm-function[1900]:0x83f79)
[21:54:13] fail:     at mono_runtime_invoke_checked (<anonymous>:wasm-function[1898]:0x83eeb)
[21:54:13] fail:     at ves_icall_InternalInvoke_raw (<anonymous>:wasm-function[1261]:0x6522a)
[21:54:13] fail:     at do_icall (<anonymous>:wasm-function[258]:0x1b6d9)
[21:54:13] fail:     at do_icall_wrapper (<anonymous>:wasm-function[229]:0x1ad1b)
[21:54:13] fail:     at interp_exec_method (<anonymous>:wasm-function[169]:0xce1b)
[21:54:13] fail:     at interp_runtime_invoke (<anonymous>:wasm-function[168]:0xbccf)
[21:54:13] fail:     at mono_jit_runtime_invoke (<anonymous>:wasm-function[7732]:0x196d0d)
[21:54:13] fail:     at do_runtime_invoke (<anonymous>:wasm-function[1900]:0x83f79)
[21:54:13] fail:     at mono_runtime_try_invoke (<anonymous>:wasm-function[1904]:0x845e0)
[21:54:13] fail:     at mono_wasm_invoke_method (<anonymous>:mono_wasm_invoke_method (wasm-function[118]:0x991c))
[21:54:13] fail:     at Module._mono_wasm_invoke_method (/datadisks/disk1/work/AD3B0951/w/B3D20A13/e/dotnet.js:12:128850)
[21:54:13] fail:     at Object.t.<computed> (/datadisks/disk1/work/AD3B0951/w/B3D20A13/e/dotnet.js:3:4100)
[21:54:13] fail:     at _call_method_with_converted_args (/datadisks/disk1/work/AD3B0951/w/B3D20A13/e/dotnet.js:3:48191)
[21:54:13] fail:     at call_method (/datadisks/disk1/work/AD3B0951/w/B3D20A13/e/dotnet.js:3:47309)
[21:54:13] fail:     at /datadisks/disk1/work/AD3B0951/w/B3D20A13/e/dotnet.js:3:49132
[21:54:13] fail:     at mono_call_assembly_entry_point (/datadisks/disk1/work/AD3B0951/w/B3D20A13/e/dotnet.js:3:49260)
[21:54:13] fail:     at Object.mono_run_main (/datadisks/disk1/work/AD3B0951/w/B3D20A13/e/dotnet.js:3:57765)
[21:54:13] fail:     at Object.init (/datadisks/disk1/work/AD3B0951/w/B3D20A13/e/test-main.js:214:43)
[21:54:13] fail:     at Object.onDotnetReady (/datadisks/disk1/work/AD3B0951/w/B3D20A13/e/test-main.js:153:17)
[21:54:13] fail:     at finalize_startup (/datadisks/disk1/work/AD3B0951/w/B3D20A13/e/dotnet.js:3:62585)
[21:54:13] fail:     at mono_wasm_after_runtime_initialized (/datadisks/disk1/work/AD3B0951/w/B3D20A13/e/dotnet.js:3:59479)
[21:54:13] fail:     at callRuntimeCallbacks (/datadisks/disk1/work/AD3B0951/w/B3D20A13/e/dotnet.js:12:17800)
[21:54:13] fail:     at postRun (/datadisks/disk1/work/AD3B0951/w/B3D20A13/e/dotnet.js:12:13708)
[21:54:13] fail:     at doRun (/datadisks/disk1/work/AD3B0951/w/B3D20A13/e/dotnet.js:12:145047)
[21:54:13] fail:     at run (/datadisks/disk1/work/AD3B0951/w/B3D20A13/e/dotnet.js:12:145204)
[21:54:13] fail:     at runCaller (/datadisks/disk1/work/AD3B0951/w/B3D20A13/e/dotnet.js:12:144684)
[21:54:13] fail:     at Object.removeRunDependency (/datadisks/disk1/work/AD3B0951/w/B3D20A13/e/dotnet.js:12:14500)
[21:54:13] fail:     at mono_wasm_pre_init (/datadisks/disk1/work/AD3B0951/w/B3D20A13/e/dotnet.js:3:59319)
[21:54:13] fail: * Assertion at /__w/1/s/src/mono/mono/metadata/class-accessors.c:207, condition `<disabled>' not met
[21:54:13] fail: 
[21:54:13] info: Process node exited with 1

@radical radical changed the title [wasm] interpreter crash memory access out of bounds in System.Collections.Immutable.Tests [wasm] Multiple runtime crashes, and asserts in System.Collections.Immutable.Tests Feb 15, 2022
@elinor-fung
Copy link
Member

Marking blocking-clean-ci. A lot of PR builds are hitting this.

@elinor-fung elinor-fung added the blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' label Feb 15, 2022
@AaronRobinsonMSFT
Copy link
Member

Hitting this in #65246

Test log

[02:32:55] fail: ==== JS stack trace =========================================
                 
[02:32:55] fail: 
                 
[02:32:55] fail: Security context: 0x21e10820dca9 <JSObject>#0#
                 
[02:32:55] fail:     0: builtin exit frame: trace(this=0x21e108203701 <console map = 0x21e108240919>#1#,0x21e1083848b1 <String[92]: c"* Assertion at /__w/1/s/src/mono/mono/metadata/class.c:1990, condition `<disabled>' not met\n">,0x21e108203701 <console map = 0x21e108240919>#1#)
                 
[02:32:55] fail: 
                 
[02:32:55] fail:     1: mono_wasm_trace_logger [0x21e108416a45] [./dotnet.js:3] [bytecode=0x21e1082eac75 offset=153](this=0x21e1084075f1 <Object map = 0x21e108246a21>#2#,0,20634,85184904,4,0)
                 
[02:32:55] fail:     2: _mono_wasm_trace_logger [0x21e1084019b5] [./dotnet.js:12] [bytecode=0x21e1082eab7d offset=31](this=0x21e108402f9d <JSGlobal Object>#3#)
                 
[02:32:55] fail:     3: arguments adaptor frame: 5->0
                 
[02:32:55] fail:     4: WasmToJsFrame [pc: 0x153dcb83c95b]
                 
[02:32:55] fail:     5: WASM [0096eb4a], function #111 (''), pc=0x153dcbd889ff (+0x3f), pos=38741 (+11)
                 
[02:32:55] fail:     6: WASM [0096eb4a], function #2506 (''), pc=0x153dcbc3f0c3 (+0xa3), pos=667125 (+39)
                 
[02:32:55] fail:     7: WASM [0096eb4a], function #8420 (''), pc=0x153dcb953f18 (+0xf8), pos=1801097 (+97)
                 
[02:32:55] fail:     8: WASM [0096eb4a], function #8423 (''), pc=0x153dcb953c07 (+0x47), pos=1801240 (+31)
                 
[02:32:55] fail:     9: WASM [0096eb4a], function #8425 (''), pc=0x153dcb953ac5 (+0x45), pos=1801307 (+39)
                 
[02:32:55] fail:    10: WASM [0096eb4a], function #8424 (''), pc=0x153dcb953b62 (+0x22), pos=1801262 (+9)
                 
[02:32:55] fail:    11: WASM [0096eb4a], function #566 (''), pc=0x153dcbd542d8 (+0x278), pos=229062 (+283)
                 
[02:32:55] fail:    12: WASM [0096eb4a], function #398 (''), pc=0x153dcbd6c3ea (+0x4a), pos=193996 (+26)
                 
[02:32:55] fail:    13: WASM [0096eb4a], function #345 (''), pc=0x153dcb906162 (+0x1c62), pos=157847 (+3868)
                 
[02:32:55] fail:    14: WASM [0096eb4a], function #327 (''), pc=0x153dcb861446 (+0x60e6), pos=128628 (+8472)
                 
[02:32:55] fail:    15: WASM [0096eb4a], function #379 (''), pc=0x153dcb87fa3e (+0x11be), pos=166221 (+2125)
                 
[02:32:55] fail:    16: WASM [0096eb4a], function #223 (''), pc=0x153dcbd7c77c (+0x9c), pos=108657 (+51)
                 
[02:32:55] fail:    17: WASM [0096eb4a], function #169 (''), pc=0x153dcb84d2b0 (+0xeeb0), pos=101305 (+52908)
                 
[02:32:55] fail:    18: WASM [0096eb4a], function #168 (''), pc=0x153dcbd81f93 (+0x1f3), pos=48335 (+231)
                 
[02:32:55] fail:    19: WASM [0096eb4a], function #7732 (''), pc=0x153dcb9a8782 (+0x1162), pos=1666483 (+43)
                 
[02:32:55] fail:    20: WASM [0096eb4a], function #1900 (''), pc=0x153dcbc9214b (+0x1eb), pos=540703 (+110)
                 
[02:32:55] fail:    21: WASM [0096eb4a], function #1898 (''), pc=0x153dcbc92418 (+0x38), pos=540561 (+39)
                 
[02:32:55] fail:    22: WASM [0096eb4a], function #1261 (''), pc=0x153dcbcea72a (+0x11ea), pos=414416 (+1945)
                 
[02:32:55] fail:    23: WASM [0096eb4a], function #258 (''), pc=0x153dcbd797fc (+0x53c), pos=112371 (+253)
                 
[02:32:55] fail:    24: WASM [0096eb4a], function #229 (''), pc=0x153dcbd7bae6 (+0x106), pos=109877 (+272)
                 
[02:32:55] fail:    25: WASM [0096eb4a], function #169 (''), pc=0x153dcb84d109 (+0xed09), pos=52763 (+4366)
                 
[02:32:55] fail:    26: WASM [0096eb4a], function #168 (''), pc=0x153dcb8323fb (+0x27b), pos=48335 (+231)
                 
[02:32:55] fail:    27: WASM [0096eb4a], function #7732 (''), pc=0x153dcb3ab7f8 (+0xf8), pos=1666483 (+43)
                 
[02:32:55] fail:    28: WASM [0096eb4a], function #1900 (''), pc=0x153dcb716474 (+0x234), pos=540703 (+110)
                 
[02:32:55] fail:    29: WASM [0096eb4a], function #1904 (''), pc=0x153dcb714fb5 (+0x95), pos=542342 (+37)
                 
[02:32:55] fail:    30: WASM [0096eb4a], function #118 ('mono_wasm_invoke_method'), pc=0x153dcb8399e5 (+0x125), pos=39196 (+101)
                 
[02:32:55] fail:    31: JsToWasmFrame [pc: 0x21e100083571]
                 
[02:32:55] fail:    32: /* anonymous */ [0x21e1082c5a01] [./dotnet.js:12] [bytecode=0x21e108467fe1 offset=43](this=0x21e108402f9d <JSGlobal Object>#3#)
                 
[02:32:55] fail:    33: arguments adaptor frame: 4->0
                 
[02:32:55] fail:    34: /* anonymous */ [0x21e10823acf1] [./dotnet.js:3] [bytecode=0x21e1082db189 offset=117](this=0x21e10841668d <Object map = 0x21e108243349>#4#)
                 
[02:32:55] fail:    35: arguments adaptor frame: 4->0
                 
[02:32:55] fail:    36: _call_method_with_converted_args(aka _call_method_with_converted_args) [0x21e108417761] [./dotnet.js:3] [bytecode=0x21e108467d2d offset=51](this=0x21e10804030d <undefined>,56625504,0,0x21e108475541 <Object map = 0x21e108253311>#5#,0x21e108040171 <null>,56663752,0x21e1080403e5 <true>,0x21e10804030d <undefined>)
                 
[02:32:55] fail:    37: call_method(aka call_method) [0x21e1084176e1] [./dotnet.js:3] [bytecode=0x21e1082fe15d offset=214](this=0x21e10804030d <undefined>,56625504,0,0x21e108210125 <String[1]: #m>,0x21e10818acd9 <JSArray[1]>#6#)
                 
[02:32:55] fail:    38: /* anonymous */(aka /* anonymous */) [0x21e10818bb1d] [./dotnet.js:3] [bytecode=0x21e1082fc7e1 offset=148](this=0x21e10804030d <undefined>)
                 
[02:32:55] fail:    39: arguments adaptor frame: 1->0
                 
[02:32:55] fail:    40: mono_call_assembly_entry_point(aka mono_call_assembly_entry_point) [0x21e1084177e1] [./dotnet.js:3] [bytecode=0x21e1082fc081 offset=27](this=0x21e10804030d <undefined>,0x21e108421059 <String[18]: "WasmTestRunner.dll">,0x21e10818ad05 <JSArray[1]>#7#,0x21e108210125 <String[1]: #m>)
                 
[02:32:55] fail:    41: mono_run_main [0x21e108417b45] [./dotnet.js:3] [bytecode=0x21e1082fb91d offset=55](this=0x21e1084165ed <Object map = 0x21e10824ac39>#8#,0x21e108421059 <String[18]: "WasmTestRunner.dll">,0x21e10818cff1 <JSArray[7]>#9#)
                 
[02:32:55] fail:    42: init [0x21e108420eed] [test-main.js:214] [bytecode=0x21e1082fb489 offset=712](this=0x21e108407571 <Object map = 0x21e108252c31>#10#,0x21e10818afbd <Object map = 0x21e108252b91>#11#)
                 
[02:32:55] fail:    43: onDotnetReady [0x21e10841a895] [test-main.js:153] [bytecode=0x21e1082fadd5 offset=199](this=0x21e108415831 <Object map = 0x21e10824f469>#12#)
                 
[02:32:55] fail:    44: finalize_startup(aka finalize_startup) [0x21e108417cb9] [./dotnet.js:3] [bytecode=0x21e1082efe61 offset=512](this=0x21e10804030d <undefined>,0x21e108416635 <Object map = 0x21e10824d849>#13#)
                 
[02:32:55] fail:    45: mono_wasm_after_runtime_initialized(aka mono_wasm_after_runtime_initialized) [0x21e108417c19] [./dotnet.js:3] [bytecode=0x21e1082da2d9 offset=67](this=0x21e10804030d <undefined>)
                 
[02:32:55] fail:    46: arguments adaptor frame: 1->0
                 
[02:32:55] fail:    47: callRuntimeCallbacks [0x21e108415dc9] [./dotnet.js:12] [bytecode=0x21e1082d6fd5 offset=32](this=0x21e108402f9d <JSGlobal Object>#3#,0x21e108415bd9 <JSArray[0]>#14#)
                 
[02:32:55] fail:    48: postRun [0x21e108415c69] [./dotnet.js:12] [bytecode=0x21e1082da15d offset=110](this=0x21e108402f9d <JSGlobal Object>#3#)
                 
[02:32:55] fail:    49: doRun [0x21e108434379] [./dotnet.js:12] [bytecode=0x21e1082d7191 offset=91](this=0x21e108402f9d <JSGlobal Object>#3#)
                 
[02:32:55] fail:    50: run [0x21e108416409] [./dotnet.js:12] [bytecode=0x21e1082c7429 offset=117](this=0x21e108402f9d <JSGlobal Object>#3#,0x21e1084158c5 <Arguments map = 0x21e108241d19>#15#)
                 
[02:32:55] fail:    51: arguments adaptor frame: 0->1
                 
[02:32:55] fail:    52: runCaller [0x21e108415ce9] [./dotnet.js:12] [bytecode=0x21e1082d6da5 offset=11](this=0x21e108402f9d <JSGlobal Object>#3#)
                 
[02:32:55] fail:    53: removeRunDependency [0x21e108408be1] [./dotnet.js:12] [bytecode=0x21e1082d16a5 offset=76](this=0x21e108402f9d <JSGlobal Object>#3#,0x21e1082c4d15 <String[16]: #wasm-instantiate>)
                 
[02:32:55] fail:    54: receiveInstance [0x21e1084211f5] [./dotnet.js:12] [bytecode=0x21e1082d6aa1 offset=118](this=0x21e108402f9d <JSGlobal Object>#3#,0x21e1082d3a01 <Instance map = 0x21e108244a69>#16#,0x21e10804030d <undefined>)
                 
[02:32:55] fail:    55: arguments adaptor frame: 1->2
                 
[02:32:55] fail:    56: receiveInstantiationResult [0x21e108421215] [./dotnet.js:12] [bytecode=0x21e1082d6a05 offset=10](this=0x21e108402f9d <JSGlobal Object>#3#,0x21e1084343c9 <Object map = 0x21e10824eb09>#17#)
                 
[02:32:55] fail:    57: StubFrame [pc: 0x5560fc9dbef8]
                 
[02:32:55] fail:    58: StubFrame [pc: 0x5560fc947f24]
                 
[02:32:55] fail:    59: EntryFrame [pc: 0x5560fc9258f8]
                 
[02:32:55] fail: =====================
                 
[02:32:55] fail: 
                 
[02:32:55] fail: * Assertion at /__w/1/s/src/mono/mono/metadata/class.c:1990, condition `<disabled>' not met
                 
[02:32:55] fail: 
                 
[02:32:55] info: Process v8 exited with 1

@radical
Copy link
Member Author

radical commented Feb 16, 2022

Getting a a different crash now on a rolling build:

V8:

RuntimeError: invalid index into function table
    at <anonymous>:wasm-function[8373]:0x1b6435
    at <anonymous>:wasm-function[8495]:0x1b97b9
    at <anonymous>:wasm-function[1826]:0x81750
    at <anonymous>:wasm-function[1566]:0x77313
    at <anonymous>:wasm-function[1605]:0x791ed
    at <anonymous>:wasm-function[168]:0xbc36
    at <anonymous>:wasm-function[7732]:0x196db3
    at <anonymous>:wasm-function[1900]:0x8401f
    at <anonymous>:wasm-function[1904]:0x84686
    at <anonymous>:wasm-function[1901]:0x842f0
    at <anonymous>:wasm-function[379]:0x28172
    at <anonymous>:wasm-function[223]:0x1a871
    at <anonymous>:wasm-function[169]:0x18bb9
    at <anonymous>:wasm-function[168]:0xbccf
    at <anonymous>:wasm-function[7732]:0x196db3
    at <anonymous>:wasm-function[1900]:0x8401f
    at <anonymous>:wasm-function[1898]:0x83f91
    at <anonymous>:wasm-function[1261]:0x652d0
    at <anonymous>:wasm-function[258]:0x1b6f3
    at <anonymous>:wasm-function[229]:0x1ad35
    at <anonymous>:wasm-function[169]:0xce1b
    at <anonymous>:wasm-function[168]:0xbccf
    at <anonymous>:wasm-function[7732]:0x196db3
    at <anonymous>:wasm-function[1900]:0x8401f
    at <anonymous>:wasm-function[1904]:0x84686
    at mono_wasm_invoke_method (<anonymous>:wasm-function[118]:0x991c)
    at Module._mono_wasm_invoke_method (./dotnet.js:12:128850)
    at Object.t.<computed> (./dotnet.js:3:4100)
    at _call_method_with_converted_args (./dotnet.js:3:48191)
    at call_method (./dotnet.js:3:47309)
    at ./dotnet.js:3:49132
    at mono_call_assembly_entry_point (./dotnet.js:3:49260)
    at Object.mono_run_main (./dotnet.js:3:57765)
    at Object.init (test-main.js:214:43)
    at Object.onDotnetReady (test-main.js:153:17)
    at finalize_startup (./dotnet.js:3:62585)
    at mono_wasm_after_runtime_initialized (./dotnet.js:3:59479)
    at callRuntimeCallbacks (./dotnet.js:12:17800)
    at postRun (./dotnet.js:12:13708)
    at doRun (./dotnet.js:12:145047)
    at run (./dotnet.js:12:145204)
    at runCaller (./dotnet.js:12:144684)
    at removeRunDependency (./dotnet.js:12:14500)
    at receiveInstance (./dotnet.js:12:16355)
    at receiveInstantiationResult (./dotnet.js:12:16476)
Process v8 exited with 1

chrome, which seems to be essentially the same crash:

RuntimeError: table index is out of bounds
    at http://127.0.0.1:35473/dotnet.wasm:wasm-function[8373]:0x1b6435
    at http://127.0.0.1:35473/dotnet.wasm:wasm-function[8495]:0x1b97b9
    at http://127.0.0.1:35473/dotnet.wasm:wasm-function[1826]:0x81750
    at http://127.0.0.1:35473/dotnet.wasm:wasm-function[1566]:0x77313
    at http://127.0.0.1:35473/dotnet.wasm:wasm-function[1605]:0x791ed
    at http://127.0.0.1:35473/dotnet.wasm:wasm-function[168]:0xbc36
    at http://127.0.0.1:35473/dotnet.wasm:wasm-function[7732]:0x196db3
    at http://127.0.0.1:35473/dotnet.wasm:wasm-function[1900]:0x8401f
    at http://127.0.0.1:35473/dotnet.wasm:wasm-function[1904]:0x84686
    at http://127.0.0.1:35473/dotnet.wasm:wasm-function[1901]:0x842f0

radical added a commit to radical/runtime that referenced this issue Feb 16, 2022
radical added a commit that referenced this issue Feb 17, 2022
* [wasm] Disable aot tests failing due to OOM

- #65356 - OOM while linking
    `System.Text.Json.SourceGeneration.Roslyn3.11.Tests`

- #65411 - possible OOM when
  compiling `System.Text.Json.SourceGeneration.Roslyn4.0.Tests.dll.bc` -> `.o`
     `System.Text.Json.SourceGeneration.Roslyn4.0.Tests`

- #61524 - OOM while linking
    `System.Text.Json.Tests`

* Disable System.Collections.Immutable.Tests due to #65335
@radical radical added disabled-test The test is disabled in source code against the issue and removed blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' labels Feb 17, 2022
@radical
Copy link
Member Author

radical commented Feb 17, 2022

Disabled the tests, so removing blocking-clean-ci.

radical added a commit to radekdoulik/runtime that referenced this issue Feb 17, 2022
System.Linq.Tests.csproj: dotnet#64774

System.Text.Json.Tests.csproj: dotnet#64775

System.Text.RegularExpressions.Tests.csproj: dotnet#64769

System.Threading.Channels.Tests.csproj: dotnet#65012

System.Collections.Immutable.Tests.csproj: dotnet#65335
@radical
Copy link
Member Author

radical commented Feb 18, 2022

This started with the 2.0.34 bump, which has been rolled back now.

@radical radical closed this as completed Feb 18, 2022
@elinor-fung
Copy link
Member

@radical / @radekdoulik do you know what it was about the newer emscripten version that resulted in the assortment of failures?

lewing added a commit that referenced this issue Mar 22, 2022
* Initial changes for emscripten 2.0.34

* Use emcc-link.rsp in build targets

* Use updated docker images

* Fix compiler warnings

Co-authored-by: Zoltan Varga <vargaz@gmail.com>

* Put `--profiling-funcs` to `_EmccLinkFlags`

* Fix build

    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 ();

* Add shell to the environment

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`
      (#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

* Add emcc-link.rsp to PlatformManifestFileEntry

* Feedback

https://github.com/emscripten-core/emscripten/blob/2fda25eea756c78c8cb024aa5b6c2b188bf7990f/src/settings.js#L1173-L1176

-s EXPORT_ES6 is link option

* Bump emscripten version

* Bump llvm package version and use its libclang

* Use newer docker images with emscripten 3.1.1

* Remove unused variable

* Add note about icu repo

* Add comment to improve code readability

* Bump the ICU and emsdk versions

* disable non-wasm builds

* disable wasm jobs in runtime, and runtime-staging, as we'll be running runtime-wasm manually

* [wasm] Re-enable tests that were disabled due to the earlier emsdk bump

System.Linq.Tests.csproj: #64774

System.Text.Json.Tests.csproj: #64775

System.Text.RegularExpressions.Tests.csproj: #64769

System.Threading.Channels.Tests.csproj: #65012

System.Collections.Immutable.Tests.csproj: #65335

* [wasm] Disable nodejs tests

They are still unstable, and fail with:

```
[01:27:29] fail: /datadisks/disk1/work/A3DA08F7/w/B1B30976/e/test-main.js:97
[01:27:29] fail: if (typeof globalThis.crypto === 'undefined') {
[01:27:29] fail: ^
[01:27:29] fail:
[01:27:29] fail: ReferenceError: globalThis is not defined
[01:27:29] fail:     at Object.<anonymous> (/datadisks/disk1/work/A3DA08F7/w/B1B30976/e/test-main.js:97:1)
[01:27:29] fail:     at Module._compile (internal/modules/cjs/loader.js:778:30)
[01:27:29] fail:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
[01:27:29] fail:     at Module.load (internal/modules/cjs/loader.js:653:32)
[01:27:29] fail:     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
[01:27:29] fail:     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
[01:27:29] fail:     at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
[01:27:29] fail:     at startup (internal/bootstrap/node.js:283:19)
[01:27:29] fail:     at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
```

Issue: #65485

* fix wbt build

* Update path to node in helix commands.

* disable non-wasm builds

* [wasm] Make emscripten version mismatch an error on CI

* Bump emscripten packages used to preview3, which has emsdk 3.1.1

* Update emscripten package version in Versions.props tooo

* Re-enable wasm jobs

* enable non-wasm jobs

* Add more missing exports

* __dl_seterr shouldn't be needed

* Fix MicrosoftNETCoreRuntimeICUTransportVersion

* Put back the 3.1.1 docker images after merge

* Revert "fix wbt build"

This reverts commit f7c77d9.

* Revert "[wasm] Disable nodejs tests"

This reverts commit 7b90965.

* Use newer ICU package, last that still had 3.1.1

* Try different helix queue parameter

* Revert "Try different helix queue parameter"

This reverts commit a34230f.

* Fix helix queue with docker tag

* Try to set PYTHONPATH for emscripten

* [wasm] Do not set _WasmDevel=true for blazor projects

* Increase timeout

The AOT tests are canceled after timeout

* Fix WBT tests

Co-authored-by: Ankit Jain <radical@gmail.com>

* [wasm] Export more functions

`htons,ntohs,_get_daylight,_get_timezone,_get_tzname`

.. to fix:

```
EXEC : warning : undefined symbol: htons (referenced by $inetPton6__deps: ['htons','$jstoi_q'], referenced by $writeSockaddr__deps: ['$Sockets','$inetPton4','$inetPton6','$zeroMemory'], referenced by __syscall_accept4__deps: ['$getSocketFromFD','$writeSockaddr','$DNS','$SYSCALLS'], referenced by top-level compiled C/C++ code) [C:\helix\work\workitem\e\publish\ProxyProjectForAOTOnHelix.proj]
EXEC : warning : undefined symbol: ntohs (referenced by $inetNtop6__deps: ['$inetNtop4','ntohs'], referenced by $readSockaddr__deps: ['$Sockets','$inetNtop4','$inetNtop6','ntohs'], referenced by $getSocketAddress__deps: ['$readSockaddr','$FS','$DNS'], referenced by __syscall_bind__deps: ['$getSocketFromFD','$getSocketAddress','$SYSCALLS'], referenced by top-level compiled C/C++ code) [C:\helix\work\workitem\e\publish\ProxyProjectForAOTOnHelix.proj]
EXEC : warning : undefined symbol: _get_daylight (referenced by tzset_impl__deps: ['_get_daylight','_get_timezone','_get_tzname'], referenced by tzset__deps: ['tzset_impl'], referenced by localtime_r__deps: ['tzset'], referenced by top-level compiled C/C++ code) [C:\helix\work\workitem\e\publish\ProxyProjectForAOTOnHelix.proj]
EXEC : warning : undefined symbol: _get_timezone (referenced by tzset_impl__deps: ['_get_daylight','_get_timezone','_get_tzname'], referenced by tzset__deps: ['tzset_impl'], referenced by localtime_r__deps: ['tzset'], referenced by top-level compiled C/C++ code) [C:\helix\work\workitem\e\publish\ProxyProjectForAOTOnHelix.proj]
EXEC : warning : undefined symbol: _get_tzname (referenced by tzset_impl__deps: ['_get_daylight','_get_timezone','_get_tzname'], referenced by tzset__deps: ['tzset_impl'], referenced by localtime_r__deps: ['tzset'], referenced by top-level compiled C/C++ code) [C:\helix\work\workitem\e\publish\ProxyProjectForAOTOnHelix.proj]
```

```
Starting:    Microsoft.Extensions.Logging.Tests.dll
Message1
:
testKey3:testValue, testKey2:, testKey1:
missing function: ntohs
Error
    at Object.onAbort (test-main.js:176:60)
    at abort (./dotnet.js:1316:24)
    at _ntohs (./dotnet.js:4990:35)
    at readSockaddr (./dotnet.js:5091:18)
    ...
```

* fix exported function names

Co-authored-by: Radek Doulik <radekdoulik@google.com>
Co-authored-by: Zoltan Varga <vargaz@gmail.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Marek Fišera <mara@neptuo.com>
@ghost ghost locked as resolved and limited conversation to collaborators Mar 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Codegen-Interpreter-mono disabled-test The test is disabled in source code against the issue
Projects
None yet
Development

No branches or pull requests

5 participants