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

2021.1.1: Test failures #317

Closed
Lastique opened this issue Dec 16, 2020 · 16 comments
Closed

2021.1.1: Test failures #317

Lastique opened this issue Dec 16, 2020 · 16 comments
Labels

Comments

@Lastique
Copy link
Contributor

Lastique commented Dec 16, 2020

When building oneTBB 2021.1.1 release on Kubuntu 20.10 x86_64, the following tests fail:

  • 43 - test_limiter_node (INTERRUPT)
  • 69 - conformance_arena_constraints (Failed)
  • 125 - test_malloc_whitebox (SEGFAULT)
  • 126 - test_malloc_atexit (SEGFAULT)
  • 127 - test_malloc_overload (SEGFAULT)
  • 128 - test_malloc_overload_disable (SEGFAULT)
  • 129 - test_malloc_new_handler (SEGFAULT)

The test_limiter_node test is hanging indefinitely and in this case was interrupted with SIGINT.

The libtbbbind library CMake file was patched to be able to compile it with libhwloc 2.2.0, which is the version of the library that is available in Kubuntu 20.10 repos. This patch is here: fix_hwloc_detection.patch.txt

The library was also patched to work around #312. This patch is here: fix_inheriting_members.patch.txt (#318)

The full log is here: tbb_build_fail.txt

This was run on a Core i7 2600K.

@alexey-katranov
Copy link
Contributor

alexey-katranov commented Dec 16, 2020

Thank you for the report.

Can you please clarify what issues did you have with libtbbbind? Notify: @AlexVeprev , @ivankochin

@Lastique
Copy link
Contributor Author

libtbbbind is simply excluded from the build because CMake script does not find neither 1.11 nor 2.0 version of libhwloc on the system (because the installed version is 2.2.0). This is described in #319.

@alexey-katranov
Copy link
Contributor

@Lastique , do you use release build (not relwithdebinfo)? If so, can you try to add CXXFLAGS="-fno-ipa-cp-clone" to check if the issue relates to #342 (comment). Thank you in advance.

@Lastique
Copy link
Contributor Author

do you use release build (not relwithdebinfo)?

Yes.

If so, can you try to add CXXFLAGS="-fno-ipa-cp-clone"

It fixed some tests but not conformance_arena_constraints and conformance_enumerable_thread_specific. The latter one does not fail 100% of the runs, only on some runs. I'm attaching a full build log.

tbb_build.txt

Having to disable compiler optimizations makes me suspect that something is not right with the code.

@anton-potapov
Copy link
Contributor

@Lastique is this still reproducible with 2021.4 or latest master ?

@Lastique
Copy link
Contributor Author

Lastique commented Oct 25, 2021

2021.4 does not compile:

In member function ‘set’,
    inlined from ‘set_my_tls_end_of_input’ at ./src/tbb/parallel_pipeline.cpp:246:29,
    inlined from ‘set_end_of_input’ at ./src/tbb/parallel_pipeline.cpp:465:52:
./src/tbb/tls.h:44:46: warning: ‘pthread_setspecific’ expecting 1 byte in a region of size 0 [-Wstringop-overread]
./src/tbb/tls.h: In function ‘set_end_of_input’:
/usr/include/pthread.h:1308:12: note: in a call to function ‘pthread_setspecific’ declared with attribute ‘access (none, 2)’
 1308 | extern int pthread_setspecific (pthread_key_t __key,
      |            ^
In file included from /build/tbb/test/tbbmalloc/test_malloc_new_handler.cpp:36:
In member function ‘void tbb::detail::r1::basic_tls<T>::set(T) [with T = bool]’,
    inlined from ‘T tbb::detail::r1::tls<T>::operator=(T) [with T = bool]’ at /build/tbb/test/tbbmalloc/../../src/tbb/tls.h:85:37,
    inlined from ‘void customNewHandler()’ at /build/tbb/test/tbbmalloc/test_malloc_new_handler.cpp:40:24:
/build/tbb/test/tbbmalloc/../../src/tbb/tls.h:44:46: error: ‘int pthread_setspecific(pthread_key_t, const void*)’ expecting 1 byte in a region of size 0 [-Werror=stringop-overread]
   44 |     void set( T value ) { pthread_setspecific(my_key, (void*)value); }
      |                           ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors
make[4]: *** [test/CMakeFiles/test_malloc_new_handler.dir/build.make:85: test/CMakeFiles/test_malloc_new_handler.dir/tbbmalloc/test_malloc_new_handler.cpp.o] Error 1
/build/tbb/test/tbbmalloc/test_malloc_init_shutdown.cpp: In member function ‘void TestThread::operator()(std::size_t) const’:
/build/tbb/test/tbbmalloc/test_malloc_init_shutdown.cpp:145:28: error: ‘int pthread_setspecific(pthread_key_t, const void*)’ expecting 1 byte in a region of size 0 [-Werror=stringop-overread]
  145 |         pthread_setspecific(key, (const void*)42);
      |         ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors
make[4]: *** [test/CMakeFiles/test_malloc_init_shutdown.dir/build.make:85: test/CMakeFiles/test_malloc_init_shutdown.dir/tbbmalloc/test_malloc_init_shutdown.cpp.o] Error 1

This is on Kubuntu 21.10 with gcc 11.2.

@Lastique
Copy link
Contributor Author

After applying #519 to 2021.4, test_eh_algorithms fails:

 22/133 Test  #20: test_eh_algorithms .......................***Failed    4.65 sec
[doctest] doctest version is "2.4.6"
[doctest] run with "--help" for options
===============================================================================
./test/tbb/test_eh_algorithms.cpp:462:
TEST CASE:  parallel_for and parallel_reduce exception handling test #4

./test/tbb/test_eh_algorithms.cpp:374: FATAL ERROR: REQUIRE( g_CurExecuted <= minExecuted + (g_NumThreads-1)*g_NumThreads/2 ) is NOT correct!
  values: REQUIRE( 2048 <= 1941 )
  logged: Too many tasks survived exception

===============================================================================
[doctest] test cases:    22 |    21 passed | 1 failed | 0 skipped
[doctest] assertions: 71691 | 71690 passed | 1 failed |
[doctest] Status: FAILURE!

@Lastique
Copy link
Contributor Author

Lastique commented Oct 25, 2021

After running the build a second time, test_eh_thread failed:

 54/133 Test  #61: test_eh_thread ...........................Child aborted***Exception:   0.19 sec
terminate called after throwing an instance of 'std::runtime_error'
terminate called recursively
[doctest] doctest version is "2.4.6"
[doctest] run with "--help" for options
===============================================================================
./test/tbb/test_eh_thread.cpp:88:
TEST CASE:  Too many threads

./test/tbb/test_eh_thread.cpp:133: FATAL ERROR: No exception was caught

./test/tbb/test_eh_thread.cpp:88: FATAL ERROR: test case CRASHED: SIGABRT - Abort (abnormal termination) signal

===============================================================================
[doctest] test cases: 1 | 0 passed | 1 failed | 0 skipped
[doctest] assertions: 3 | 2 passed | 1 failed |
[doctest] Status: FAILURE!

@alexey-katranov
Copy link
Contributor

I believe test_eh_thread is not really stable. @ivankochin @Iliamish , do you have any ideas how to improve it?

@Lastique , is test_eh_thread the only failing test in your environment?

@Lastique
Copy link
Contributor Author

Lastique commented Nov 2, 2021

I mentioned test_eh_algorithms as well above. I only ran the tests twice.

@anton-potapov
Copy link
Contributor

@Lastique, does #697 helped with the test_eh_thread ?

@Lastique
Copy link
Contributor Author

Lastique commented Jan 13, 2022

I built 2021.5.0 with #697 applied a couple times and got these failures:

The following tests FAILED:
        130 - test_malloc_atexit (SEGFAULT)
        131 - test_malloc_overload (SEGFAULT)
        132 - test_malloc_overload_disable (SEGFAULT)
        133 - test_malloc_new_handler (SEGFAULT)

Not test_eh_thread though, so I suppose it helped.

@sbonfert
Copy link

test_eh_thread seems to fail, if more than 1024 threads are already running when the test is started, since the outermost thread cannot be created. Maybe the thread limit should be chosen dynamically.

@nofuturre
Copy link

@Lastique is this issue still relevant?

@Lastique
Copy link
Contributor Author

Lastique commented Jul 8, 2024

I don't know, I haven't been running TBB tests for a while.

@nofuturre
Copy link

If anyone encounter this issue in the future please open new issue with a link to this one

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

5 participants