Skip to content

[CMake] Replace logic that checks removed tbb build option#20564

Merged
guitargeek merged 1 commit intoroot-project:masterfrom
guitargeek:issue-19798-2
Nov 29, 2025
Merged

[CMake] Replace logic that checks removed tbb build option#20564
guitargeek merged 1 commit intoroot-project:masterfrom
guitargeek:issue-19798-2

Conversation

@guitargeek
Copy link
Contributor

A long time ago, ROOT had a tbb build option, but it was removed in the ROOT 6.08 development cycle in dd899a5 from 2015, by @peremato.

However, some build configurations still use it, like CMSSW and Conda:

That would not be a problem per se, but then, in 2021, @bendavid introduced a new optimization that is enabled only with the long-time removed tbb flag (or builtin_tbb), in 6c8b77d:

So we ended up with a secret tbb=ON configuration that our CI doesn't test, and a CMake configuration option that has a pretty fundamental effect but is not documented.

In the discussions in #19798 with @bendavid, we concluded that it would not be a problem to enable the optimized locks with TBB always when TBB is available during the ROOT build. See:
#19798 (comment)

Closes #19798.

A long time ago, ROOT had a `tbb` build option, but it was removed in
the ROOT 6.08 development cycle in dd899a5 from 2015, by @peremato.

However, some build configurations still use it, like CMSSW and Conda:
  * https://github.com/cms-sw/cmsdist/blob/IB/CMSSW_15_1_X/master/root.spec#L78
  * https://github.com/conda-forge/root-feedstock/blob/main/recipe/build_root.sh#L342

That would not be a problem per se, but then, in 2021, @bendavid
introduced a new optimization that is enabled only with the long-time
removed `tbb` flag (or `builtin_tbb`), in 6c8b77d:

  * root-project#7260

So we ended up with a secret `tbb=ON` configuration that our CI doesn't
test, and a CMake configuration option that has a pretty fundamental
effect but is not documented.

In the discussions in root-project#19798 with @bendavid, we concluded that it would
not be a problem to enable the optimized locks with TBB always when TBB
is available during the ROOT build. See:
root-project#19798 (comment)

Closes root-project#19798.
Copy link
Member

@pcanal pcanal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@guitargeek
Copy link
Contributor Author

guitargeek commented Nov 28, 2025

The failure on Ubuntu 25.10 seems to be related, unfortunately:

2025-11-28T16:23:45.8929060Z 1518/3712 Test  #656: gtest-tree-tree-evolution .........................................................................***Failed    0.90 sec
2025-11-28T16:23:45.9030785Z Running main() from ./googletest/src/gtest_main.cc
2025-11-28T16:23:45.9089855Z [==========] Running 1 test from 1 test suite.
2025-11-28T16:23:45.9090369Z [----------] Global test environment set-up.
2025-11-28T16:23:45.9090881Z [----------] 1 test from TTree
2025-11-28T16:23:45.9096045Z [ RUN      ] TTree.RenameSplitCollection
2025-11-28T16:23:45.9382097Z /github/home/ROOT-CI/src/core/testsupport/src/TestSupport.cxx:93: Failure
2025-11-28T16:23:45.9382524Z Failed
2025-11-28T16:23:45.9387088Z Received unexpected diagnostic of severity 4000 at 'TUnixSystem::DispatchSignals' reading 'segmentation violation'.
2025-11-28T16:23:45.9387596Z Suppress those using ROOT/TestSupport.hxx
2025-11-28T16:23:45.9387775Z 
2025-11-28T16:23:45.9387876Z  Generating stack trace...
2025-11-28T16:23:45.9388590Z  0x00007f0926bbacdc in THashList::Delete(char const*) at /github/home/ROOT-CI/src/core/base/inc/TVirtualRWMutex.h:145 from /github/home/ROOT-CI/build/lib/libCore.so
2025-11-28T16:23:45.9389958Z  0x00007f0926f9f074 in TDirectoryFile::Close(char const*) at /github/home/ROOT-CI/src/io/io/src/TDirectoryFile.cxx:590 from /github/home/ROOT-CI/build/lib/libRIO.so
2025-11-28T16:23:45.9390863Z  0x00007f0926fbf6fa in TFile::Close(char const*) at /github/home/ROOT-CI/src/io/io/src/TFile.cxx:999 from /github/home/ROOT-CI/build/lib/libRIO.so
2025-11-28T16:23:45.9391673Z  0x0000558c1a74c4a6 in TTree_RenameSplitCollection_Test::TestBody() + 0x126 from /github/home/ROOT-CI/build/tree/tree/test/evolution
2025-11-28T16:23:45.9392691Z  0x0000558c1a7905c7 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) + 0x87 from /github/home/ROOT-CI/build/tree/tree/test/evolution
2025-11-28T16:23:45.9393594Z  0x0000558c1a77596e in testing::Test::Run() + 0xee from /github/home/ROOT-CI/build/tree/tree/test/evolution
2025-11-28T16:23:45.9394199Z  0x0000558c1a775af5 in testing::TestInfo::Run() + 0x165 from /github/home/ROOT-CI/build/tree/tree/test/evolution
2025-11-28T16:23:45.9394931Z  0x0000558c1a780907 in testing::TestSuite::Run() + 0x1d7 from /github/home/ROOT-CI/build/tree/tree/test/evolution
2025-11-28T16:23:45.9395633Z  0x0000558c1a785a7c in testing::internal::UnitTestImpl::RunAllTests() + 0x5ec from /github/home/ROOT-CI/build/tree/tree/test/evolution
2025-11-28T16:23:45.9396801Z  0x0000558c1a790c27 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) + 0x87 from /github/home/ROOT-CI/build/tree/tree/test/evolution
2025-11-28T16:23:45.9397957Z  0x0000558c1a775b8a in testing::UnitTest::Run() + 0x8a from /github/home/ROOT-CI/build/tree/tree/test/evolution
2025-11-28T16:23:45.9398540Z  0x0000558c1a74c286 in main + 0x46 from /github/home/ROOT-CI/build/tree/tree/test/evolution
2025-11-28T16:23:45.9399016Z  0x00007f0926367575 in <unknown> from /lib/x86_64-linux-gnu/libc.so.6
2025-11-28T16:23:45.9399598Z  0x00007f0926367628 in __libc_start_main + 0x88 from /lib/x86_64-linux-gnu/libc.so.6
2025-11-28T16:23:45.9400461Z  0x0000558c1a74c2b5 in _start + 0x25 from /github/home/ROOT-CI/build/tree/tree/test/evolution
2025-11-28T16:23:45.9400986Z CMake Error at /github/home/ROOT-CI/src/cmake/modules/RootTestDriver.cmake:232 (message):
2025-11-28T16:23:45.9401345Z   error code: 139

@bendavid, @pcanal, do you have any idea what is going on here? You accidentally got a free pass merging untested code in #7260, so I would appreciate your follow-up 🙂

edit: I had to correct myself, the TBB locks were not completely untested. They were tested in the case of builtin_tbb=ON, which is the case for alma8 and the macOS platforms. So maybe the problem is related to the newer TBB version on Ubuntu 25.10?

@github-actions
Copy link

github-actions bot commented Nov 28, 2025

Test Results

    22 files      22 suites   3d 19h 9m 54s ⏱️
 3 780 tests  3 778 ✅ 0 💤 2 ❌
81 232 runs  81 230 ✅ 0 💤 2 ❌

For more details on these failures, see this check.

Results for commit 44804e5.

♻️ This comment has been updated with latest results.

@guitargeek
Copy link
Contributor Author

guitargeek commented Nov 29, 2025

Actually, I was not correct. What made me think that the failure was related was the TVirtualRWMutex in the stack trace.

However, the failure of gtest-tree-tree-evolution seems to be a common sporadic failure, which can be seen for example in this CI run (the incremental build after merging PR #20561), also on Ubuntu 25.04. The stack trace is exactly the same, so now I convinced myself that this PR doesn't cause any regressions:

2025-11-28T15:19:23.4545408Z 1524/3709 Test  #656: gtest-tree-tree-evolution .........................................................................***Failed    1.08 sec
2025-11-28T15:19:23.4700280Z Running main() from ./googletest/src/gtest_main.cc
2025-11-28T15:19:23.4701240Z [==========] Running 1 test from 1 test suite.
2025-11-28T15:19:23.4701736Z [----------] Global test environment set-up.
2025-11-28T15:19:23.4702346Z [----------] 1 test from TTree
2025-11-28T15:19:23.4702859Z [ RUN      ] TTree.RenameSplitCollection
2025-11-28T15:19:23.4710694Z /github/home/ROOT-CI/src/core/testsupport/src/TestSupport.cxx:93: Failure
2025-11-28T15:19:23.4711496Z Failed
2025-11-28T15:19:23.4769961Z Received unexpected diagnostic of severity 4000 at 'TUnixSystem::DispatchSignals' reading 'segmentation violation'.
2025-11-28T15:19:23.4770909Z Suppress those using ROOT/TestSupport.hxx
2025-11-28T15:19:23.4771214Z 
2025-11-28T15:19:23.4771356Z  Generating stack trace...
2025-11-28T15:19:23.4772414Z  0x00007f2f27b29cdc in THashList::Delete(char const*) at /github/home/ROOT-CI/src/core/base/inc/TVirtualRWMutex.h:145 from /github/home/ROOT-CI/build/lib/libCore.so
2025-11-28T15:19:23.4774674Z  0x00007f2f27f0e074 in TDirectoryFile::Close(char const*) at /github/home/ROOT-CI/src/io/io/src/TDirectoryFile.cxx:590 from /github/home/ROOT-CI/build/lib/libRIO.so
2025-11-28T15:19:23.4776571Z  0x00007f2f27f2e6fa in TFile::Close(char const*) at /github/home/ROOT-CI/src/io/io/src/TFile.cxx:999 from /github/home/ROOT-CI/build/lib/libRIO.so
2025-11-28T15:19:23.4778027Z  0x0000560d20e004a6 in TTree_RenameSplitCollection_Test::TestBody() + 0x126 from /github/home/ROOT-CI/build/tree/tree/test/evolution
2025-11-28T15:19:23.4780384Z  0x0000560d20e445c7 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) + 0x87 from /github/home/ROOT-CI/build/tree/tree/test/evolution
2025-11-28T15:19:23.4782182Z  0x0000560d20e2996e in testing::Test::Run() + 0xee from /github/home/ROOT-CI/build/tree/tree/test/evolution
2025-11-28T15:19:23.4783377Z  0x0000560d20e29af5 in testing::TestInfo::Run() + 0x165 from /github/home/ROOT-CI/build/tree/tree/test/evolution
2025-11-28T15:19:23.4784435Z  0x0000560d20e34907 in testing::TestSuite::Run() + 0x1d7 from /github/home/ROOT-CI/build/tree/tree/test/evolution
2025-11-28T15:19:23.4785678Z  0x0000560d20e39a7c in testing::internal::UnitTestImpl::RunAllTests() + 0x5ec from /github/home/ROOT-CI/build/tree/tree/test/evolution
2025-11-28T15:19:23.4788223Z  0x0000560d20e44c27 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) + 0x87 from /github/home/ROOT-CI/build/tree/tree/test/evolution
2025-11-28T15:19:23.4791010Z  0x0000560d20e29b8a in testing::UnitTest::Run() + 0x8a from /github/home/ROOT-CI/build/tree/tree/test/evolution
2025-11-28T15:19:23.4792300Z  0x0000560d20e00286 in main + 0x46 from /github/home/ROOT-CI/build/tree/tree/test/evolution
2025-11-28T15:19:23.4793102Z  0x00007f2f272d6575 in <unknown> from /lib/x86_64-linux-gnu/libc.so.6
2025-11-28T15:19:23.4793859Z  0x00007f2f272d6628 in __libc_start_main + 0x88 from /lib/x86_64-linux-gnu/libc.so.6
2025-11-28T15:19:23.4794857Z  0x0000560d20e002b5 in _start + 0x25 from /github/home/ROOT-CI/build/tree/tree/test/evolution
2025-11-28T15:19:23.4795778Z CMake Error at /github/home/ROOT-CI/src/cmake/modules/RootTestDriver.cmake:232 (message):
2025-11-28T15:19:23.4796431Z   error code: 139

@guitargeek guitargeek merged commit 1df6d55 into root-project:master Nov 29, 2025
51 of 59 checks passed
@guitargeek guitargeek deleted the issue-19798-2 branch November 29, 2025 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Removed option tbb is still considered to enable secret optimization of ROOT::gCoreMutex

2 participants

Comments