Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WASM + Debug #1416

Open
Nekto89 opened this issue Jun 23, 2024 · 5 comments
Open

WASM + Debug #1416

Nekto89 opened this issue Jun 23, 2024 · 5 comments
Assignees
Labels

Comments

@Nekto89
Copy link
Contributor

Nekto89 commented Jun 23, 2024

Hi,

Should oneTBB tests pass in Debug configuration on WASM? I've tried using latest emsdk docker container on latest master and followed instructions from https://github.com/oneapi-src/oneTBB/blob/master/WASM_Support.md

docker run --rm -v %CD%:/usr/src -it emscripten/emsdk /bin/bash
Inside container:
emcmake cmake -DCMAKE_CXX_COMPILER=em++ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=emcc -DTBB_STRICT=OFF -DCMAKE_CXX_FLAGS=-Wno-unused-command-line-argument -DTBB_DISABLE_HWLOC_AUTOMATIC_SEARCH=ON -DBUILD_SHARED_LIBS=ON -DTBB_EXAMPLES=ON -DTBB_TEST=ON -B build -S /usr/src/oneTBB-master
cd build
cmake --build . -j
cmake --build .
ctest --output-on-failure

In Release everything works fine. In Debug I'm getting lots of errors. I didn't check all of them, but from scrolling I see this assertion in each test:

3/122 Test   #3: test_arena_priorities ....................***Failed    0.08 sec
[doctest] doctest version is "2.4.11"
[doctest] run with "--help" for options
Assertion base > stack_size / 2 failed (located in the calculate_stealing_threshold function, line in file: 565)
Detailed description: Stack anchor calculation overflow
Aborted(native code called abort())
/src/build/clang_19.0_cxx11_32_debug/test_arena_priorities.js:143
      throw ex;
      ^

RuntimeError: Aborted(native code called abort())
    at abort (/src/build/clang_19.0_cxx11_32_debug/test_arena_priorities.js:692:41)
    at __abort_js (/src/build/clang_19.0_cxx11_32_debug/test_arena_priorities.js:4372:3)
    at test_arena_priorities.wasm.abort (wasm://wasm/test_arena_priorities.wasm-026427d6:wasm-function[5250]:0x1367b0)
    at test_arena_priorities.wasm.tbb::detail::r1::assertion_failure_impl(char const*, int, char const*, char const*) (wasm://wasm/test_arena_priorities.wasm-026427d6:wasm-function[4326]:0xfa172)
    at test_arena_priorities.wasm.tbb::detail::r1::assertion_failure(char const*, int, char const*, char const*)::$_0::operator()() const (wasm://wasm/test_arena_priorities.wasm-026427d6:wasm-function[4325]:0xfa033)
    at test_arena_priorities.wasm.void tbb::detail::d0::run_initializer<tbb::detail::r1::assertion_failure(char const*, int, char const*, char const*)::$_0>(tbb::detail::r1::assertion_failure(char const*, int, char const*, char const*)::$_0 const&, std::__2::atomic<tbb::detail::d0::do_once_state>&) (wasm://wasm/test_arena_priorities.wasm-026427d6:wasm-function[4316]:0xf9c03)
    at test_arena_priorities.wasm.void tbb::detail::d0::atomic_do_once<tbb::detail::r1::assertion_failure(char const*, int, char const*, char const*)::$_0>(tbb::detail::r1::assertion_failure(char const*, int, char const*, char const*)::$_0 const&, std::__2::atomic<tbb::detail::d0::do_once_state>&) (wasm://wasm/test_arena_priorities.wasm-026427d6:wasm-function[4315]:0xf9b8f)
    at test_arena_priorities.wasm.tbb::detail::r1::assertion_failure(char const*, int, char const*, char const*) (wasm://wasm/test_arena_priorities.wasm-026427d6:wasm-function[4314]:0xf9a74)
    at test_arena_priorities.wasm.tbb::detail::r1::calculate_stealing_threshold(unsigned long, unsigned long) (wasm://wasm/test_arena_priorities.wasm-026427d6:wasm-function[3175]:0xa81df)
    at test_arena_priorities.wasm.tbb::detail::r1::governor::init_external_thread() (wasm://wasm/test_arena_priorities.wasm-026427d6:wasm-function[3870]:0xd5e95)

Node.js v18.20.3

Am I doing something wrong? Do I need to use some older version?

@pavelkumbrasev
Copy link
Contributor

Could you please test on this PR?
#1395

@Nekto89
Copy link
Contributor Author

Nekto89 commented Jun 24, 2024

Could you please test on this PR? #1395

I've applied 1395.patch on top of yesterday's master

https://gist.github.com/Nekto89/913ba04a4c88401142b44d5e7075d1a3

With timeout 240

The following tests FAILED:
2 - test_allocators (Failed)
5 - test_collaborative_call_once (Failed)
15 - test_parallel_reduce (Timeout)
18 - test_parallel_scan (Failed)
23 - test_task_group (Timeout)
52 - test_tagged_msg (Failed)
71 - conformance_allocators (Failed)
72 - conformance_mutex (Timeout)

@pavelkumbrasev
Copy link
Contributor

Could you provide log for these failures?

@Nekto89
Copy link
Contributor Author

Nekto89 commented Jun 25, 2024

Could you provide log for these failures?

Is that gist.github link not publicly available?

@JhaShweta1
Copy link
Contributor

Yes, we are able to access it. Thank you for reporting. We are looking into it.

@JhaShweta1 JhaShweta1 self-assigned this Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants