TBufferMerger fails to write histograms to output file for Alma Linux

Continuing the discussion from Multi-threaded output of TH* histograms via TBufferMerger:


ROOT Version: 6.36.10
Platform: Alma Linux 8.10 (linuxx8664gcc)
Compiler: c++ (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28)


Details about this issue, along with a small code to reproduce, are contained in the original linked discussion. The original issue was never resolved, and this has become a crucial issue for me that now needs to be fixed. The gist is as follows:

I have tried all manner of different ways of writing a histogram to the thread-local file, with no success.

Crucially: The writing of histograms in this manner works just fine on other versions of Linux.

Mainly, I have tested and verified that this works on Rocky Linux for the same version 6.36.10 of ROOT. However, for some unexplicable reason, it fails to work on Alma Linux 8.10.

I have a data analysis code which relies on this functionality, and this issue needs to be resolved before I can continue with my work. I am so incredibly confused by this problem, and have made absolutely no progress in fixing it.

Hi @crafter312, thanks for your question. @pcanal might be able to help here.

Could you share a full reproducer? Meaning either posting also the input ROOT files you used (or linking them on a public repo), or creating a dummy TFile with a hist and TTree with those branches and 10 entries, directly in the code.

I don’t know if, as-is, the macro in the linked post reproduces the issue, but it does not really need any specific root file, it only needs to contain a tree (named “t”) for a TTreeReader loop but without reading data from it, and the macro creates a new file with a new “t” tree containing the (new) histogram with random values and as many entries as the tree in the “input” file.
Adding to the mentioned Rocky Linux, where it is reported to work, for me it worked as well on Linux Mint 22 (root binaries 6.36.08 and 6.36.10) and Fedora 43 (compiled version 6.36.08), using a random file containing around 4.6 million entries (not sure if enough for multithreading).

I made a fully self-contained version of the test macro used to reproduce my issue, my apologies for not doing so at the start:

tbuffermerger_hist.C (1.8 KB)

With this new version of the test macro, I once again verified that the output tree fills just fine, but the histogram fails to show up on Alma Linux 8.10. I also verified that the code does work properly on Arch Linux.

I see the same problem on Ubuntu 22.04 LTS / x86_64 with ROOT 6.26.14, 6.26.18, 6.28.14, 6.30.04, 6.30.10, 6.32.22, 6.34.10, and 6.36.10.
The test macro works fine with ROOT 6.38.04.

1 Like

@vpadulan @silverweed @pcanal is it viable to backport the fix (when identified which commit it was) from 6.38 to 6.36 ?

I can confirm that both the self-contained macro attached above and my full code work on Alma Linux 8.10 with ROOT 6.38.04.

This problem is still present in ROOT 6.36.12.