Skip to content

Commit

Permalink
IMPALA-5902: add ThreadSanitizer build
Browse files Browse the repository at this point in the history
This is sufficient to get Impala to come up and run queries with
thread sanitizer enabled.

I have not triaged or fixed the data races that are reported, that
is left for follow-on work.

Change-Id: I22f8faeefa5e157279c5973fe28bc573b7606d50
Reviewed-on: http://gerrit.cloudera.org:8080/7977
Reviewed-by: Tim Armstrong <[email protected]>
Tested-by: Impala Public Jenkins
  • Loading branch information
timarmstrong authored and jenkins committed Sep 7, 2017
1 parent 512a94c commit b794a25
Show file tree
Hide file tree
Showing 20 changed files with 105 additions and 52 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ find_package(LlvmBinaries REQUIRED)
if ("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG"
OR "${CMAKE_BUILD_TYPE}" STREQUAL "ADDRESS_SANITIZER"
OR "${CMAKE_BUILD_TYPE}" STREQUAL "TIDY"
OR "${CMAKE_BUILD_TYPE}" STREQUAL "UBSAN")
OR "${CMAKE_BUILD_TYPE}" STREQUAL "UBSAN"
OR "${CMAKE_BUILD_TYPE}" STREQUAL "TSAN")
# Use the LLVM libaries with assertions for debug builds.
set(LLVM_ROOT ${LLVM_DEBUG_ROOT})
endif()
Expand Down
16 changes: 13 additions & 3 deletions be/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ SET(CXX_FLAGS_UBSAN "${CXX_FLAGS_UBSAN} -fno-wrapv")
# To ease debugging, turn off all optimizations:
SET(CXX_FLAGS_UBSAN "${CXX_FLAGS_UBSAN} -O0")

# Set the flags to the thread sanitizer, also known as "tsan"
# Turn on sanitizer and debug symbols to get stack traces:
SET(CXX_FLAGS_TSAN "${CXX_CLANG_FLAGS} -O1 -ggdb3 -fno-omit-frame-pointer")
SET(CXX_FLAGS_TSAN "${CXX_FLAGS_TSAN} -fsanitize=thread -DTHREAD_SANITIZER")

SET(CXX_FLAGS_TIDY "${CXX_CLANG_FLAGS}")
# Catching unused variables requires an optimization level greater than 0
SET(CXX_FLAGS_TIDY "${CXX_FLAGS_TIDY} -O1")
Expand All @@ -136,6 +141,8 @@ elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "TIDY")
SET(CMAKE_CXX_FLAGS "${CXX_FLAGS_TIDY}")
elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "UBSAN")
SET(CMAKE_CXX_FLAGS "${CXX_FLAGS_UBSAN}")
elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "TSAN")
SET(CMAKE_CXX_FLAGS "${CXX_FLAGS_TSAN}")
else()
message(FATAL_ERROR "Unknown build type: ${CMAKE_BUILD_TYPE}")
endif()
Expand All @@ -159,7 +166,8 @@ if (CCACHE AND NOT DEFINED ENV{DISABLE_CCACHE})
set(RULE_LAUNCH_PREFIX ccache)
if ("${CMAKE_BUILD_TYPE}" STREQUAL "ADDRESS_SANITIZER"
OR "${CMAKE_BUILD_TYPE}" STREQUAL "TIDY"
OR "${CMAKE_BUILD_TYPE}" STREQUAL "UBSAN")
OR "${CMAKE_BUILD_TYPE}" STREQUAL "UBSAN"
OR "${CMAKE_BUILD_TYPE}" STREQUAL "TSAN")
# Need to set CCACHE_CPP so that ccache calls clang with the original source file for
# both preprocessing and compilation. Otherwise, ccache will use clang to preprocess
# the file and then call clang with the preprocessed output if not cached. However,
Expand Down Expand Up @@ -294,7 +302,8 @@ add_definitions(-fPIC)
# set compile output directory
if ("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG" OR
"${CMAKE_BUILD_TYPE}" STREQUAL "ADDRESS_SANITIZER" OR
"${CMAKE_BUILD_TYPE}" STREQUAL "UBSAN")
"${CMAKE_BUILD_TYPE}" STREQUAL "UBSAN" OR
"${CMAKE_BUILD_TYPE}" STREQUAL "TSAN")
set(BUILD_OUTPUT_ROOT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/build/debug/")
else()
set(BUILD_OUTPUT_ROOT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/build/release/")
Expand Down Expand Up @@ -436,7 +445,8 @@ set (IMPALA_LINK_LIBS ${IMPALA_LINK_LIBS}
# sanitizer build. Address sanitizer is incompatible with tcmalloc (they both intercept
# malloc/free)
set (IMPALA_LINK_LIBS_NO_TCMALLOC ${IMPALA_LINK_LIBS})
if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "ADDRESS_SANITIZER")
if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "ADDRESS_SANITIZER" AND
NOT "${CMAKE_BUILD_TYPE}" STREQUAL "TSAN")
set (IMPALA_LINK_LIBS ${IMPALA_LINK_LIBS} tcmallocstatic)
endif()

Expand Down
18 changes: 9 additions & 9 deletions be/src/common/init.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,15 @@ static scoped_ptr<impala::Thread> pause_monitor;
BufferPool* buffer_pool = env->buffer_pool();
if (buffer_pool != nullptr) buffer_pool->Maintenance();

#ifndef ADDRESS_SANITIZER
// When using tcmalloc, the process limit as measured by our trackers will
// be out of sync with the process usage. The metric is refreshed whenever
// memory is consumed or released via a MemTracker, so on a system with
// queries executing it will be refreshed frequently. However if the system
// is idle, we need to refresh the tracker occasionally since untracked
// memory may be allocated or freed, e.g. by background threads.
// The process limit as measured by our trackers may get out of sync with the
// process usage if memory is allocated or freed without updating a MemTracker.
// The metric is refreshed whenever memory is consumed or released via a MemTracker,
// so on a system with queries executing it will be refreshed frequently. However
// if the system is idle, we need to refresh the tracker occasionally since
// untracked memory may be allocated or freed, e.g. by background threads.
if (env->process_mem_tracker() != nullptr) {
env->process_mem_tracker()->RefreshConsumptionFromMetric();
}
#endif
}
// Periodically refresh values of the aggregate memory metrics to ensure they are
// somewhat up-to-date.
Expand Down Expand Up @@ -198,7 +196,9 @@ void impala::InitCommonRuntime(int argc, char** argv, bool init_jvm,
impala::InitGoogleLoggingSafe(argv[0]);
// Breakpad needs flags and logging to initialize.
ABORT_IF_ERROR(RegisterMinidump(argv[0]));
#ifndef THREAD_SANITIZER
AtomicOps_x86CPUFeaturesInit();
#endif
impala::InitThreading();
impala::TimestampParser::Init();
impala::SeedOpenSSLRNG();
Expand Down Expand Up @@ -243,7 +243,7 @@ void impala::InitCommonRuntime(int argc, char** argv, bool init_jvm,

if (impala::KuduIsAvailable()) impala::InitKuduLogging();

#ifndef ADDRESS_SANITIZER
#if !defined(ADDRESS_SANITIZER) && !defined(THREAD_SANITIZER)
// tcmalloc and address sanitizer can not be used together
if (FLAGS_enable_process_lifetime_heap_profiling) {
HeapProfilerStart(FLAGS_heap_profile_dir.c_str());
Expand Down
18 changes: 18 additions & 0 deletions be/src/gutil/atomicops-internals-tsan.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,24 @@ inline Atomic64 Release_CompareAndSwap(volatile Atomic64 *ptr,
return cmp;
}

inline Atomic32 Barrier_CompareAndSwap(volatile Atomic32 *ptr,
Atomic32 old_value,
Atomic32 new_value) {
Atomic32 cmp = old_value;
__tsan_atomic32_compare_exchange_strong(ptr, &cmp, new_value,
__tsan_memory_order_acq_rel, __tsan_memory_order_relaxed);
return cmp;
}

inline Atomic64 Barrier_CompareAndSwap(volatile Atomic64 *ptr,
Atomic64 old_value,
Atomic64 new_value) {
Atomic64 cmp = old_value;
__tsan_atomic64_compare_exchange_strong(ptr, &cmp, new_value,
__tsan_memory_order_acq_rel, __tsan_memory_order_relaxed);
return cmp;
}

inline void MemoryBarrier() {
__tsan_atomic_thread_fence(__tsan_memory_order_seq_cst);
}
Expand Down
2 changes: 1 addition & 1 deletion be/src/runtime/bufferpool/system-allocator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static int64_t HUGE_PAGE_SIZE = 2LL * 1024 * 1024;
SystemAllocator::SystemAllocator(int64_t min_buffer_len)
: min_buffer_len_(min_buffer_len) {
DCHECK(BitUtil::IsPowerOf2(min_buffer_len));
#ifndef ADDRESS_SANITIZER
#if !defined(ADDRESS_SANITIZER) && !defined(THREAD_SANITIZER)
// Free() assumes that aggressive decommit is enabled for TCMalloc.
size_t aggressive_decommit_enabled;
MallocExtension::instance()->GetNumericProperty(
Expand Down
2 changes: 1 addition & 1 deletion be/src/runtime/exec-env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ Status ExecEnv::StartServices() {
BufferPoolMetric::UNUSED_RESERVATION_BYTES));
obj_pool_->Add(new MemTracker(negated_unused_reservation, -1,
"Buffer Pool: Unused Reservation", mem_tracker_.get()));
#ifndef ADDRESS_SANITIZER
#if !defined(ADDRESS_SANITIZER) && !defined(THREAD_SANITIZER)
// Aggressive decommit is required so that unused pages in the TCMalloc page heap are
// not backed by physical pages and do not contribute towards memory consumption.
size_t aggressive_decommit_enabled = 0;
Expand Down
4 changes: 2 additions & 2 deletions be/src/runtime/query-exec-mgr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ QueryState* QueryExecMgr::GetOrCreateQueryState(
void QueryExecMgr::StartQueryHelper(QueryState* qs) {
qs->StartFInstances();

#ifndef ADDRESS_SANITIZER
// tcmalloc and address sanitizer cannot be used together
#if !defined(ADDRESS_SANITIZER) && !defined(THREAD_SANITIZER)
// tcmalloc and address or thread sanitizer cannot be used together
if (FLAGS_log_mem_usage_interval > 0) {
uint64_t num_complete = ImpaladMetrics::IMPALA_SERVER_NUM_FRAGMENTS->value();
if (num_complete % FLAGS_log_mem_usage_interval == 0) {
Expand Down
6 changes: 3 additions & 3 deletions be/src/util/default-path-handlers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ void MemUsageHandler(MemTracker* mem_tracker, MetricGroup* metric_group,
document->AddMember("consumption", consumption, document->GetAllocator());

stringstream ss;
#ifdef ADDRESS_SANITIZER
ss << "Memory tracking is not available with address sanitizer builds.";
#if defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER)
ss << "Memory tracking is not available with address or thread sanitizer builds.";
#else
char buf[2048];
MallocExtension::instance()->GetStats(buf, 2048);
Expand Down Expand Up @@ -238,7 +238,7 @@ void AddDefaultUrlCallbacks(
webserver->RegisterUrlCallback("/memz", "memz.tmpl", callback);
}

#ifndef ADDRESS_SANITIZER
#if !defined(ADDRESS_SANITIZER) && !defined(THREAD_SANITIZER)
// Remote (on-demand) profiling is disabled if the process is already being profiled.
if (!FLAGS_enable_process_lifetime_heap_profiling) {
AddPprofUrlCallbacks(webserver);
Expand Down
10 changes: 5 additions & 5 deletions be/src/util/memory-metrics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ TcmallocMetric* TcmallocMetric::TOTAL_BYTES_RESERVED = nullptr;
TcmallocMetric* TcmallocMetric::PAGEHEAP_UNMAPPED_BYTES = nullptr;
TcmallocMetric::PhysicalBytesMetric* TcmallocMetric::PHYSICAL_BYTES_RESERVED = nullptr;

AsanMallocMetric* AsanMallocMetric::BYTES_ALLOCATED = nullptr;
SanitizerMallocMetric* SanitizerMallocMetric::BYTES_ALLOCATED = nullptr;

BufferPoolMetric* BufferPoolMetric::LIMIT = nullptr;
BufferPoolMetric* BufferPoolMetric::SYSTEM_ALLOCATED = nullptr;
Expand Down Expand Up @@ -81,10 +81,10 @@ Status impala::RegisterMemoryMetrics(MetricGroup* metrics, bool register_jvm_met
used_metrics.push_back(BufferPoolMetric::SYSTEM_ALLOCATED);
}

#ifdef ADDRESS_SANITIZER
AsanMallocMetric::BYTES_ALLOCATED = metrics->RegisterMetric(
new AsanMallocMetric(MetricDefs::Get("asan-total-bytes-allocated")));
used_metrics.push_back(AsanMallocMetric::BYTES_ALLOCATED);
#if defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER)
SanitizerMallocMetric::BYTES_ALLOCATED = metrics->RegisterMetric(
new SanitizerMallocMetric(MetricDefs::Get("sanitizer-total-bytes-allocated")));
used_metrics.push_back(SanitizerMallocMetric::BYTES_ALLOCATED);
#else
MetricGroup* tcmalloc_metrics = metrics->GetOrCreateChildGroup("tcmalloc");
// We rely on TCMalloc for our global memory metrics, so skip setting them up
Expand Down
16 changes: 8 additions & 8 deletions be/src/util/memory-metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <boost/bind.hpp>
#include <boost/thread/mutex.hpp>
#include <gperftools/malloc_extension.h>
#ifdef ADDRESS_SANITIZER
#if defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER)
#include <sanitizer/allocator_interface.h>
#endif

Expand Down Expand Up @@ -125,23 +125,23 @@ class TcmallocMetric : public IntGauge {
: IntGauge(def, 0), tcmalloc_var_(tcmalloc_var) { }

virtual void CalculateValue() {
#ifndef ADDRESS_SANITIZER
#if !defined(ADDRESS_SANITIZER) && !defined(THREAD_SANITIZER)
DCHECK_EQ(sizeof(size_t), sizeof(value_));
MallocExtension::instance()->GetNumericProperty(tcmalloc_var_.c_str(),
reinterpret_cast<size_t*>(&value_));
#endif
}
};

/// Alternative to TCMallocMetric if we're running under Address Sanitizer, which
/// does not provide the same metrics.
class AsanMallocMetric : public IntGauge {
/// Alternative to TCMallocMetric if we're running under a sanitizer that replaces
/// malloc(), e.g. address or thread sanitizer.
class SanitizerMallocMetric : public IntGauge {
public:
AsanMallocMetric(const TMetricDef& def) : IntGauge(def, 0) {}
static AsanMallocMetric* BYTES_ALLOCATED;
SanitizerMallocMetric(const TMetricDef& def) : IntGauge(def, 0) {}
static SanitizerMallocMetric* BYTES_ALLOCATED;
private:
virtual void CalculateValue() override {
#ifdef ADDRESS_SANITIZER
#if defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER)
value_ = __sanitizer_get_current_allocated_bytes();
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion be/src/util/metrics-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ TEST_F(MetricsTest, StatsMetricsSingle) {
}

TEST_F(MetricsTest, MemMetric) {
#ifndef ADDRESS_SANITIZER
#if !defined(ADDRESS_SANITIZER) && !defined(THREAD_SANITIZER)
MetricGroup metrics("MemMetrics");
ASSERT_OK(RegisterMemoryMetrics(&metrics, false, nullptr, nullptr));
// Smoke test to confirm that tcmalloc metrics are returning reasonable values.
Expand Down
12 changes: 6 additions & 6 deletions be/src/util/pprof-path-handlers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ void PprofCmdLineHandler(const Webserver::ArgumentMap& args, stringstream* outpu
// by calling HeapProfileStart(filename), continue to do work, and then, some number of
// seconds later, call GetHeapProfile() followed by HeapProfilerStop().
void PprofHeapHandler(const Webserver::ArgumentMap& args, stringstream* output) {
#ifdef ADDRESS_SANITIZER
#if defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER)
(void)PPROF_DEFAULT_SAMPLE_SECS; // Avoid unused variable warning.
(*output) << "Heap profiling is not available with address sanitizer builds.";
(*output) << "Heap profiling is not available with address/thread sanitizer builds.";
#else
Webserver::ArgumentMap::const_iterator it = args.find("seconds");
int seconds = PPROF_DEFAULT_SAMPLE_SECS;
Expand All @@ -78,8 +78,8 @@ void PprofHeapHandler(const Webserver::ArgumentMap& args, stringstream* output)
// The server should respond by calling ProfilerStart(), continuing to do its work,
// and then, XX seconds later, calling ProfilerStop().
void PprofCpuProfileHandler(const Webserver::ArgumentMap& args, stringstream* output) {
#ifdef ADDRESS_SANITIZER
(*output) << "CPU profiling is not available with address sanitizer builds.";
#if defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER)
(*output) << "CPU profiling is not available with address/thread sanitizer builds.";
#else
Webserver::ArgumentMap::const_iterator it = args.find("seconds");
int seconds = PPROF_DEFAULT_SAMPLE_SECS;
Expand All @@ -106,8 +106,8 @@ void PprofCpuProfileHandler(const Webserver::ArgumentMap& args, stringstream* ou
// The server should respond by calling:
// MallocExtension::instance()->GetHeapGrowthStacks(&output);
void PprofGrowthHandler(const Webserver::ArgumentMap& args, stringstream* output) {
#ifdef ADDRESS_SANITIZER
(*output) << "Growth profiling is not available with address sanitizer builds.";
#if defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER)
(*output) << "Growth profiling is not available with address/thread sanitizer builds.";
#else
string heap_growth_stack;
MallocExtension::instance()->GetHeapGrowthStacks(&heap_growth_stack);
Expand Down
3 changes: 2 additions & 1 deletion bin/make_impala.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ then

if [[ ("$TARGET_BUILD_TYPE" == "ADDRESS_SANITIZER") \
|| ("$TARGET_BUILD_TYPE" == "TIDY") \
|| ("$TARGET_BUILD_TYPE" == "UBSAN") ]]
|| ("$TARGET_BUILD_TYPE" == "UBSAN") \
|| ("$TARGET_BUILD_TYPE" == "TSAN") ]]
then
CMAKE_ARGS+=(-DCMAKE_TOOLCHAIN_FILE=$IMPALA_HOME/cmake_modules/clang_toolchain.cmake)
else
Expand Down
1 change: 1 addition & 0 deletions bin/run-backend-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ export CTEST_OUTPUT_ON_FAILURE=1
export ASAN_OPTIONS="handle_segv=0 detect_leaks=0 allocator_may_return_null=1"
export UBSAN_OPTIONS="print_stacktrace=1"
UBSAN_OPTIONS="${UBSAN_OPTIONS} suppressions=${IMPALA_HOME}/bin/ubsan-suppressions.txt"
export TSAN_OPTIONS="halt_on_error=1 history_size=7"
export PATH="${IMPALA_TOOLCHAIN}/llvm-${IMPALA_LLVM_VERSION}/bin:${PATH}"
"${MAKE_CMD:-make}" test ARGS="${BE_TEST_ARGS}"
1 change: 1 addition & 0 deletions bin/start-catalogd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,6 @@ fi
export ASAN_OPTIONS="handle_segv=0 detect_leaks=0 allocator_may_return_null=1"
export UBSAN_OPTIONS="print_stacktrace=1"
UBSAN_OPTIONS="${UBSAN_OPTIONS} suppressions=${IMPALA_HOME}/bin/ubsan-suppressions.txt"
export TSAN_OPTIONS="halt_on_error=0 history_size=7"
export PATH="${IMPALA_TOOLCHAIN}/llvm-${IMPALA_LLVM_VERSION}/bin:${PATH}"
exec ${BINARY_BASE_DIR}/${BUILD_TYPE}/catalog/catalogd ${CATALOGD_ARGS}
1 change: 1 addition & 0 deletions bin/start-impalad.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,6 @@ fi
export ASAN_OPTIONS="handle_segv=0 detect_leaks=0 allocator_may_return_null=1"
export UBSAN_OPTIONS="print_stacktrace=1"
UBSAN_OPTIONS="${UBSAN_OPTIONS} suppressions=${IMPALA_HOME}/bin/ubsan-suppressions.txt"
export TSAN_OPTIONS="halt_on_error=0 history_size=7"
export PATH="${IMPALA_TOOLCHAIN}/llvm-${IMPALA_LLVM_VERSION}/bin:${PATH}"
exec ${TOOL_PREFIX} ${IMPALA_CMD} ${IMPALAD_ARGS}
1 change: 1 addition & 0 deletions bin/start-statestored.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,6 @@ fi
export ASAN_OPTIONS="handle_segv=0 detect_leaks=0 allocator_may_return_null=1"
export UBSAN_OPTIONS="print_stacktrace=1"
UBSAN_OPTIONS="${UBSAN_OPTIONS} suppressions=${IMPALA_HOME}/bin/ubsan-suppressions.txt"
export TSAN_OPTIONS="halt_on_error=0 history_size=7"
export PATH="${IMPALA_TOOLCHAIN}/llvm-${IMPALA_LLVM_VERSION}/bin:${PATH}"
exec ${BINARY_BASE_DIR}/${BUILD_TYPE}/statestore/statestored ${STATESTORED_ARGS}
7 changes: 7 additions & 0 deletions buildall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ BUILD_ASAN=0
BUILD_FE_ONLY=0
BUILD_TIDY=0
BUILD_UBSAN=0
BUILD_TSAN=0
# Export MAKE_CMD so it is visible in scripts that invoke make, e.g. copy-udfs-udas.sh
export MAKE_CMD=make
LZO_CMAKE_ARGS=
Expand Down Expand Up @@ -118,6 +119,9 @@ do
-ubsan)
BUILD_UBSAN=1
;;
-tsan)
BUILD_TSAN=1
;;
-testpairwise)
EXPLORATION_STRATEGY=pairwise
;;
Expand Down Expand Up @@ -268,6 +272,9 @@ fi
if [[ ${BUILD_UBSAN} -eq 1 ]]; then
CMAKE_BUILD_TYPE=UBSAN
fi
if [[ ${BUILD_TSAN} -eq 1 ]]; then
CMAKE_BUILD_TYPE=TSAN
fi

MAKE_IMPALA_ARGS+=" -build_type=${CMAKE_BUILD_TYPE}"

Expand Down
6 changes: 3 additions & 3 deletions common/thrift/metrics.json
Original file line number Diff line number Diff line change
Expand Up @@ -1114,16 +1114,16 @@
"key": "tcmalloc.total-bytes-reserved"
},
{
"description": "Bytes allocated from Address Sanitizer's malloc (Address Sanitizer debug builds only)",
"description": "Bytes allocated from the sanitizer malloc (Sanitizer debug builds only)",
"contexts": [
"STATESTORE",
"CATALOGSERVER",
"IMPALAD"
],
"label": "Address Sanitizer Malloc Bytes Allocated",
"label": "Sanitizer Malloc Bytes Allocated",
"units": "BYTES",
"kind": "GAUGE",
"key": "asan-total-bytes-allocated"
"key": "sanitizer-total-bytes-allocated"
},
{
"description": "Maximum allowed bytes allocated by the buffer pool.",
Expand Down
Loading

0 comments on commit b794a25

Please sign in to comment.