Skip to content

[wasm] remainder by zero crash in System.Threading.Channels.Tests, on browser #65245

Closed

Description

@radical

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

Activity

  1. added
    arch-wasm
    on Feb 12, 2022
  2. ghost added
    untriaged
    on Feb 12, 2022
  3. radical commented on Feb 12, 2022

    @radical
    MemberAuthor

    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
    
  4. radical commented on Feb 12, 2022

    @radical
    MemberAuthor

    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
    
  5. added this to the 7.0.0 milestone on Feb 14, 2022
  6. removed
    untriaged
    on Feb 14, 2022
  7. radekdoulik commented on Feb 14, 2022

    @radekdoulik
    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
    
  8. radical commented on Feb 14, 2022

    @radical
    MemberAuthor

    Why would #65310 fix this?

  9. added
    disabled-test
    on Feb 16, 2022
  10. radical commented on Feb 18, 2022

    @radical
    MemberAuthor

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

  11. ghost locked as resolved and limited conversation to collaborators on Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-wasmarea-VM-meta-monodisabled-test

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions