Skip to content

esm_integration.test_stress_pthread_abort fails #25151

Closed

Description

@juj

The test esm_integration.test_stress_pthread_abort fails, and by the looks of it, the root cause is some kind of extra asynchronous behavior in WASM_ESM_INTEGRATION mode that regular build mode does not have.

Activity

  1. sbc100 commented on Sep 5, 2025

    @sbc100
    Collaborator

    It seems to work for me locally:

    ./test/runner esm_integration.test_stress_pthread_abort
    Running test_core: (1 tests)
    test_stress_pthread_abort (test_core.esm_integration.test_stress_pthread_abort) ... ok
    
    ----------------------------------------------------------------------
    Ran 1 test in 10.425s
    
    OK
    

    What version of node are you using?

    Are you seeing it fail on linux?

  2. sbc100 commented on Sep 5, 2025

    @sbc100
    Collaborator

    I'm using 25.0.0-v8-canary2025053097d65d1dc1 which is the same version we use in circle CI.

  3. juj commented on Sep 5, 2025

    @juj
    CollaboratorAuthor

    Windows 10:

    C:\emsdk\emscripten\main>test\runner esm_integration.test_stress_pthread_abort
    Running test_core: (1 tests)
    test_stress_pthread_abort (test_core.esm_integration.test_stress_pthread_abort) ... ERROR
    
    ======================================================================
    ERROR: test_stress_pthread_abort (test_core.esm_integration.test_stress_pthread_abort)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "C:\emsdk\emscripten\main\test\common.py", line 460, in decorated
        f(self, *args, **kwargs)
        ~^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\emsdk\emscripten\main\test\common.py", line 230, in decorated
        return func(self, *args, **kwargs)
      File "C:\emsdk\emscripten\main\test\test_core.py", line 2711, in test_stress_pthread_abort
        self.parallel_stress_test_js_file(js_file, expected='My custom onAbort called')
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\emsdk\emscripten\main\test\common.py", line 2209, in parallel_stress_test_js_file
        raise error_exception
      File "C:\emsdk\emscripten\main\test\common.py", line 2187, in test_run
        raise Exception(f'\n\nWhen running command "{cmd}",\nexpected string "{expected}" was not found in output:{output}')
    Exception:
    
    When running command "['C:/emsdk/node/nightly-v25.0.0-nightly202507249188563304/bin/node.exe', '--stack-trace-limit=50', '--trace-uncaught', '--experimental-wasm-modules', '--no-warnings', 'test_pthread_abort.mjs']",
    expected string "My custom onAbort called" was not found in output:
    ----------------------------
    Aborted(native code called abort())
    worker: onmessage() captured an uncaught exception: RuntimeError: Aborted(native code called abort())
    RuntimeError: Aborted(native code called abort())
        at abort (file:///C:/emsdk/emscripten/main/out/test/test_pthread_abort.support.mjs:717:11)
        at __abort_js (file:///C:/emsdk/emscripten/main/out/test/test_pthread_abort.support.mjs:1407:7)
        at wasm://wasm/00021066:wasm-function[27]:0xa45
        at wasm://wasm/00021066:wasm-function[22]:0x945
        at wasm://wasm/00021066:wasm-function[26]:0xa30
        at invokeEntryPoint (file:///C:/emsdk/emscripten/main/out/test/test_pthread_abort.support.mjs:1214:42)
        at handleMessage (file:///C:/emsdk/emscripten/main/out/test/test_pthread_abort.support.mjs:530:11)
        at startWorker (file:///C:/emsdk/emscripten/main/out/test/test_pthread_abort.support.mjs:487:13)
        at initRuntime (file:///C:/emsdk/emscripten/main/out/test/test_pthread_abort.support.mjs:669:38)
        at run (file:///C:/emsdk/emscripten/main/out/test/test_pthread_abort.support.mjs:1932:5)
        at Module.init (file:///C:/emsdk/emscripten/main/out/test/test_pthread_abort.support.mjs:2008:3)
        at self.onmessage (file:///C:/emsdk/emscripten/main/out/test/test_pthread_abort.pthread.mjs:42:23)
    Pthread 0x00012350 sent an error! undefined:undefined: Aborted(native code called abort())
    
    node:internal/event_target:1101
      process.nextTick(() => { throw err; });
                               ^
    Error [RuntimeError]: Aborted(native code called abort())
        at abort (file:///C:/emsdk/emscripten/main/out/test/test_pthread_abort.support.mjs:717:11)
        at __abort_js (file:///C:/emsdk/emscripten/main/out/test/test_pthread_abort.support.mjs:1407:7)
        at wasm://wasm/00021066:wasm-function[27]:0xa45
        at wasm://wasm/00021066:wasm-function[22]:0x945
        at wasm://wasm/00021066:wasm-function[26]:0xa30
        at invokeEntryPoint (file:///C:/emsdk/emscripten/main/out/test/test_pthread_abort.support.mjs:1214:42)
        at handleMessage (file:///C:/emsdk/emscripten/main/out/test/test_pthread_abort.support.mjs:530:11)
        at startWorker (file:///C:/emsdk/emscripten/main/out/test/test_pthread_abort.support.mjs:487:13)
        at initRuntime (file:///C:/emsdk/emscripten/main/out/test/test_pthread_abort.support.mjs:669:38)
        at run (file:///C:/emsdk/emscripten/main/out/test/test_pthread_abort.support.mjs:1932:5)
        at Module.init (file:///C:/emsdk/emscripten/main/out/test/test_pthread_abort.support.mjs:2008:3)
        at self.onmessage (file:///C:/emsdk/emscripten/main/out/test/test_pthread_abort.pthread.mjs:42:23)
    Thrown at:
        at node:internal/event_target:1101:28
        at processTicksAndRejections (node:internal/process/task_queues:85:11)
    
    
    Node.js v25.0.0-nightly202507249188563304
    
    ----------------------------
    
    ----------------------------------------------------------------------
    Ran 1 test in 1.746s
    
    FAILED (errors=1)
    

    using emsdk/node/nightly-v25.0.0-nightly202507249188563304.

  4. juj commented on Sep 5, 2025

    @juj
    CollaboratorAuthor

    Linux Mint 22:

    $ test/runner esm_integration.test_stress_pthread_abort
    Running test_core: (1 tests)
    test_stress_pthread_abort (test_core.esm_integration.test_stress_pthread_abort) ... ERROR
    
    ======================================================================
    ERROR: test_stress_pthread_abort (test_core.esm_integration.test_stress_pthread_abort)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/test/common.py", line 460, in decorated
        f(self, *args, **kwargs)
        ~^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/test/common.py", line 230, in decorated
        return func(self, *args, **kwargs)
      File "/home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/test/test_core.py", line 2710, in test_stress_pthread_abort
        self.parallel_stress_test_js_file(js_file, expected='My custom onAbort called')
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/test/common.py", line 2209, in parallel_stress_test_js_file
        raise error_exception
      File "/home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/test/common.py", line 2187, in test_run
        raise Exception(f'\n\nWhen running command "{cmd}",\nexpected string "{expected}" was not found in output:{output}')
    Exception: 
    
    When running command "['/home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/node/nightly-v25.0.0-nightly202507249188563304/bin/node', '--stack-trace-limit=50', '--trace-uncaught', '--experimental-wasm-modules', '--no-warnings', 'test_pthread_abort.mjs']",
    expected string "My custom onAbort called" was not found in output:
    ----------------------------
    Aborted(native code called abort())
    worker: onmessage() captured an uncaught exception: RuntimeError: Aborted(native code called abort())
    RuntimeError: Aborted(native code called abort())
        at abort (file:///home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/out/test/test_pthread_abort.support.mjs:717:11)
        at __abort_js (file:///home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/out/test/test_pthread_abort.support.mjs:1407:7)
        at wasm://wasm/00021066:wasm-function[27]:0xa45
        at wasm://wasm/00021066:wasm-function[22]:0x945
        at wasm://wasm/00021066:wasm-function[26]:0xa30
        at invokeEntryPoint (file:///home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/out/test/test_pthread_abort.support.mjs:1214:42)
        at handleMessage (file:///home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/out/test/test_pthread_abort.support.mjs:530:11)
        at startWorker (file:///home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/out/test/test_pthread_abort.support.mjs:487:13)
        at initRuntime (file:///home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/out/test/test_pthread_abort.support.mjs:669:38)
        at run (file:///home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/out/test/test_pthread_abort.support.mjs:1932:5)
        at Module.init (file:///home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/out/test/test_pthread_abort.support.mjs:2008:3)
        at self.onmessage (file:///home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/out/test/test_pthread_abort.pthread.mjs:42:23)
    Pthread 0x00012350 sent an error! undefined:undefined: Aborted(native code called abort())
    
    node:internal/event_target:1101
      process.nextTick(() => { throw err; });
                               ^
    Error [RuntimeError]: Aborted(native code called abort())
        at abort (file:///home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/out/test/test_pthread_abort.support.mjs:717:11)
        at __abort_js (file:///home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/out/test/test_pthread_abort.support.mjs:1407:7)
        at wasm://wasm/00021066:wasm-function[27]:0xa45
        at wasm://wasm/00021066:wasm-function[22]:0x945
        at wasm://wasm/00021066:wasm-function[26]:0xa30
        at invokeEntryPoint (file:///home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/out/test/test_pthread_abort.support.mjs:1214:42)
        at handleMessage (file:///home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/out/test/test_pthread_abort.support.mjs:530:11)
        at startWorker (file:///home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/out/test/test_pthread_abort.support.mjs:487:13)
        at initRuntime (file:///home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/out/test/test_pthread_abort.support.mjs:669:38)
        at run (file:///home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/out/test/test_pthread_abort.support.mjs:1932:5)
        at Module.init (file:///home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/out/test/test_pthread_abort.support.mjs:2008:3)
        at self.onmessage (file:///home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/out/test/test_pthread_abort.pthread.mjs:42:23)
    Thrown at:
        at node:internal/event_target:1101:28
        at processTicksAndRejections (node:internal/process/task_queues:85:11)
    
    
    Node.js v25.0.0-nightly202507249188563304
    
    ----------------------------
    
    ----------------------------------------------------------------------
    Ran 1 test in 6.355s
    
    FAILED (errors=1)
    
    
  5. added a commit that references this issue on Oct 2, 2026
    9aad1ec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions