emscripten-core / emscripten-core/emscripten
Uncaught RuntimeError: unreachable from worker
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
**Version of emscripten/emsdk:**
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.32 (eab98adf462c39f3c31d348331c4830bcaa36949)
clang version 17.0.0 (https://github.com/llvm/llvm-project df82394e7a2d06506718cafa347bf7827c79fc4f)
Target: wasm32-unknown-emscripten
Thread model: posix
I am building [svt-av1](https://gitlab.com/AOMediaCodec/SVT-AV1) v1.4.1 for [ffmpeg](https://github.com/FFmpeg/FFmpeg) with emscripten 3.1.32. I managed to successfully compile to wasm, but during runtime (in browser worker), I am getting these exceptions:
 )
First I thought this might be related to large number of processes/workers being opened, however I can restrict the count to some reasonable ~20 which is tested safe with some other examples.
Here are my compilation flags, I think I am being generous with memory:
```
-s INITIAL_MEMORY=256mb
-s ALLOW_MEMORY_GROWTH=1
-s MAXIMUM_MEMORY=4gb
-s ENVIRONMENT=worker
-s PROXY_TO_PTHREAD=1
-s STACK_SIZE=10MB
-s DEFAULT_PTHREAD_STACK_SIZE=4MB
-pthread
```
...also `-msimd128` is being used.
At this point I am not sure this to which technology the error is related to (emscripten, webassembly, svtav1) but considering the error message (note attached screenshot) I will have hard time reporting error to svtav1 issue tracker and so decided to ask here first.
I would like to kindly ask the elders of the emscripten if this appears like something to be fixed on emscripten side?
Contributor guide
Assessment
This issue has not been assessed yet.