emscripten-core / emscripten-core/emscripten
test_wasm_worker_futex_wait_pthreads is flakey
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 109
Description
See https://github.com/emscripten-core/emscripten/pull/27550
```
======================================================================
ERROR [0.001s]: test_wasm_worker_futex_wait_pthreads (test_core.strict)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/root/project/test/common.py", line 403, in resulting_test
return func(self, *args)
File "/root/project/test/test_core.py", line 132, in decorated
return func(self, *args, **kwargs)
File "/root/project/test/test_core.py", line 383, in decorated
return func(self, *args, **kwargs)
File "/root/project/test/test_core.py", line 172, in decorated
return func(self, *args, **kwargs)
File "/root/project/test/decorators.py", line 275, in decorated
f(self, *args, **kwargs)
File "/root/project/test/test_core.py", line 9831, in test_wasm_worker_futex_wait
self.do_runf('wasm_worker/wasm_worker_futex_wait.c', cflags=['-sWASM_WORKERS'])
File "/root/project/test/common.py", line 1444, in do_runf
return self._build_and_run(filename, *args, **kwargs)
File "/root/project/test/common.py", line 1492, in _build_and_run
js_output = self.run_js(js_file, engine, args,
File "/root/project/test/common.py", line 1069, in run_js
raise timeout_error
File "/root/project/test/common.py", line 1041, in run_js
jsrun.run_js(filename, engine, args,
File "/root/project/test/jsrun.py", line 101, in run_js
proc = subprocess.run(
File "/usr/lib/python3.10/subprocess.py", line 505, in run
stdout, stderr = process.communicate(input, timeout=timeout)
File "/usr/lib/python3.10/subprocess.py", line 1154, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
File "/usr/lib/python3.10/subprocess.py", line 2047, in _communicate
self.wait(timeout=self._remaining_time(endtime))
File "/usr/lib/python3.10/subprocess.py", line 1209, in wait
return self._wait(timeout=timeout)
File "/usr/lib/python3.10/subprocess.py", line 1951, in _wait
raise TimeoutExpired(self.args, timeout)
subprocess.TimeoutExpired: Command '['/root/emsdk/node/24.19.0_64bit/bin/node', '--stack-trace-limit=50', '--trace-uncaught', '/tmp/emtest_yj2bu6qd/emscripten_test_strict_105fq8x6/wasm_worker_futex_wait.js']' timed out after 299.9999732350043 seconds
----------------------------------------------------------------------
Ran 1277 tests in 1263.790s
```
Contributor guide
Research direction
Start with test_core.py:test_wasm_worker_futex_wait and wasm_worker/wasm_worker_futex_wait.c, then reproduce the timeout using the named test. Inspect the execution path through test/common.py and test/jsrun.py; done means the test completes reliably without the 300-second timeout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, node.js, wasm
- Domain
- compilers, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100