As mentioned in the mail thread at https://groups.google.com/g/emscripten-discuss/c/Nnr0ENExjoE "_emscripten_run_callback_on_thread causing deadlocks": After switching from emsdk 3.1.46 to recent Emscripten trunk (emcc -v: emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.65-git (23197a2d369b8e47e7ea1ba7c498309da835b718)), my application started to deadlock on start. The application is recent LibreOffice trunk (see https://git.libreoffice.org/core/+/refs/heads/master/static/README.wasm.md), using -sPROXY_TO_PTHREAD on top of a slightly modified Qt5 (to make that support -sPROXY_TO_PTHREAD).
The browser's main thread is still serving an earlier asynchronous request sent from the application's main pthread via emscripten_async_run_in_main_runtime_thread,
and blocks on a synchronous call into the application's main pthread, while the application's main pthread is blocked in a call to _emscripten_set_resize_callback_on_thread,
As mentioned in the mail thread at https://groups.google.com/g/emscripten-discuss/c/Nnr0ENExjoE "_emscripten_run_callback_on_thread causing deadlocks": After switching from emsdk 3.1.46 to recent Emscripten trunk (
emcc -v
:emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.65-git (23197a2d369b8e47e7ea1ba7c498309da835b718)
), my application started to deadlock on start. The application is recent LibreOffice trunk (see https://git.libreoffice.org/core/+/refs/heads/master/static/README.wasm.md), using-sPROXY_TO_PTHREAD
on top of a slightly modified Qt5 (to make that support-sPROXY_TO_PTHREAD
).The browser's main thread is still serving an earlier asynchronous request sent from the application's main pthread via
emscripten_async_run_in_main_runtime_thread
,and blocks on a synchronous call into the application's main pthread, while the application's main pthread is blocked in a call to
_emscripten_set_resize_callback_on_thread
,The deadlock goes away if I either revert https://github.com/emscripten-core/emscripten/commit/c41f6590b1f9fcda12b2adb2d32cd352f163e717 "Remove use of legacy proxy API from library_html5.js. NFC (#20370)" or fix that commit with