Repository navigation
Labels
Description
Its not clear what changed but this test recently started failing more consistently:
https://chromium-review.googlesource.com/c/emscripten-releases/+/3151159
https://ci.chromium.org/ui/p/emscripten-releases/builders/try/mac/b8836587739777488289/overview
======================================================================
FAIL: test_pthread_abort (test_core.wasm0)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/s/w/ir/cipd_bin_packages/cpython3/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
yield
File "/opt/s/w/ir/cipd_bin_packages/cpython3/lib/python3.8/unittest/case.py", line 676, in run
self._callTestMethod(testMethod)
File "/opt/s/w/ir/cipd_bin_packages/cpython3/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
method()
File "/opt/s/w/ir/k/install/emscripten/tests/common.py", line 188, in decorated
f(self, *args, **kwargs)
File "/opt/s/w/ir/k/install/emscripten/tests/test_core.py", line 2361, in test_pthread_abort
self.do_run_in_out_file_test('pthread/test_pthread_abort.c', assert_returncode=NON_ZERO)
File "/opt/s/w/ir/k/install/emscripten/tests/common.py", line 1018, in do_run_in_out_file_test
self._build_and_run(srcfile, expected, **kwargs)
File "/opt/s/w/ir/k/install/emscripten/tests/common.py", line 1074, in _build_and_run
self.assertContained(expected_output, js_output)
File "/opt/s/w/ir/k/install/emscripten/tests/common.py", line 744, in assertContained
self.fail("Expected to find '%s' in '%s', diff:\n\n%s\n%s" % (
File "/opt/s/w/ir/cipd_bin_packages/cpython3/lib/python3.8/unittest/case.py", line 753, in fail
raise self.failureException(msg)
AssertionError: Expected to find 'onAbort called
' in 'undefined
pthread sent an error! undefined:undefined: abort(undefined) at Error
at jsStackTrace (eval at importScripts (/opt/s/w/ir/tmp/t/tmpw4m97k_f/emscripten_test_wasm0_hsj_lnsx/test_pthread_abort.worker.js:38:16), <anonymous>:2232:19)
at stackTrace (eval at importScripts (/opt/s/w/ir/tmp/t/tmpw4m97k_f/emscripten_test_wasm0_hsj_lnsx/test_pthread_abort.worker.js:38:16), <anonymous>:2249:16)
at abort (eval at importScripts (/opt/s/w/ir/tmp/t/tmpw4m97k_f/emscripten_test_wasm0_hsj_lnsx/test_pthread_abort.worker.js:38:16), <anonymous>:1630:44)
at _abort (eval at importScripts (/opt/s/w/ir/tmp/t/tmpw4m97k_f/emscripten_test_wasm0_hsj_lnsx/test_pthread_abort.worker.js:38:16), <anonymous>:2492:7)
at <anonymous>:wasm-function[28]:0x909
at main (<anonymous>:wasm-function[29]:0x911)
at eval (eval at importScripts (/opt/s/w/ir/tmp/t/tmpw4m97k_f/emscripten_test_wasm0_hsj_lnsx/test_pthread_abort.worker.js:38:16), <anonymous>:1700:22)
at ___call_main (eval at importScripts (/opt/s/w/ir/tmp/t/tmpw4m97k_f/emscripten_test_wasm0_hsj_lnsx/test_pthread_abort.worker.js:38:16), <anonymous>:2259:24)
at <anonymous>:wasm-function[117]:0x4d4b
at Object.invokeEntryPoint (eval at importScripts (/opt/s/w/ir/tmp/t/tmpw4m97k_f/emscripten_test_wasm0_hsj_lnsx/test_pthread_abort.worker.js:38:16), <anonymous>:2227:32)
at self.onmessage (/opt/s/w/ir/tmp/t/tmpw4m97k_f/emscripten_test_wasm0_hsj_lnsx/test_pthread_abort.worker.js:144:48)
at MessagePort.<anonymous> (/opt/s/w/ir/tmp/t/tmpw4m97k_f/emscripten_test_wasm0_hsj_lnsx/test_pthread_abort.worker.js:24:5)
at MessagePort.[nodejs.internal.kHybridDispatch] (internal/event_target.js:354:41)
at MessagePort.exports.emitMessage (internal/per_context/messageport.js:18:26)
Activity
Temporarily disable test_pthread_abort on macOS
Temporarily disable test_pthread_abort on macOS
Temporarily disable test_pthread_abort on macOS. NFC (#15015)
sbc100 commentedon Dec 2, 2021
Seeing this flake on linux too: https://logs.chromium.org/logs/emscripten-releases/buildbucket/cr-buildbucket/8828967471954354369/+/steps/Emscripten_testsuite__AddressSanitizer_/0/stdout
sbc100 commentedon May 20, 2022
Still flaky: https://app.circleci.com/pipelines/github/emscripten-core/emscripten/21125/workflows/71c287b8-d662-4417-b3cf-f2ebf16f6103/jobs/532291
[-]test_pthread_abort is failing on macOS[/-][+]test_pthread_abort is failing on macOS & flaky on linux[/+]kleisauke commentedon Apr 20, 2023
Still flaky: https://circleci.com/gh/emscripten-core/emscripten/626723.
This might be a race condition between the
onAborthandler call:emscripten/src/preamble.js
Lines 435 to 439 in aef5d39
And when it throws this exception:
emscripten/src/preamble.js
Lines 491 to 494 in aef5d39
This would be fine on the main runtime thread, but when
ENVIRONMENT_IS_PTHREADistrue, theonAborthandler is asynchronous proxied back to the main thread using apostMessagemechanism:emscripten/src/library_pthread.js
Lines 347 to 356 in aef5d39
emscripten/src/worker.js
Lines 160 to 162 in aef5d39
So, it might be possible that the pthread propagated the uncaught exception back to the main thread before the
callHandlercommand has arrived.Attempt to terminate workers cooperatively
Attempt to terminate workers cooperatively
Attempt to terminate workers cooperatively
Attempt to terminate workers cooperatively
Sequentialize uncaught exceptions in Node.js Workers into the same po…
Sequentialize uncaught exceptions in Node.js Workers into the same po…
Sequentialize uncaught exceptions in Node.js Workers into the same po…
Sequentialize uncaught exceptions in Node.js Workers into the same po…
Sequentialize uncaught exceptions in Node.js Workers into the same po…
Sequentialize uncaught exceptions in Node.js Workers into the same po…
Sequentialize uncaught exceptions in Node.js Workers into the same po…
Sequentialize uncaught exceptions in Node.js Workers (#25041)
Create a stress test that more deterministically reproduces #20067, #…
Sequentialize uncaught exceptions in Node.js Workers (emscripten-core…
Create a stress test that more deterministically reproduces emscripte…
[esm-integration] Sequentialize uncaught exceptions in Node.js workers (