You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by to...@apache.org on 2016/02/04 00:27:48 UTC

[1/4] incubator-kudu git commit: docs: update build-from-source instructions for blessed build layout

Repository: incubator-kudu
Updated Branches:
  refs/heads/master b2d0ecbd6 -> bd4927265


docs: update build-from-source instructions for blessed build layout

I'm not convinced that this makes sense; in my opinion, installation.adoc
isn't intended for Kudu developers, but for people running on platforms for
which we lack prebuilt binaries. JD pointed out that the Java client build
muddies this somewhat, as it's reasonable to expect these people to want to
build the Java client, and by default maven will run unit tests, which will
fail unless they're using the blessed build layout (or pass -DbinDir).

Anyway, the blessed build layout doesn't actually hurt casual
build-from-source people; it's just more complexity.

I also removed the various mentions of openssl-devel as with the dlopen()
change to squeasel it's no longer necessary for building.

Change-Id: Ic482c084397d13a0fd9e0b3e710449bc5cd866c4
Reviewed-on: http://gerrit.cloudera.org:8080/1997
Tested-by: Kudu Jenkins
Reviewed-by: Jean-Daniel Cryans


Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/cf1acc6b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/cf1acc6b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/cf1acc6b

Branch: refs/heads/master
Commit: cf1acc6bee8352898a5a164790a26dd2dcc25071
Parents: b2d0ecb
Author: Adar Dembo <ad...@cloudera.com>
Authored: Tue Feb 2 14:22:04 2016 -0800
Committer: Adar Dembo <ad...@cloudera.com>
Committed: Wed Feb 3 08:30:45 2016 +0000

----------------------------------------------------------------------
 docs/installation.adoc | 83 ++++++++++++++++++++-------------------------
 1 file changed, 37 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/cf1acc6b/docs/installation.adoc
----------------------------------------------------------------------
diff --git a/docs/installation.adoc b/docs/installation.adoc
index b36abff..a695bcd 100644
--- a/docs/installation.adoc
+++ b/docs/installation.adoc
@@ -212,7 +212,7 @@ on a version older than 7.0, the Red Hat Developer Toolset must be installed
 +
 ----
 $ sudo yum install gcc gcc-c++ autoconf automake libtool \
-  boost-static boost-devel openssl-devel cyrus-sasl-devel \
+  boost-static boost-devel cyrus-sasl-devel \
   cyrus-sasl-plain patch pkgconfig make rsync vim-common gdb
 ----
 
@@ -254,12 +254,12 @@ except for the `kudu` directory itself.
 +
 [source,bash]
 ----
-mkdir -p build
-cd build
-../build-support/enable_devtoolset.sh \
-  ../thirdparty/installed/bin/cmake \
+mkdir -p build/release
+cd build/release
+../../build-support/enable_devtoolset.sh \
+  ../../thirdparty/installed/bin/cmake \
   -DCMAKE_BUILD_TYPE=release \
-  ..
+  ../..
 make -j4
 ----
 
@@ -290,7 +290,7 @@ automated deployment scenario. It skips the steps marked *Optional* above.
 #!/bin/bash
 
 sudo yum -y install gcc gcc-c++ autoconf automake libtool \
-  boost-static boost-devel openssl-devel cyrus-sasl-devel \
+  boost-static boost-devel cyrus-sasl-devel \
   cyrus-sasl-plain patch pkgconfig make rsync vim-common gdb
 DTLS_RPM=rhscl-devtoolset-3-epel-6-x86_64.noarch.rpm
 DTLS_RPM_URL=https://www.softwarecollections.org/en/scls/rhscl/devtoolset-3/epel-6-x86_64/download/${DTLS_RPM}
@@ -299,12 +299,12 @@ sudo yum install -y scl-utils ${DTLS_RPM}
 sudo yum install -y devtoolset-3-toolchain
 cd kudu
 build-support/enable_devtoolset.sh thirdparty/build-if-necessary.sh
-mkdir -p build
-cd build
-../build-support/enable_devtoolset.sh \
-  ../thirdparty/installed/bin/cmake \
+mkdir -p build/release
+cd build/release
+../../build-support/enable_devtoolset.sh \
+  ../../thirdparty/installed/bin/cmake \
   -DCMAKE_BUILD_TYPE=release \
-  ..
+  ../..
 make -j4
 ----
 ====
@@ -316,7 +316,7 @@ make -j4
 +
 ----
 $ sudo apt-get install git autoconf automake libboost-thread-dev \
-  libboost-system-dev curl gcc g++ libssl-dev libsasl2-dev libsasl2-modules \
+  libboost-system-dev curl gcc g++ libsasl2-dev libsasl2-modules \
   libtool ntp patch pkg-config make rsync unzip vim-common gdb python
 ----
 
@@ -347,9 +347,9 @@ except for the `kudu` directory itself.
 +
 [source,bash]
 ----
-mkdir -p build
-cd build
-../thirdparty/installed/bin/cmake -DCMAKE_BUILD_TYPE=release ..
+mkdir -p build/release
+cd build/release
+../../thirdparty/installed/bin/cmake -DCMAKE_BUILD_TYPE=release ../..
 make -j4
 ----
 
@@ -380,16 +380,16 @@ the steps marked *Optional* above.
 #!/bin/bash
 
 sudo apt-get -y install git autoconf automake libboost-thread-dev \
-  libboost-system-dev curl gcc g++ libssl-dev libsasl2-dev libsasl2-modules \
+  libboost-system-dev curl gcc g++ libsasl2-dev libsasl2-modules \
   libtool ntp patch pkg-config make rsync unzip vim-common gdb python
 git clone https://github.com/cloudera/kudu
 cd kudu
 thirdparty/build-if-necessary.sh
-mkdir -p build
-cd build
-../thirdparty/installed/bin/cmake \
+mkdir -p build/release
+cd build/release
+../../thirdparty/installed/bin/cmake \
   -DCMAKE_BUILD_TYPE=release \
-  ..
+  ../..
 make -j4
 ----
 ====
@@ -406,7 +406,7 @@ built alongside Kudu.
 +
 ----
 $ sudo zypper install autoconf automake curl cyrus-sasl-devel gcc gcc-c++ \
-  gdb git libtool make ntp openssl-devel patch pkg-config python rsync unzip vim
+  gdb git libtool make ntp patch pkg-config python rsync unzip vim
 ----
 
 . Install Boost.
@@ -442,12 +442,12 @@ except for the `kudu` directory itself.
 +
 [source,bash]
 ----
-mkdir -p build
-cd build
+mkdir -p build/release
+cd build/release
 BOOST_ROOT=../../boost_1_59_0 \
-  ../thirdparty/installed/bin/cmake \
+  ../../thirdparty/installed/bin/cmake \
   -DCMAKE_BUILD_TYPE=release \
-  ..
+  ../..
 make -j4
 ----
 
@@ -471,7 +471,7 @@ the steps marked *Optional* above.
 #!/bin/bash
 
 sudo zypper install autoconf automake curl cyrus-sasl-devel gcc gcc-c++ \
-  gdb git libtool make ntp openssl-devel patch pkg-config python rsync unzip vim
+  gdb git libtool make ntp patch pkg-config python rsync unzip vim
 wget https://downloads.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz
 tar xzf boost_1_59_0.tar.gz
 pushd boost_1_59_0
@@ -481,12 +481,12 @@ popd
 git clone https://github.com/cloudera/kudu
 cd kudu
 thirdparty/build-if-necessary.sh
-mkdir -p build
-cd build
+mkdir -p build/release
+cd build/release
 BOOST_ROOT=../../boost_1_59_0 \
-  ../thirdparty/installed/bin/cmake \
+  ../../thirdparty/installed/bin/cmake \
   -DCMAKE_BUILD_TYPE=release \
-  ..
+  ../..
 make -j4
 ----
 ====
@@ -512,13 +512,6 @@ for more information.
 $ brew install autoconf automake cmake libtool pkg-config boost pstree
 ----
 
-. OS X 10.11 El Capitan only: install OpenSSL.
-+
-----
-$ brew install openssl
-$ brew link -f openssl
-----
-
 . Clone the Git repository and change to the new `kudu` directory.
 +
 [source,bash]
@@ -539,9 +532,9 @@ anywhere in your filesystem except for the `kudu` directory itself.
 +
 [source,bash]
 ----
-mkdir -p build
-cd build
-../thirdparty/installed/bin/cmake ..
+mkdir -p build/release
+cd build/release
+../../thirdparty/installed/bin/cmake -DCMAKE_BUILD_TYPE=release ../..
 make -j4
 ----
 
@@ -555,14 +548,12 @@ are installed.
 #!/bin/bash
 
 brew install autoconf automake cmake libtool pkg-config boost pstree
-brew install openssl
-brew link -f openssl
 git clone https://github.com/cloudera/kudu
 cd kudu
 thirdparty/build-if-necessary.sh
-mkdir -p build
-cd build
-../thirdparty/installed/bin/cmake ..
+mkdir -p build/release
+cd build/release
+../../thirdparty/installed/bin/cmake -DCMAKE_BUILD_TYPE=release ../..
 make -j4
 ----
 ====


[2/4] incubator-kudu git commit: KUDU-980 - Fix timestamp printing in c++

Posted by to...@apache.org.
KUDU-980 - Fix timestamp printing in c++

The current time printing function, from gutil, had two problems:
- It only printed down to seconds.
- If it was passed 0 seconds, as it might in tests at least, it would
  ignore the argument and return the current time.

This makes our time printing like Impala's (though with less precision).
Specifically this makes us print time in the format:
"YYYY-MM-DD HH:MM:SS.ssssss GMT"

Change-Id: I97eb088a4d0ef082ab9c7e3cca40e809b0f29934
Reviewed-on: http://gerrit.cloudera.org:8080/965
Tested-by: Kudu Jenkins
Reviewed-by: Dan Burkert <da...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/72d4b044
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/72d4b044
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/72d4b044

Branch: refs/heads/master
Commit: 72d4b04477583238c2e2a60dc7cc27ad619722b8
Parents: cf1acc6
Author: David Alves <da...@cloudera.com>
Authored: Tue Sep 22 00:45:26 2015 -0700
Committer: David Ribeiro Alves <da...@cloudera.com>
Committed: Wed Feb 3 19:35:48 2016 +0000

----------------------------------------------------------------------
 src/kudu/common/CMakeLists.txt |  1 +
 src/kudu/common/types-test.cc  | 64 +++++++++++++++++++++++++++++++++++++
 src/kudu/common/types.h        | 29 +++++++++++++----
 3 files changed, 87 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/72d4b044/src/kudu/common/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/kudu/common/CMakeLists.txt b/src/kudu/common/CMakeLists.txt
index 48520e8..7cf9495 100644
--- a/src/kudu/common/CMakeLists.txt
+++ b/src/kudu/common/CMakeLists.txt
@@ -88,4 +88,5 @@ ADD_KUDU_TEST(row_changelist-test)
 ADD_KUDU_TEST(row_key-util-test)
 ADD_KUDU_TEST(row_operations-test)
 ADD_KUDU_TEST(schema-test)
+ADD_KUDU_TEST(types-test)
 ADD_KUDU_TEST(wire_protocol-test)

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/72d4b044/src/kudu/common/types-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/common/types-test.cc b/src/kudu/common/types-test.cc
new file mode 100644
index 0000000..ed56606
--- /dev/null
+++ b/src/kudu/common/types-test.cc
@@ -0,0 +1,64 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include <gtest/gtest.h>
+
+#include "kudu/common/types.h"
+
+using std::string;
+
+namespace kudu {
+
+TEST(TestTypes, TestTimestampPrinting) {
+  const TypeInfo* info = GetTypeInfo(TIMESTAMP);
+
+  // Test the minimum value
+  int64 time;
+  info->CopyMinValue(&time);
+  string result;
+  info->AppendDebugStringForValue(&time, &result);
+  ASSERT_EQ("-290308-12-21 19:59:05.224192 GMT", result);
+  result = "";
+
+  // Test a regular negative timestamp.
+  time = -1454368523123456;
+  info->AppendDebugStringForValue(&time, &result);
+  ASSERT_EQ("1923-12-01 00:44:36.876544 GMT", result);
+  result = "";
+
+  // Test that passing 0 microseconds returns the correct time (0 msecs after the epoch).
+  // This is a test for a bug where printing a timestamp with the value 0 would return the
+  // current time instead.
+  time = 0;
+  info->AppendDebugStringForValue(&time, &result);
+  ASSERT_EQ("1970-01-01 00:00:00.000000 GMT", result);
+  result = "";
+
+  // Test a regular positive timestamp.
+  time = 1454368523123456;
+  info->AppendDebugStringForValue(&time, &result);
+  ASSERT_EQ("2016-02-01 23:15:23.123456 GMT", result);
+  result = "";
+
+  // Test the maximum value.
+  time = MathLimits<int64>::kMax;
+  info->AppendDebugStringForValue(&time, &result);
+  ASSERT_EQ("294247-01-10 04:00:54.775807 GMT", result);
+}
+
+
+} // namespace kudu

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/72d4b044/src/kudu/common/types.h
----------------------------------------------------------------------
diff --git a/src/kudu/common/types.h b/src/kudu/common/types.h
index cf65f6c..470a12b 100644
--- a/src/kudu/common/types.h
+++ b/src/kudu/common/types.h
@@ -22,7 +22,7 @@
 
 #include <stdint.h>
 #include <string>
-#include <string.h>
+
 #include "kudu/common/common.pb.h"
 #include "kudu/gutil/mathlimits.h"
 #include "kudu/gutil/strings/escaping.h"
@@ -345,19 +345,34 @@ struct DataTypeTraits<STRING> : public DerivedTypeTraits<BINARY>{
   }
 };
 
+static const char* kDateFormat = "%Y-%m-%d %H:%M:%S";
+static const char* kDateMicrosAndTzFormat = "%s.%06d GMT";
+
 template<>
 struct DataTypeTraits<TIMESTAMP> : public DerivedTypeTraits<INT64>{
+  static const int US_TO_S = 1000L * 1000L;
+
   static const char* name() {
     return "timestamp";
   }
 
   static void AppendDebugStringForValue(const void* val, string* str) {
-    // TODO KUDU-980 - This only stringifies down to seconds,
-    // we should also print the micros.
-    time_t time = *reinterpret_cast<const int64_t *>(val);
-    char time_as_string[kFastToBufferSize];
-    FastTimeToBuffer(time, &time_as_string[0]);
-    str->append(time_as_string);
+    int64_t timestamp_micros = *reinterpret_cast<const int64_t *>(val);
+    time_t secs_since_epoch = timestamp_micros / US_TO_S;
+    // If the time is negative we need to take into account that any microseconds
+    // will actually decrease the time in seconds by one.
+    int remaining_micros = timestamp_micros % US_TO_S;
+    if (remaining_micros < 0) {
+      secs_since_epoch--;
+      remaining_micros = US_TO_S - std::abs(remaining_micros);
+    }
+    struct tm tm_info;
+    gmtime_r(&secs_since_epoch, &tm_info);
+    char time_up_to_secs[24];
+    strftime(time_up_to_secs, sizeof(time_up_to_secs), kDateFormat, &tm_info);
+    char time[34];
+    snprintf(time, sizeof(time), kDateMicrosAndTzFormat, time_up_to_secs, remaining_micros);
+    str->append(time);
   }
 };
 


[4/4] incubator-kudu git commit: build: some coverage build fixes

Posted by to...@apache.org.
build: some coverage build fixes

There's only really one important fix here (the addition of SOURCE_ROOT);
the rest is stuff I noticed along the way. We don't need the removal of
gcda/gcno files as build-and-test.sh now blows away the entire build root
before running.

Various tests log the following:

  LLVM ERROR: Program used external function 'llvm_gcda_summary_info'
  which could not be resolved!

In some cases it's fatal, while in others (tests using external clusters)
it's benign. I suspect it's to do with codegen and coverage instrumentation.

Many tests also output lines like:

  profiling:/home/adar/Source/kudu/build/coverage/src/kudu/rpc/CMakeFiles/krpc.dir/connection.cc.gcda:Merge mismatch for function 0

I don't know what this means or what the effect is.

Finally, mt-tablet-test and full_stack-insert-scan-test deadlock in codegen.
I think this has to do with the external function errors above, as the stack
traces show some sort of error while LLVM tries to resolve external symbols:

  Thread 2 (Thread 0x7f8033bba700 (LWP 10131)):
  #0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  #1  0x0000000001b61a8a in kudu::ConditionVariable::Wait (this=0x5228200) at /home/adar/Source/kudu/src/kudu/util/condition_variable.cc:66
  #2  0x0000000001c6d040 in kudu::ThreadPool::Shutdown (this=0x5228160) at /home/adar/Source/kudu/src/kudu/util/threadpool.cc:151
  #3  0x0000000000ef13e7 in kudu::codegen::CompilationManager::Shutdown () at /home/adar/Source/kudu/src/kudu/codegen/compilation_manager.cc:145
  #4  0x00007f8040c0ed32 in __run_exit_handlers (status=1, listp=0x7f8040f99698 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true) at exit.c:82
  #5  0x00007f8040c0ed85 in __GI_exit (status=<optimized out>) at exit.c:104
  #6  0x0000000001885e30 in llvm::report_fatal_error(llvm::Twine const&, bool) ()
  #7  0x0000000000f60916 in llvm::RuntimeDyldImpl::resolveExternalSymbols() ()
  #8  0x0000000000f6459e in llvm::RuntimeDyldImpl::resolveRelocations() ()
  #9  0x0000000000f4b6f7 in llvm::MCJIT::finalizeLoadedModules() ()
  #10 0x0000000000f4bad6 in llvm::MCJIT::finalizeObject() ()
  #11 0x0000000000f114f2 in kudu::codegen::ModuleBuilder::Compile (this=0x7f8033bb9690, out=0x7f8033bb95f0) at /home/adar/Source/kudu/src/kudu/codegen/module_builder.cc:274
  #12 0x0000000000ef6bed in kudu::codegen::RowProjectorFunctions::Create (base_schema=..., projection=..., out=0x7f8033bb9950, tm=0x7f8033bb9768) at /home/adar/Source/kudu/src/kudu/codegen/row_projector.cc:294
  #13 0x0000000000f0a0f6 in kudu::codegen::CodeGenerator::CompileRowProjector (this=0x5266cf0, base=..., proj=..., out=0x7f8033bb9950) at /home/adar/Source/kudu/src/kudu/codegen/code_generator.cc:218
  #14 0x0000000000ef0370 in kudu::codegen::(anonymous namespace)::CompilationTask::RunWithStatus (this=0x5472000) at /home/adar/Source/kudu/src/kudu/codegen/compilation_manager.cc:103
  #15 0x0000000000eef9d1 in kudu::codegen::(anonymous namespace)::CompilationTask::Run (this=0x5472000) at /home/adar/Source/kudu/src/kudu/codegen/compilation_manager.cc:85
  #16 0x0000000001c6efa6 in kudu::ThreadPool::DispatchThread (this=0x5228160, permanent=false) at /home/adar/Source/kudu/src/kudu/util/threadpool.cc:316
  ...

  Thread 1 (Thread 0x7f8042269800 (LWP 10102)):
  #0  0x00007f8041c5c8ab in __waitpid (pid=26562, stat_loc=0x7fff53de97ec, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40
  #1  0x0000000001c4b6ef in kudu::Subprocess::DoWait (this=0x7fff53de9850, ret=0x7fff53de97ec, options=0) at /home/adar/Source/kudu/src/kudu/util/subprocess.cc:342
  #2  0x0000000001bcd39e in kudu::Subprocess::Wait (this=0x7fff53de9850, ret=0x7fff53de97ec) at /home/adar/Source/kudu/src/kudu/util/subprocess.h:75
  #3  0x0000000001bcca8f in kudu::PstackWatcher::RunStackDump (prog="gdb", argv=std::vector of length 12, capacity 16 = {...}) at /home/adar/Source/kudu/src/kudu/util/pstack_watcher.cc:177
  #4  0x0000000001bcbb24 in kudu::PstackWatcher::RunGdbStackDump (pid=10102, flags=0) at /home/adar/Source/kudu/src/kudu/util/pstack_watcher.cc:154
  #5  0x0000000001bcacaf in kudu::PstackWatcher::DumpPidStacks (pid=10102, flags=0) at /home/adar/Source/kudu/src/kudu/util/pstack_watcher.cc:114
  #6  0x0000000001bcabd6 in kudu::PstackWatcher::DumpStacks (flags=0) at /home/adar/Source/kudu/src/kudu/util/pstack_watcher.cc:107
  #7  0x0000000000d348b0 in KillTestOnTimeout (signum=14) at /home/adar/Source/kudu/src/kudu/util/test_main.cc:72
  #8  <signal handler called>
  #9  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  #10 0x0000000001b61a8a in kudu::ConditionVariable::Wait (this=0x52281c0) at /home/adar/Source/kudu/src/kudu/util/condition_variable.cc:66
  #11 0x0000000001c6e072 in kudu::ThreadPool::Wait (this=0x5228160) at /home/adar/Source/kudu/src/kudu/util/threadpool.cc:231
  #12 0x0000000000ef1379 in kudu::codegen::CompilationManager::Wait (this=0x5266cf0) at /home/adar/Source/kudu/src/kudu/codegen/compilation_manager.cc:141
  #13 0x0000000000ab5b30 in kudu::tablet::MultiThreadedTabletTest<kudu::tablet::StringKeyTestSetup>::SetUp (this=0x525f200) at /home/adar/Source/kudu/src/kudu/tablet/mt-tablet-test.cc:80

We've deadlocked the codegen thread pool because one its threads invokes the
atexit() handler, which calls back into the pool and waits on
a condition variable that only it can signal. It would be nice to at least
make this a fatal error rather than a deadlock (i.e. check in Shutdown()
that the caller isn't a thread belonging to the pool).

I've also reconfigured the job to handle the build directory changes. I'll
be monitoring it to see if it gets back on track.

Change-Id: Ief0bfc3fe55e4643be2338c8a54a852fc936a261
Reviewed-on: http://gerrit.cloudera.org:8080/2011
Tested-by: Adar Dembo <ad...@cloudera.com>
Reviewed-by: Todd Lipcon <to...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/bd492726
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/bd492726
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/bd492726

Branch: refs/heads/master
Commit: bd4927265e3e56722e5f2b9a41f6a3dc450c9b9b
Parents: affa0e4
Author: Adar Dembo <ad...@cloudera.com>
Authored: Tue Feb 2 20:30:58 2016 -0800
Committer: Todd Lipcon <to...@apache.org>
Committed: Wed Feb 3 23:02:38 2016 +0000

----------------------------------------------------------------------
 build-support/jenkins/build-and-test.sh | 4 +---
 src/kudu/client/CMakeLists.txt          | 9 ++++++---
 2 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/bd492726/build-support/jenkins/build-and-test.sh
----------------------------------------------------------------------
diff --git a/build-support/jenkins/build-and-test.sh b/build-support/jenkins/build-and-test.sh
index c31a9c2..837a91b 100755
--- a/build-support/jenkins/build-and-test.sh
+++ b/build-support/jenkins/build-and-test.sh
@@ -181,8 +181,6 @@ elif [ "$BUILD_TYPE" = "COVERAGE" ]; then
   DO_COVERAGE=1
   BUILD_TYPE=debug
   $SOURCE_ROOT/build-support/enable_devtoolset.sh "$THIRDPARTY_BIN/cmake -DKUDU_GENERATE_COVERAGE=1 $SOURCE_ROOT"
-  # Reset coverage info from previous runs
-  find src -name \*.gcda -o -name \*.gcno -exec rm {} \;
 elif [ "$BUILD_TYPE" = "LINT" ]; then
   # Create empty test logs or else Jenkins fails to archive artifacts, which
   # results in the build failing.
@@ -292,7 +290,7 @@ if [ "$DO_COVERAGE" == "1" ]; then
   echo
   echo Generating coverage report...
   echo ------------------------------------------------------------
-  if ! ./thirdparty/gcovr-3.0/scripts/gcovr -r $SOURCE_ROOT --xml \
+  if ! $SOURCE_ROOT/thirdparty/gcovr-3.0/scripts/gcovr -r $SOURCE_ROOT --xml \
       > $BUILD_ROOT/coverage.xml ; then
     EXIT_STATUS=1
     FAILURES="$FAILURES"$'Coverage report failed\n'

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/bd492726/src/kudu/client/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/kudu/client/CMakeLists.txt b/src/kudu/client/CMakeLists.txt
index e5533f4..4ebae41 100644
--- a/src/kudu/client/CMakeLists.txt
+++ b/src/kudu/client/CMakeLists.txt
@@ -220,9 +220,12 @@ target_link_libraries(kudu_client_test_util
 
 # Tests
 
-if (NOT APPLE)
-  # The OS X system compiler does not support source symbol maps, so the client
-  # leaks internal symbols globally.
+# The OS X system compiler does not support source symbol maps, so the client
+# leaks internal symbols globally.
+#
+# Coverage builds insert gcov-related symbols into the client library. We
+# don't ship such builds, so there's no point in checking symbol visibility.
+if (NOT APPLE AND NOT "${KUDU_GENERATE_COVERAGE}")
   ADD_KUDU_TEST(client_symbol-test.sh LABELS no_dist_test)
 endif()
 


[3/4] incubator-kudu git commit: build: remove tcmalloc heap checker

Posted by to...@apache.org.
build: remove tcmalloc heap checker

We don't use this anymore as all leak checking is now done via LSAN.

Change-Id: Ie90e2982f295ae5856a4ad2a9f935efe29ac77a8
Reviewed-on: http://gerrit.cloudera.org:8080/2010
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <to...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/affa0e4f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/affa0e4f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/affa0e4f

Branch: refs/heads/master
Commit: affa0e4fe764c6d247741f4df98c6f8c0925472b
Parents: 72d4b04
Author: Adar Dembo <ad...@cloudera.com>
Authored: Tue Feb 2 19:51:45 2016 -0800
Committer: Todd Lipcon <to...@apache.org>
Committed: Wed Feb 3 23:01:49 2016 +0000

----------------------------------------------------------------------
 README.adoc                              | 24 ------------------------
 build-support/jenkins/build-and-test.sh  | 24 +-----------------------
 build-support/report-test.sh             |  3 ---
 src/kudu/scripts/benchmarks.sh           |  2 --
 src/kudu/scripts/tpch.sh                 |  2 --
 src/kudu/util/CMakeLists.txt             |  3 +--
 src/kudu/util/debug/leakcheck_disabler.h |  6 +-----
 7 files changed, 3 insertions(+), 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/affa0e4f/README.adoc
----------------------------------------------------------------------
diff --git a/README.adoc b/README.adoc
index 1a163a4..bb83b38 100644
--- a/README.adoc
+++ b/README.adoc
@@ -160,30 +160,6 @@ set a breakpoint as follows:
 
 Then, when the breakpoint fires, gather a backtrace as usual using the `bt` command.
 
-=== Running tests with the tcmalloc memory leak checker enabled
-
-
-You can also run the tests with a tcmalloc feature that prints an error message
-and aborts if it detects memory leaks in your program.
-
-[source,bash]
-----
-$ mkdir -p build/leakcheck
-$ cd build/leakcheck
-$ cmake ../..
-$ make -j8
-$ # Note: LP_BIND_NOW=1 required below, see: https://code.google.com/p/gperftools/issues/detail?id=497
-$ PPROF_PATH=../../thirdparty/installed/bin/pprof HEAPCHECK=normal LD_BIND_NOW=1 ctest -j8
-----
-
-NOTE: For more information on the heap checker, please see:
-  http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html
-
-NOTE: The AddressSanitizer doesn't play nice with tcmalloc, so sadly the
-HEAPCHECK environment has no effect if you have enabled ASAN. However, recent
-versions of ASAN will also detect leaks, so the tcmalloc leak checker is of
-limited utility.
-
 === Running tests with ThreadSanitizer enabled
 
 ThreadSanitizer (TSAN) is a feature of recent Clang and GCC compilers which can

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/affa0e4f/build-support/jenkins/build-and-test.sh
----------------------------------------------------------------------
diff --git a/build-support/jenkins/build-and-test.sh b/build-support/jenkins/build-and-test.sh
index 1b30682..c31a9c2 100755
--- a/build-support/jenkins/build-and-test.sh
+++ b/build-support/jenkins/build-and-test.sh
@@ -22,7 +22,7 @@
 #
 # Environment variables may be used to customize operation:
 #   BUILD_TYPE: Default: DEBUG
-#     Maybe be one of ASAN|TSAN|LEAKCHECK|DEBUG|RELEASE|COVERAGE|LINT
+#     Maybe be one of ASAN|TSAN|DEBUG|RELEASE|COVERAGE|LINT
 #
 #   KUDU_ALLOW_SLOW_TESTS   Default: 1
 #     Runs the "slow" version of the unit tests. Set to 0 to
@@ -177,11 +177,6 @@ elif [ "$BUILD_TYPE" = "TSAN" ]; then
   BUILD_TYPE=fastdebug
   EXTRA_TEST_FLAGS="$EXTRA_TEST_FLAGS -LE no_tsan"
   BUILD_PYTHON=0
-elif [ "$BUILD_TYPE" = "LEAKCHECK" ]; then
-  BUILD_TYPE=release
-  export HEAPCHECK=normal
-  # Workaround for gperftools issue #497
-  export LD_BIND_NOW=1
 elif [ "$BUILD_TYPE" = "COVERAGE" ]; then
   DO_COVERAGE=1
   BUILD_TYPE=debug
@@ -397,23 +392,6 @@ if [ "$ENABLE_DIST_TEST" == "1" ]; then
   done
 fi
 
-if [ "$HEAPCHECK" = normal ]; then
-  echo
-  echo Checking that heap checker ran correctly
-  echo ------------------------------------------------------------
-  FAILED_TESTS=$(zgrep -L -- "WARNING: Perftools heap leak checker is active -- Performance may suffer" $BUILD_ROOT/test-logs/*-test.txt*)
-  if [ -n "$FAILED_TESTS" ]; then
-    echo "Some tests didn't heap check properly:"
-    for FTEST in $FAILED_TESTS; do
-      echo $FTEST
-    done
-    EXIT_STATUS=1
-    FAILURES="$FAILURES"$'Heap checker did not run properly\n'
-  else
-    echo "All tests heap checked properly"
-  fi
-fi
-
 if [ $EXIT_STATUS != 0 ]; then
   echo
   echo Tests failed, making sure we have XML files for all tests.

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/affa0e4f/build-support/report-test.sh
----------------------------------------------------------------------
diff --git a/build-support/report-test.sh b/build-support/report-test.sh
index b0d9426..f5298dc 100755
--- a/build-support/report-test.sh
+++ b/build-support/report-test.sh
@@ -69,9 +69,6 @@ fi
 if grep -q "KUDU_USE_UBSAN:UNINITIALIZED=1" $CMAKECACHE ; then
   BUILD_CONFIG="$BUILD_CONFIG ubsan"
 fi
-if [ -n "$HEAPCHECK" ]; then
-  BUILD_CONFIG="$BUILD_CONFIG heapcheck"
-fi
 
 # We sometimes have flaky infrastructure where NTP is broken. In that case
 # do not report it as a failed test.

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/affa0e4f/src/kudu/scripts/benchmarks.sh
----------------------------------------------------------------------
diff --git a/src/kudu/scripts/benchmarks.sh b/src/kudu/scripts/benchmarks.sh
index f430d9e..98dcc21 100755
--- a/src/kudu/scripts/benchmarks.sh
+++ b/src/kudu/scripts/benchmarks.sh
@@ -152,8 +152,6 @@ build_kudu() {
   export PPROF_PATH=$THIRDPARTY_BIN/pprof
 
   BUILD_TYPE=release
-  # Workaround for gperftools issue #497
-  export LD_BIND_NOW=1
 
   # Build Kudu
   mkdir -p build/$BUILD_TYPE

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/affa0e4f/src/kudu/scripts/tpch.sh
----------------------------------------------------------------------
diff --git a/src/kudu/scripts/tpch.sh b/src/kudu/scripts/tpch.sh
index 447f02b..db9fb7f 100755
--- a/src/kudu/scripts/tpch.sh
+++ b/src/kudu/scripts/tpch.sh
@@ -106,8 +106,6 @@ THIRDPARTY_BIN=$(pwd)/thirdparty/installed/bin
 export PPROF_PATH=$THIRDPARTY_BIN/pprof
 
 BUILD_TYPE=release
-# Workaround for gperftools issue #497
-export LD_BIND_NOW=1
 
 # Build Kudu
 mkdir -p build/$BUILD_TYPE

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/affa0e4f/src/kudu/util/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/kudu/util/CMakeLists.txt b/src/kudu/util/CMakeLists.txt
index b98c464..23ac5e5 100644
--- a/src/kudu/util/CMakeLists.txt
+++ b/src/kudu/util/CMakeLists.txt
@@ -186,8 +186,7 @@ if(NOT APPLE)
     vmem)
 endif()
 
-# We use MallocExtension and HeapChecker, but not in the exported version of
-# the library.
+# We use MallocExtension, but not in the exported version of the library.
 set(EXPORTED_UTIL_LIBS ${UTIL_LIBS})
 if(${KUDU_TCMALLOC_AVAILABLE})
   list(APPEND UTIL_LIBS tcmalloc)

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/affa0e4f/src/kudu/util/debug/leakcheck_disabler.h
----------------------------------------------------------------------
diff --git a/src/kudu/util/debug/leakcheck_disabler.h b/src/kudu/util/debug/leakcheck_disabler.h
index 3713997..493abe4 100644
--- a/src/kudu/util/debug/leakcheck_disabler.h
+++ b/src/kudu/util/debug/leakcheck_disabler.h
@@ -24,17 +24,13 @@
 namespace kudu {
 namespace debug {
 
-// Scoped object that generically disables leak checking in a given scope,
-// supporting both the tcmalloc heap leak checker and LSAN.
+// Scoped object that generically disables LSAN leak checking in a given scope.
 // While this object is alive, calls to "new" will not be checked for leaks.
 class ScopedLeakCheckDisabler {
  public:
   ScopedLeakCheckDisabler() {}
 
  private:
-#ifdef TCMALLOC_ENABLED
-  HeapLeakChecker::Disabler hlc_disabler;
-#endif
 
 #if defined(__has_feature)
 #  if __has_feature(address_sanitizer)