Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-41988

tlm install_sanitizer_library() finds wrong version of TSan under clang

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.0.0
    • Cheshire-Cat
    • build
    • None
    • Untriaged
    • 1
    • Unknown

    Description

      The tlm CMake function install_sanitizer_library() locates the wrong version of the TSan runtime library when building with Clang - instead of finding the GCC 7.3 library, it finds the original Ubuntu 16.04 GCC 5 one:

      -- Found TSan at: /usr/lib/x86_64-linux-gnu/libtsan.so.0 installing to: /home/couchbase/couchbase/install/lib
      

      The new GCC 7.3.0 library is located in /usr/local/lib64.

      This issue is highlighted when compiling EE with Clang-9 and TSan as a shared library, as the following runtime linker error is seen with the audit_generator when it attempts to generate the audit event definitions:

      $ ../../auditevent_generator -r /home/couchbase/couchbase -b /home/couchbase/couchbase/build -o /home/couchbase/couchbase/build/kv_engine/auditd/audit_events.json -i /home/couchbase/couchbase/kv_engine/auditd/etc/module_descriptors.json
      ../../auditevent_generator: symbol lookup error: ../../auditevent_generator: undefined symbol: __tsan_unaligned_read16
      

      The symbol __tsan_unaligned_read16 is not present in the older GCC5 libtsan.so, only the newer GCC 7.3.0 one:

      $ nm -D /usr/lib/x86_64-linux-gnu/libtsan.so.0|grep __tsan_unaligned_read16
      <EOF>
      $ nm -D /usr/local/lib64/libtsan.so.0|grep __tsan_unaligned_read16
      0000000000065350 T __tsan_unaligned_read16
      

      Attachments

        Issue Links

          For Gerrit Dashboard: MB-41988
          # Subject Branch Project Status CR V

          Activity

            People

              drigby Dave Rigby (Inactive)
              drigby Dave Rigby (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty