# Root build:: jemalloc breaks libcppyy

**URL:** <https://root-forum.cern.ch/t/root-build-jemalloc-breaks-libcppyy/47252>\
**Category:** ROOT\
**Tags:** build\
**Created:** [October 15, 2021, 12:46pm UTC](https://root-forum.cern.ch/t/root-build-jemalloc-breaks-libcppyy/47252 "2021-10-15T12:46:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrian\_sev](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/adrian_sev/32/13169_2.png) [@adrian\_sev](https://root-forum.cern.ch/u/adrian_sev)\
**Post date:** [October 15, 2021, 12:46pm UTC](https://root-forum.cern.ch/t/root-build-jemalloc-breaks-libcppyy/47252/1 "2021-10-15T12:46:58Z")

</div>

_ROOT Version:_ git v6-24-00-patches @5af1fa4d3d  
_Platform:_ fedora 34  
_Compiler:_ 11.2.1 20210728

* * *

enabling jemalloc in the build and trying rootls throws:

```auto
time rootls -h
Traceback (most recent call last):
File "/home/physics-tools/ROOT/v6-24-00-patches/lib/cppyy/ __init__.py", line 60, in <module>
importlib.import_module(libcppyy_mod_name)
File "/usr/lib64/python3.9/importlib/ __init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 565, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1173, in create_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
ImportError: /lib64/libjemalloc.so.2: cannot allocate memory in static TLS block

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/physics-tools/ROOT/v6-24-00-patches/bin/rootls", line 10, in <module>
import cmdLineUtils
File "/home/physics-tools/ROOT/v6-24-00-patches/lib/cmdLineUtils.py", line 82, in <module>
import ROOT
File "/home/physics-tools/ROOT/v6-24-00-patches/lib/ROOT/ __init__.py", line 22, in <module>
import cppyy
File "/home/physics-tools/ROOT/v6-24-00-patches/lib/cppyy/ __init__.py", line 62, in <module>
raise ImportError(
ImportError: Failed to import libcppyy3_9. Please check that ROOT has been built for Python 3.9

```

that time is there because at first usage (after fresh compilation) it stays a looong time compiling something, and i wanted to time it and investigate why is so…

---

<div class="post-metadata">

**Author:** ![etejedor](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/e79b87/32.png) [@etejedor](https://root-forum.cern.ch/u/etejedor)\
**Post date:** [October 15, 2021, 1:29pm UTC](https://root-forum.cern.ch/t/root-build-jemalloc-breaks-libcppyy/47252/2 "2021-10-15T13:29:53Z")

</div>

Thank you for reporting, I will have a look and get back to you.

---

<div class="post-metadata">

**Author:** ![etejedor](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/e79b87/32.png) [@etejedor](https://root-forum.cern.ch/u/etejedor)\
**Post date:** [October 18, 2021, 12:47pm UTC](https://root-forum.cern.ch/t/root-build-jemalloc-breaks-libcppyy/47252/3 "2021-10-18T12:47:43Z")

</div>

I tried on my ubuntu machine with ROOT master and jemalloc and can’t reproduce. I’ll see if I can try on one of our fedora nodes.

---

<div class="post-metadata">

**Author:** ![etejedor](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/e79b87/32.png) [@etejedor](https://root-forum.cern.ch/u/etejedor)\
**Post date:** [October 19, 2021, 1:24pm UTC](https://root-forum.cern.ch/t/root-build-jemalloc-breaks-libcppyy/47252/4 "2021-10-19T13:24:53Z")

</div>

I tried on fedora34, jemalloc=ON, gcc 11.1.1, python3.9, current ROOT 6.24 patches (so almost the same configuration as you except for the slight compiler version difference) and I can’t reproduce:

```auto
[sftnight@root-fedora34-1 build_jemalloc]$ rootls -h
usage: rootls [-h] [-1] [-l] [-t] FILE [FILE ...]

Display ROOT files contents in the terminal.

positional arguments:
  FILE Input file
...

```

---

<div class="post-metadata">

**Author:** ![adrian\_sev](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/adrian_sev/32/13169_2.png) [@adrian\_sev](https://root-forum.cern.ch/u/adrian_sev)\
**Post date:** [October 19, 2021, 3:28pm UTC](https://root-forum.cern.ch/t/root-build-jemalloc-breaks-libcppyy/47252/5 "2021-10-19T15:28:09Z")

</div>

well, who knows what is going on … i do not really need jemalloc, so my report was more on a “heads up” mode than “i encountered a bug”. so, this can be closed, if it becomes endemic, from multiple reports it will be easier to spot the culprit. thank you for taking time to check this!!  
L.E. i forgot to mention that the build and install is done with ninja … should not matter isn’t it?

---

<div class="post-metadata">

**Author:** ![etejedor](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/e79b87/32.png) [@etejedor](https://root-forum.cern.ch/u/etejedor)\
**Post date:** [October 20, 2021, 4:46pm UTC](https://root-forum.cern.ch/t/root-build-jemalloc-breaks-libcppyy/47252/6 "2021-10-20T16:46:24Z")

</div>

I would say it shouldn’t matter, anyway thank you for reporting! I’ll be vigilant in case this is reported again.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [November 3, 2021, 4:47pm UTC](https://root-forum.cern.ch/t/root-build-jemalloc-breaks-libcppyy/47252/7 "2021-11-03T16:47:01Z")

</div>

Closed on November 3, 2021, 4:47pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
