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

test_limiter_node causes segmentation fault in release mode #489

Closed
Flamefire opened this issue Jul 14, 2021 · 6 comments
Closed

test_limiter_node causes segmentation fault in release mode #489

Flamefire opened this issue Jul 14, 2021 · 6 comments

Comments

@Flamefire
Copy link

Flamefire commented Jul 14, 2021

The test fails with a SIGSEGV in release mode:

44: /tmp/s3248973-EasyBuild/tbb/2021.3.0/GCCcore-10.3.0/oneTBB-2021.3.0/test/tbb/test_limiter_node.cpp:522:
44: TEST CASE:  Message is released if successor does not accept
44: 
44: /tmp/s3248973-EasyBuild/tbb/2021.3.0/GCCcore-10.3.0/oneTBB-2021.3.0/test/tbb/test_limiter_node.cpp:522: FATAL ERROR: test case CRASHED: SIGSEGV - Segmentation violation signal
44: 
44: ===============================================================================
44: [doctest] test cases:      4 |      3 passed |      1 failed |      2 skipped
44: [doctest] assertions: 217181 | 217181 passed |      0 failed |
44: [doctest] Status: FAILURE!
 44/131 Test  #44: test_limiter_node ........................***Exception: SegFault  2.96 sec

It passes in Debug and RelWithDebInfo. Enabling the workaround at https://github.com/oneapi-src/oneTBB/blob/55f9b178643d2925e9d81151efd08ac34dc69625/test/tbb/test_limiter_node.cpp#L358-L365 for the used GCC 10 makes it pass.

According to GDB the crash happens in spawn_in_graph_arena, but due to inlining I can't tell more.

Compiling with UBSAN shows:

include/tbb/../oneapi/tbb/flow_graph.h:2019:37: runtime error: execution reached an unreachable program point

So I guess there is an actual logic error somewhere

@phprus
Copy link
Contributor

phprus commented Jul 14, 2021

Related issue: #342

@Flamefire
Copy link
Author

Thanks, and indeed -fno-ipa-cp-clone resolves the issue with TBB as well as with UBSAN and valgrind. So I'd guess it is a GCC bug.

@omalyshe
Copy link
Contributor

@Flamefire Can you close the issue as resolved?

@Flamefire
Copy link
Author

Not sure. Although it is a GCC bug, the issue persists, so I'd rather leave this open until either the bug is permanently workaround-ed or the GCC bug is fixed.
I see the workaround has been updated to include GCC 10 and 11, but if not resolved it will still happen for GCC 12: 7567de9

Also note that the above commit erroneously copied the comment //putting the successor back (cc @Iliamish )

@anton-potapov
Copy link
Contributor

@Flamefire as the #647 is landed - could you check if the problem is fixed ?

@isaevil
Copy link
Contributor

isaevil commented Oct 5, 2022

Seems like the problem is solved. If any other questions are left, feel free to reopen this issue.

@isaevil isaevil closed this as completed Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants