Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-8230

Fix tcmalloc library path in elf file when tcmalloc is enabled in evergreen

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Storage - Ra 2021-11-15

      Description

      As follow-on work from WT-7885, we have recently enabled tcmalloc in our evergreen testing. This required a local tcmalloc library to be built per machine. On a local development machine, we would need to export LD_LIBRARY_PATH to the path of the local tcmalloc library once before compiling wiredtiger binaries. However evergreen works a little differently. Evergreen copies over wiredtiger binaries into different machines, and starts to perform testing on them. The problem appears because we export the LD_LIBRARY_PATH to the local tcmalloc library in a different machine we are testing on. Because the path of the tcmalloc library installed is now different on another machine, can't find the location of the library. Therefore this forced us to update each variant's LD_LIBRARY_PATH to the location of the built tcmalloc when running each test.

      This ticket aims to remove the repetitive setting of LD_LIBRARY_PATH environment variable, through manually patching the wiredtiger libraries (elf files) post compilation. The idea is to patch the tcmalloc path within the wiredtiger libraries into a relative path. Both patchelf and install_name_tool --change (darwin machines) commands can be used for this purpose.

      Note: patchelf is not installed in the evergreen machines, and will need to consult build team to install the command.

        Attachments

          Activity

            People

            Assignee:
            backlog-server-storage-engines Backlog - Storage Engines Team
            Reporter:
            jie.chen Jie Chen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: