Skip to content

test_pthread_proxying is flaky #25026

Description

@juj

This failure comes through every now and then:

======================================================================
FAIL: test_pthread_proxying (test_core.core0.test_pthread_proxying)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.12/unittest/case.py", line 58, in testPartExecutor
    yield
  File "/usr/lib/python3.12/unittest/case.py", line 634, in run
    self._callTestMethod(testMethod)
  File "/usr/lib/python3.12/unittest/case.py", line 589, in _callTestMethod
    if method() is not None:
       ^^^^^^^^
  File "/home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/test/common.py", line 928, in resulting_test
    return func(self, *args)
           ^^^^^^^^^^^^^^^^^
  File "/home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/test/common.py", line 385, in decorated
    f(self, *args, **kwargs)
  File "/home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/test/common.py", line 700, in metafunc
    f(self, *args, **kwargs)
  File "/home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/test/test_core.py", line 2606, in test_pthread_proxying
    self.do_run_in_out_file_test('pthread/test_pthread_proxying.c', interleaved_output=False)
  File "/home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/test/common.py", line 1980, in do_run_in_out_file_test
    output = self._build_and_run(srcfile, expected, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/test/common.py", line 2029, in _build_and_run
    self.assertContained(o, js_output, regex=regex)
  File "/home/clb/buildbot/h12dsi-linux-mint22/emscripten_linux_x64/build/emscripten/main/test/common.py", line 1687, in assertContained
    self.fail("Expected to find '%s' in '%s', diff:\n\n%s\n%s" % (
  File "/usr/lib/python3.12/unittest/case.py", line 715, in fail
    raise self.failureException(msg)
AssertionError: Expected to find 'Testing async proxying
running widget 1 on main
running widget 2 on looper
running widget 3 on returner
Testing sync proxying
running widget 4 on looper
running widget 5 on returner
Testing sync_with_ctx proxying
running widget 6 on looper
running widget 7 on returner
Testing callback proxying
running widget 8 on main
running widget 9 on looper
running widget 10 on returner
Testing callback_with_ctx proxying
running widget 11 on main
running widget 12 on looper
running widget 13 on returner
Testing promise proxying
running widget 14 on worker
running widget 15 on looper
running widget 16 on returner
Testing promise_with_ctx proxying
running widget 17 on worker
running widget 18 on looper
running widget 19 on returner
Testing tasks queue growth
Testing proxying queue growth
work
work
work
work
done
' in 'Testing async proxying
running widget 1 on main
running widget 2 on looper
running widget 3 on returner
Testing sync proxying
running widget 4 on looper
running widget 5 on returner
Testing sync_with_ctx proxying
running widget 6 on looper
running widget 7 on returner
Testing callback proxying
running widget 8 on main
running widget 9 on looper
running widget 10 on returner
Testing callback_with_ctx proxying
running widget 11 on main
running widget 12 on looper
running widget 13 on returner
Testing promise proxying
running widget 14 on worker
running widget 15 on looper
running widget 16 on returner
Testing promise_with_ctx proxying
running widget 17 on unknown
running widget 18 on looper
running widget 19 on returner
Testing tasks queue growth
Testing proxying queue growth
work
work
work
work
done
looper_main
returner_main
quitting looper
returner_main
returner_main
program exited (with status: 0), but keepRuntimeAlive() is set (counter=0) due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)
', diff:

--- expected
+++ actual
@@ -21,7 +21,7 @@
 running widget 15 on looper
 running widget 16 on returner
 Testing promise_with_ctx proxying
-running widget 17 on worker
+running widget 17 on unknown
 running widget 18 on looper
 running widget 19 on returner
 Testing tasks queue growth
@@ -31,4 +31,10 @@
 work
 work
 done
+looper_main
+returner_main
+quitting looper
+returner_main
+returner_main
+program exited (with status: 0), but keepRuntimeAlive() is set (counter=0) due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)

which suggests some kind of a race condition in proxying. (a lot of other pthread proxying tests are already marked flaky)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions