-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
Hi,
After having fixed several tests on FreeBSD (see #1945 and #1950), a tests still fails sometimes on FreeBSD 15.0-RELEASE i386 (32 bit).
Call 1 :
# /wrkdirs/usr/ports/devel/onetbb/work/.build/clang_19.1_cxx11_32_debug/test_malloc_used_by_lib
[doctest] doctest version is "2.4.11"
[doctest] run with "--help" for options
Assertion backRefMain.load(std::memory_order_relaxed) failed (located in the newBackRef function, line in file: 269)
===============================================================================
test/tbbmalloc/test_malloc_used_by_lib.cpp:127:
TEST CASE: use test as lib
test/tbbmalloc/test_malloc_used_by_lib.cpp:127: FATAL ERROR: test case CRASHED: SIGABRT - Abort (abnormal termination) signal
===============================================================================
[doctest] test cases: 1 | 0 passed | 1 failed | 0 skipped
[doctest] assertions: 1 | 1 passed | 0 failed |
[doctest] Status: FAILURE!
Abort trap
Call 2 :
# /wrkdirs/usr/ports/devel/onetbb/work/.build/clang_19.1_cxx11_32_debug/test_malloc_used_by_lib
[doctest] doctest version is "2.4.11"
[doctest] run with "--help" for options
===============================================================================
[doctest] test cases: 1 | 1 passed | 0 failed | 0 skipped
[doctest] assertions: 8 | 8 passed | 0 failed |
[doctest] Status: SUCCESS!
Debugging a failing call shows the following :
(gdb) break src/tbbmalloc/backref.cpp:269
No source file named src/tbbmalloc/backref.cpp.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (src/tbbmalloc/backref.cpp:269) pending.
(gdb) run
Starting program: /wrkdirs/usr/ports/devel/onetbb/work/.build/clang_19.1_cxx11_32_debug/test_malloc_used_by_lib
warning: Could not load shared library symbols for [vdso].
Do you need "set solib-search-path" or "set sysroot"?
[doctest] doctest version is "2.4.11" [doctest] run with "--help" for options
[New LWP 405994 of process 44942]
[New LWP 405993 of process 44942] [New LWP 405995 of process 44942]
[New LWP 405996 of process 44942]
[Switching to LWP 405994 of process 44942]
Thread 2 hit Breakpoint 1, rml::internal::BackRefIdx::newBackRef (largeObj=false) at src/tbbmalloc/backref.cpp:269
269 MALLOC_ASSERT(backRefMain.load(std::memory_order_relaxed), ASSERT_TEXT);
(gdb) p backRefMain
$1 = {<std::__1::__atomic_base<rml::internal::BackRefMain*, false>> = {__a_ = {<std::__1::__cxx_atomic_base_impl<rml::internal::BackRefMain*>> = {__a_value = 0x0}, <No data fields>}}, <No data fields>}
(gdb) c
Continuing.
Assertion backRefMain.load(std::memory_order_relaxed) failed (located in the newBackRef function, line in file: 269)
Thread 2 received signal SIGABRT, Aborted.
Sent by thr_kill() from pid 44942 and user 0.
0x2077cd5f in thr_kill () from /lib/libc.so.7
Assertion failed, so the test is aborted. When the test succeeds, I get a non-NULL value for __a_value above.
Here is the backtrace just after a failure :
(gdb) bt full
#0 0x2077cd5f in thr_kill () from /lib/libc.so.7
No symbol table info available.
#1 0x206fb35b in raise () from /lib/libc.so.7
No symbol table info available.
#2 0x207a619b in abort () from /lib/libc.so.7
No symbol table info available.
#3 0x2085bcea in rml::internal::assertion_failure_impl(char const*, int, char const*, char const*)::$_0::operator()() const (this=0xdfefbd68) at src/tbbmalloc/../tbb/assert_impl.h:71
No locals.
#4 0x2085bc17 in tbb::detail::d0::run_initializer<rml::internal::assertion_failure_impl(char const*, int, char const*, char const*)::$_0>(rml::internal::assertion_failure_impl(char const*, int, char const*, char const*)::$_0 const&, st
d::__1::atomic<tbb::detail::d0::do_once_state>&) (f=..., state=...) at src/tbbmalloc/../../include/oneapi/tbb/detail/_utils.h:295
No locals.
#5 0x2085bb9a in tbb::detail::d0::atomic_do_once<rml::internal::assertion_failure_impl(char const*, int, char const*, char const*)::$_0>(rml::internal::assertion_failure_impl(char const*, int, char const*, char const*)::$_0 const&, std
::__1::atomic<tbb::detail::d0::do_once_state>&) (initializer=..., state=...) at src/tbbmalloc/../../include/oneapi/tbb/detail/_utils.h:284
expected_state = tbb::detail::d0::do_once_state::uninitialized
#6 0x2085bace in rml::internal::assertion_failure_impl (location=0x2083427d "newBackRef", line=269, expression=0x20831829 "backRefMain.load(std::memory_order_relaxed)", comment=0x0) at src/tbbmalloc/../tbb/assert_impl.h:56
No locals.
#7 0x2085b8dd in rml::internal::assertion_failure (location=0x2083427d "newBackRef", line=269, expression=0x20831829 "backRefMain.load(std::memory_order_relaxed)", comment=0x0) at src/tbbmalloc/../tbb/assert_impl.h:97
No locals.
#8 0x20847b3b in rml::internal::BackRefIdx::newBackRef (largeObj=false) at src/tbbmalloc/backref.cpp:269
blockToUse = 0x101000d
toUse = 0x4
res = {static invalid = 65535, main = 65535, largeObj = 0, offset = 0}
lastBlockFirstUsed = false
offset = 545686952
#9 0x2084c1f3 in rml::internal::StartupBlock::getBlock () at src/tbbmalloc/frontend.cpp:1854
backRefIdx = {static invalid = 65535, main = 14370, largeObj = 0, offset = 4162}
block = 0xf2dba191
#10 0x2084c356 in rml::internal::StartupBlock::allocate (size=4) at src/tbbmalloc/frontend.cpp:1885
scoped_cs = {<tbb::detail::d0::no_copy> = {<tbb::detail::d0::no_assign> = {<No data fields>}, <No data fields>}, m_mutex = @0x208794b4, m_taken = true}
result = 0xdfffce50
newBlock = 0x0
reqSize = 8
#11 0x2084d18b in rml::internal::internalMalloc (size=4) at src/tbbmalloc/frontend.cpp:2661
No locals.
#12 0x2084e318 in scalable_malloc (size=0) at src/tbbmalloc/frontend.cpp:2947
ptr = 0x1
Any idea what's wrong here ?
Thanks,
Ganael.
Reactions are currently unavailable