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

Add a RocksDB+ASan build variant to Evergreen

      Was suggested by acm in SERVER-23925. I attempted to run a builder with the following definition, but ran into linker errors.

      Unable to find source-code formatter for language: diff. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      diff --git a/etc/evergreen.yml b/etc/evergreen.yml
      index 45ff93f..bdc76d8 100644
      --- a/etc/evergreen.yml
      +++ b/etc/evergreen.yml
      @@ -224,7 +224,7 @@ functions:
               rm -rf rocksdb
               git clone https://github.com/facebook/rocksdb.git
               cd rocksdb
      -        make CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++ static_lib
      +        make ${compile_flags_rocksdb} static_lib
               fi
       
         "build new tools" :
      @@ -5832,7 +5832,8 @@ buildvariants:
         - name: tool
         - name: unittests
       
      -- name: ubuntu1404-rocksdb
      +- &rocksdb_variant
      +  name: ubuntu1404-rocksdb
         display_name: Ubuntu 14.04 (RocksDB)
         modules:
         - rocksdb
      @@ -5841,6 +5842,7 @@ buildvariants:
         batchtime: 1440 # 1 day
         expansions:
           build_rocksdb: true
      +    compile_flags_rocksdb: CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++
           compile_flags: -j$(grep -c ^processor /proc/cpuinfo) --dbg=off --opt=on CPPPATH=$(readlink -f ../rocksdb/include/) LIBPATH=$(readlink -f ../rocksdb/) LIBS=rocksdb CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++ VARIANT_DIR=release
           num_jobs_available: $(grep -c ^processor /proc/cpuinfo)
           test_flags: --storageEngine=rocksdb
      @@ -6021,6 +6023,20 @@ buildvariants:
         - name: tool_WT
         - name: unittests
       
      +- <<: *rocksdb_variant
      +  name: ubuntu1410-rocksdb-asan
      +  display_name: ~ ASAN Ubuntu 14.10 (RocksDB)
      +  run_on:
      +  - ubuntu1410-build
      +  expansions:
      +    build_rocksdb: true
      +    compile_flags_rocksdb: COMPILE_WITH_ASAN=1 CC=/usr/bin/clang CXX=/usr/bin/clang++
      +    san_symbolizer: ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-3.5
      +    san_options: LSAN_OPTIONS="suppressions=etc/lsan.suppressions" ASAN_OPTIONS=detect_leaks=1
      +    compile_flags: CPPPATH=$(readlink -f ../rocksdb/include/) LIBPATH=$(readlink -f ../rocksdb/) LIBS=rocksdb CC=/usr/bin/clang CXX=/usr/bin/clang++ --opt=on --allocator=system --sanitize=address --ssl --libc++ -j$(grep -c ^processor /proc/cpuinfo) --nostrip VARIANT_DIR=build
      +    num_jobs_available: $(grep -c ^processor /proc/cpuinfo)
      +    test_flags: --storageEngine=rocksdb -j1 # Avoid starting too many mongod's under ASAN build.
      +
       - name: ubuntu1410-asan
         display_name: ~ ASAN SSL Ubuntu 14.10
         run_on:
      
      Patch to apply to mongodb-partners/mongo-rocks

      The ASSERT*() macros require that the arguments are ostream-able. It isn't clear why this only fails when compiling with clang and not gcc.

      Unable to find source-code formatter for language: diff. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      diff --git a/src/rocks_record_store_test.cpp b/src/rocks_record_store_test.cpp
      index a90ada2..ac19191 100644
      --- a/src/rocks_record_store_test.cpp
      +++ b/src/rocks_record_store_test.cpp
      @@ -29,6 +29,7 @@
       #include "mongo/platform/basic.h"
       
       #include <boost/filesystem/operations.hpp>
      +#include <boost/optional/optional_io.hpp>
       #include <memory>
       #include <vector>
       
      

        1. compile_output.log
          4.88 MB
          Max Hirschhorn
        2. rocks_asan_evg.diff
          5 kB
          Alexander Gorrod

            Assignee:
            backlog-server-tig DO NOT USE - Backlog - Test Infrastructure Group (TIG)
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: