Uploaded image for project: 'Red Hat Enterprise Linux AI'
  1. Red Hat Enterprise Linux AI
  2. RHELAI-2417

Address jemalloc "cannot allocate memory in static TLS block" without LD_PRELOAD

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Major Major
    • rhelai-1.4
    • None
    • Wheel building
    • False
    • Hide

      None

      Show
      None
    • False

      Goal: 

      The instructlab app containers have this block to work around a problem with PyArrow and jemalloc:

      # ImportError: /usr/lib64/libjemalloc.so.2: cannot allocate memory in static TLS block
      #
      # The recommendation is to build jemalloc with the --disable-initial-exec-tls option
      # A workaround is to preload jemalloc when invoking Python commands
      ENV LD_PRELOAD=/usr/lib64/libjemalloc.so.2
      

       We need to find a more permanent solution that does not use LD_PRELOAD. Preloading is a short-term workaround but not a long-term solution. Amongst others Intel recommends tcmalloc for Gaudi. For RHELAI 1.3 we have to force jemalloc.

      See https://github.com/jemalloc/jemalloc/issues/937 for upstream bug report.

      Acceptance Criteria:

      InstructLab and other consumers of PyArrow work without LD_PRELOAD env var.

      Possible solutions:

      • build PyArrow without jemalloc bindings
      • rebuild jemalloc with option --disable-initial-exec-tls

      Both options have pros and cons.

              Unassigned Unassigned
              cheimes@redhat.com Christian Heimes
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: