emscripten-core / emscripten-core/emscripten

Updating from bun 1.3 to 1.4 seems to have broken `core0.test_em_js_pthreads_dylink`

Open
#27,580 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

It looks like 16 of the 335 "crossplaform-only" tests that we run under bun our CI fail with bun 1.4, and it seems like pthreads are the common theme:

```
...
FAIL: test_pthread_print_override_modularize (test_other.other.test_pthread_print_override_modularize)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/decorators.py", line 229, in decorated
return func(self, *args, **kwargs)
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/decorators.py", line 43, in decorated
return func(self, *args, **kwargs)
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/decorators.py", line 43, in decorated
return func(self, *args, **kwargs)
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/test_other.py", line 6424, in test_pthread_print_override_modularize
output = self.run_js('main.js')
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/common.py", line 1072, in run_js
self.fail('JS subprocess failed (%s): %s (expected=%s). Output:\n%s' % (error.cmd, error.returncode, assert_returncode, ret))
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: JS subprocess failed (/usr/local/google/home/sbc/.bun/bin/bun --stack-trace-limit=50 --trace-uncaught /tmp/emtest_vcto8axy/emscripten_test_other__qer8gic/main.js): -15 (expected=0). Output:

======================================================================
FAIL: test_pthread_create (test_core.core0.test_pthread_create)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/common.py", line 403, in resulting_test
return func(self, *args)
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/decorators.py", line 229, in decorated
return func(self, *args, **kwargs)
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/test_core.py", line 9263, in test_pthread_create
self.do_core_test('pthread/create.c', cflags=args + ['-DALLOW_SYNC'])
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/test_core.py", line 510, in do_core_test
self.do_runf_out_file(Path('core', testname), **kwargs)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/common.py", line 1454, in do_runf_out_file
output = self._build_and_run(srcfile, expected, *args, **kwargs)
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/common.py", line 1492, in _build_and_run
js_output = self.run_js(js_file, engine, args,
input=input,
assert_returncode=assert_returncode,
interleaved_output=interleaved_output)
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/common.py", line 1072, in run_js
self.fail('JS subprocess failed (%s): %s (expected=%s). Output:\n%s' % (error.cmd, error.returncode, assert_returncode, ret))
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: JS subprocess failed (/usr/local/google/home/sbc/.bun/bin/bun --stack-trace-limit=50 --trace-uncaught /tmp/emtest__nr580k4/emscripten_test_core0_na84qxox/create.js): -15 (expected=0). Output:
[..]
(not all output shown. See `limit_size`)

======================================================================
FAIL: test_pthread_create_sync_instantiation (test_core.core0.test_pthread_create_sync_instantiation)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/common.py", line 403, in resulting_test
return func(self, *args)
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/decorators.py", line 229, in decorated
return func(self, *args, **kwargs)
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/test_core.py", line 9263, in test_pthread_create
self.do_core_test('pthread/create.c', cflags=args + ['-DALLOW_SYNC'])
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/test_core.py", line 510, in do_core_test
self.do_runf_out_file(Path('core', testname), **kwargs)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/common.py", line 1454, in do_runf_out_file
output = self._build_and_run(srcfile, expected, *args, **kwargs)
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/common.py", line 1492, in _build_and_run
js_output = self.run_js(js_file, engine, args,
input=input,
assert_returncode=assert_returncode,
interleaved_output=interleaved_output)
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/common.py", line 1072, in run_js
self.fail('JS subprocess failed (%s): %s (expected=%s). Output:\n%s' % (error.cmd, error.returncode, assert_returncode, ret))
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: JS subprocess failed (/usr/local/google/home/sbc/.bun/bin/bun --stack-trace-limit=50 --trace-uncaught /tmp/emtest_7p_3biuy/emscripten_test_core0_6q8rviwp/create.js): -15 (expected=0). Output:
[..]
(not all output shown. See `limit_size`)

----------------------------------------------------------------------
Ran 335 tests in 107.195s

FAILED (failures=16, skipped=25)
Total core time: 2434.772s. Wallclock time: 107.195s. Parallelization: 22.71x.
```

Contributor guide

Open the contributing guide

Research direction

Start with test/test_core.py::test_pthread_create and test/test_other.py::test_pthread_print_override_modularize, then run the 335 cross-platform tests under Bun 1.4. Compare the 16 pthread-related failures with Bun 1.3 and identify the cause; done means the affected tests pass or the incompatibility is clearly characterized.

Written by the indexing model from the issue text.

Assessment

Tech stack
bun, wasm
Domain
ci-cd, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.