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] remainder by zero crash in System.Threading.Channels.Tests, on browser #65245

Closed
Tracked by #65012 ...
radical opened this issue Feb 12, 2022 · 6 comments
Closed
Tracked by #65012 ...
Assignees
Labels
arch-wasm WebAssembly architecture area-VM-meta-mono disabled-test The test is disabled in source code against the issue
Milestone

Comments

@radical
Copy link
Member

radical commented Feb 12, 2022

Found on my debugging PR #65178:

Build, Log:

Running on Linux+chrome:

[02:42:42] fail: RuntimeError: remainder by zero
                     at http://127.0.0.1:38263/dotnet.wasm:mono_g_hash_table_find_slot (wasm-function[1884]:0x8364e)
                     at http://127.0.0.1:38263/dotnet.wasm:mono_g_hash_table_lookup_extended (wasm-function[1883]:0x835ea)
                     at http://127.0.0.1:38263/dotnet.wasm:mono_g_hash_table_lookup (wasm-function[1882]:0x835b2)
                     at http://127.0.0.1:38263/dotnet.wasm:mono_string_is_interned_lookup (wasm-function[1951]:0x8722b)
                     at http://127.0.0.1:38263/dotnet.wasm:mono_ldstr_metadata_sig (wasm-function[1949]:0x871b1)
                     at http://127.0.0.1:38263/dotnet.wasm:mono_ldstr_checked (wasm-function[1997]:0x88a61)
                     at http://127.0.0.1:38263/dotnet.wasm:generate_code (wasm-function[327]:0x209af)
                     at http://127.0.0.1:38263/dotnet.wasm:mono_interp_transform_method (wasm-function[379]:0x28932)
                     at http://127.0.0.1:38263/dotnet.wasm:do_transform_method (wasm-function[223]:0x1a856)
                     at http://127.0.0.1:38263/dotnet.wasm:interp_exec_method (wasm-function[169]:0x18b9e)
[02:42:42] fail: [out of order message from the browser]: http://127.0.0.1:38263/dotnet.wasm 0:538190 Uncaught RuntimeError: remainder by zero

cc @vargaz

@radical radical added arch-wasm WebAssembly architecture area-VM-meta-mono labels Feb 12, 2022
@ghost
Copy link

ghost commented Feb 12, 2022

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

Issue Details

Found on my debugging PR #65178:

Build, Log:

Running on Linux+chrome:

[02:42:42] fail: RuntimeError: remainder by zero
                     at http://127.0.0.1:38263/dotnet.wasm:mono_g_hash_table_find_slot (wasm-function[1884]:0x8364e)
                     at http://127.0.0.1:38263/dotnet.wasm:mono_g_hash_table_lookup_extended (wasm-function[1883]:0x835ea)
                     at http://127.0.0.1:38263/dotnet.wasm:mono_g_hash_table_lookup (wasm-function[1882]:0x835b2)
                     at http://127.0.0.1:38263/dotnet.wasm:mono_string_is_interned_lookup (wasm-function[1951]:0x8722b)
                     at http://127.0.0.1:38263/dotnet.wasm:mono_ldstr_metadata_sig (wasm-function[1949]:0x871b1)
                     at http://127.0.0.1:38263/dotnet.wasm:mono_ldstr_checked (wasm-function[1997]:0x88a61)
                     at http://127.0.0.1:38263/dotnet.wasm:generate_code (wasm-function[327]:0x209af)
                     at http://127.0.0.1:38263/dotnet.wasm:mono_interp_transform_method (wasm-function[379]:0x28932)
                     at http://127.0.0.1:38263/dotnet.wasm:do_transform_method (wasm-function[223]:0x1a856)
                     at http://127.0.0.1:38263/dotnet.wasm:interp_exec_method (wasm-function[169]:0x18b9e)
[02:42:42] fail: [out of order message from the browser]: http://127.0.0.1:38263/dotnet.wasm 0:538190 Uncaught RuntimeError: remainder by zero

cc @vargaz

Author: radical
Assignees: -
Labels:

arch-wasm, area-VM-meta-mono

Milestone: -

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Feb 12, 2022
@radical
Copy link
Member Author

radical commented Feb 12, 2022

A little more trace, from v8:

[02:42:29] info: wasm-function[1884]:0x8364e: RuntimeError: remainder by zero
[02:42:29] info: RuntimeError: remainder by zero
[02:42:29] info:     at mono_g_hash_table_find_slot (<anonymous>:wasm-function[1884]:0x8364e)
[02:42:29] info:     at mono_g_hash_table_lookup_extended (<anonymous>:wasm-function[1883]:0x835ea)
[02:42:29] info:     at mono_g_hash_table_lookup (<anonymous>:wasm-function[1882]:0x835b2)
[02:42:29] info:     at mono_string_is_interned_lookup (<anonymous>:wasm-function[1951]:0x8722b)
[02:42:29] info:     at mono_ldstr_metadata_sig (<anonymous>:wasm-function[1949]:0x871b1)
[02:42:29] info:     at mono_ldstr_checked (<anonymous>:wasm-function[1997]:0x88a61)
[02:42:29] info:     at generate_code (<anonymous>:wasm-function[327]:0x209af)
[02:42:29] info:     at mono_interp_transform_method (<anonymous>:wasm-function[379]:0x28932)
[02:42:29] info:     at do_transform_method (<anonymous>:wasm-function[223]:0x1a856)
[02:42:29] info:     at interp_exec_method (<anonymous>:wasm-function[169]:0x18b9e)
[02:42:29] info:     at interp_runtime_invoke (<anonymous>:wasm-function[168]:0xbcce)
[02:42:29] info:     at mono_jit_runtime_invoke (<anonymous>:wasm-function[7732]:0x196d0c)
[02:42:29] info:     at do_runtime_invoke (<anonymous>:wasm-function[1900]:0x83f78)
[02:42:29] info:     at mono_runtime_invoke_checked (<anonymous>:wasm-function[1898]:0x83eea)
[02:42:29] info:     at ves_icall_InternalInvoke_raw (<anonymous>:wasm-function[1261]:0x65229)
[02:42:29] info:     at do_icall (<anonymous>:wasm-function[258]:0x1b6d8)
[02:42:29] info:     at do_icall_wrapper (<anonymous>:wasm-function[229]:0x1ad1a)
[02:42:29] info:     at interp_exec_method (<anonymous>:wasm-function[169]:0xce1a)
[02:42:29] info:     at interp_runtime_invoke (<anonymous>:wasm-function[168]:0xbcce)
[02:42:29] info:     at mono_jit_runtime_invoke (<anonymous>:wasm-function[7732]:0x196d0c)
[02:42:29] info:     at do_runtime_invoke (<anonymous>:wasm-function[1900]:0x83f78)
[02:42:29] info:     at mono_runtime_try_invoke (<anonymous>:wasm-function[1904]:0x845df)
[02:42:29] info:     at tp_cb (<anonymous>:wasm-function[8148]:0x1b04e9)
[02:42:29] info:     at mono_background_exec (<anonymous>:mono_background_exec (wasm-function[2663]:0xa84c4))
[02:42:29] info:     at Object.Module._mono_background_exec [as mono_background_exec] (./dotnet.js:12:135597)
[02:42:29] info:     at pump_message (./dotnet.js:3:70141)
[02:42:29] info: 
[02:42:29] info: Process v8 exited with 1

@radical
Copy link
Member Author

radical commented Feb 12, 2022

Log. Lower frames are different. All the above are from the same build, just different test runs.

[02:42:25] fail: RuntimeError: remainder by zero
[02:42:25] fail:     at mono_g_hash_table_find_slot (<anonymous>:wasm-function[1884]:0x8364e)
[02:42:25] fail:     at mono_g_hash_table_lookup_extended (<anonymous>:wasm-function[1883]:0x835ea)
[02:42:25] fail:     at mono_g_hash_table_lookup (<anonymous>:wasm-function[1882]:0x835b2)
[02:42:25] fail:     at mono_string_is_interned_lookup (<anonymous>:wasm-function[1951]:0x8722b)
[02:42:25] fail:     at mono_ldstr_metadata_sig (<anonymous>:wasm-function[1949]:0x871b1)
[02:42:25] fail:     at mono_ldstr_checked (<anonymous>:wasm-function[1997]:0x88a61)
[02:42:25] fail:     at generate_code (<anonymous>:wasm-function[327]:0x209af)
[02:42:25] fail:     at mono_interp_transform_method (<anonymous>:wasm-function[379]:0x28932)
[02:42:25] fail:     at do_transform_method (<anonymous>:wasm-function[223]:0x1a856)
[02:42:25] fail:     at interp_exec_method (<anonymous>:wasm-function[169]:0x18b9e)
[02:42:25] fail:     at interp_runtime_invoke (<anonymous>:wasm-function[168]:0xbcce)
[02:42:25] fail:     at mono_jit_runtime_invoke (<anonymous>:wasm-function[7732]:0x196d0c)
[02:42:25] fail:     at do_runtime_invoke (<anonymous>:wasm-function[1900]:0x83f78)
[02:42:25] fail:     at mono_runtime_invoke_checked (<anonymous>:wasm-function[1898]:0x83eea)
[02:42:25] fail:     at ves_icall_InternalInvoke_raw (<anonymous>:wasm-function[1261]:0x65229)
[02:42:25] fail:     at do_icall (<anonymous>:wasm-function[258]:0x1b6d8)
[02:42:25] fail:     at do_icall_wrapper (<anonymous>:wasm-function[229]:0x1ad1a)
[02:42:25] fail:     at interp_exec_method (<anonymous>:wasm-function[169]:0xce1a)
[02:42:25] fail:     at interp_runtime_invoke (<anonymous>:wasm-function[168]:0xbcce)
[02:42:25] fail:     at mono_jit_runtime_invoke (<anonymous>:wasm-function[7732]:0x196d0c)
[02:42:25] fail:     at do_runtime_invoke (<anonymous>:wasm-function[1900]:0x83f78)
[02:42:25] fail:     at mono_runtime_try_invoke (<anonymous>:wasm-function[1904]:0x845df)
[02:42:25] fail:     at mono_wasm_invoke_method (<anonymous>:mono_wasm_invoke_method (wasm-function[118]:0x991b))
[02:42:25] fail:     at Module._mono_wasm_invoke_method (./dotnet.js:12:128850)
[02:42:25] fail:     at Object.t.<computed> (./dotnet.js:3:4100)
[02:42:25] fail:     at _call_method_with_converted_args (./dotnet.js:3:48191)
[02:42:25] fail:     at call_method (./dotnet.js:3:47309)
[02:42:25] fail:     at ./dotnet.js:3:49132
[02:42:25] fail:     at mono_call_assembly_entry_point (./dotnet.js:3:49260)
[02:42:25] fail:     at Object.mono_run_main (./dotnet.js:3:57765)
[02:42:25] fail:     at Object.init (test-main.js:214:43)
[02:42:25] fail:     at Object.onDotnetReady (test-main.js:153:17)
[02:42:25] fail:     at finalize_startup (./dotnet.js:3:62585)
[02:42:25] fail:     at mono_wasm_after_runtime_initialized (./dotnet.js:3:59479)
[02:42:25] fail:     at callRuntimeCallbacks (./dotnet.js:12:17800)
[02:42:25] fail:     at postRun (./dotnet.js:12:13708)
[02:42:25] fail:     at doRun (./dotnet.js:12:145047)
[02:42:25] fail:     at run (./dotnet.js:12:145204)
[02:42:25] fail:     at runCaller (./dotnet.js:12:144684)
[02:42:25] fail:     at removeRunDependency (./dotnet.js:12:14500)
[02:42:25] fail:     at receiveInstance (./dotnet.js:12:16355)
[02:42:25] fail:     at receiveInstantiationResult (./dotnet.js:12:16476)
[02:42:25] info: Process v8 exited with 1

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

It is possibly fixed by #65310

Tried to reproduce with above fix applied by running:

.\dotnet.cmd build -bl -c Release /t:Test -p:RunAOTCompilation=true -p:TargetOS=Browser .\src\libraries\System.Threading.Channels\tests\

and it finished with 0 failures

  info: === TEST EXECUTION SUMMARY ===
  info: Total: 1119, Errors: 0, Failed: 0, Skipped: 35, Time: 3.748534s

@radical
Copy link
Member Author

radical commented Feb 14, 2022

Why would #65310 fix this?

@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
@ghost ghost locked as resolved and limited conversation to collaborators Mar 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-VM-meta-mono disabled-test The test is disabled in source code against the issue
Projects
None yet
Development

No branches or pull requests

3 participants