Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-53952

Building with ninja + ASan poisons the build/install/ directory

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9.0
    • Component/s: Build
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Dev Platform 2021-02-08, Dev Platform 2021-02-22, Dev Platform 2021-03-08, Dev Platform 2021-03-22, Dev Platform 2021-04-05

      Description

      I use the following two SCons invocations to generate ninja files.

      python ./buildscripts/scons.py --modules= --dbg=off --opt=on --link-model=dynamic --variables-files=./etc/scons/mongodbtoolchain_stable_gcc.vars --ninja generate-ninja ICECC=icecc CCACHE=ccache
      python ./buildscripts/scons.py --modules= --dbg=on --opt=on --link-model=dynamic --variables-files=./etc/scons/mongodbtoolchain_stable_clang.vars --ninja generate-ninja ICECC=icecc CCACHE=ccache --sanitize=address --allocator=system NINJA_PREFIX=asan VARIANT_DIR=asandebug
      

      I find that I must delete the contents of the build/install/ directory when switching from an ASan build to a non-ASan build.

      $ rm -rf build/install/*
      $ ninja -f build.ninja -j 200 build/install/bin/wt
      [21/21 (100%) 0.033s] Install build/install/bin/wt
      $ ninja -f asan.ninja -j 200 build/install/bin/wt
      [14/14 (100%) 0.081s] Install build/install/bin/wt
      $ ninja -f build.ninja -j 200 build/install/bin/wt
      [10/10 (100%) 0.055s] Install build/install/bin/wt
      $ ./build/install/bin/wt
      ./build/install/bin/wt: symbol lookup error: /home/ubuntu/mongo/build/install/bin/../lib/libshim_allocator.so: undefined symbol: __asan_init
      

      (Using the wt tool as an example here because it compiles quickly.)

        Attachments

          Activity

            People

            Assignee:
            daniel.moody Daniel Moody
            Reporter:
            max.hirschhorn Max Hirschhorn
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: