This is an automated email from the ASF dual-hosted git repository.
adar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new b9a590a tablet_copy-test-base: fix a null ptr deref in TearDown
b9a590a is described below
commit b9a590a34ac219f1d5d1fe34176aece8d9f79d30
Author: Adar Dembo <[email protected]>
AuthorDate: Tue May 14 13:34:47 2019 -0700
tablet_copy-test-base: fix a null ptr deref in TearDown
If the mini tablet server fails to start (i.e. because of clock
desynchronization), the test crashes in TearDown.
tablet_copy_client-test:
/data0/jenkins/workspace/kudu-pre-commit-unittest-TSAN/src/kudu/gutil/ref_counted.h:284:
T *scoped_refptr<kudu::tablet::TabletReplica>::operator->() const [T =
kudu::tablet::TabletReplica]: Assertion `ptr_ != __null' failed.
*** Aborted at 1557801930 (unix time) try "date -d @1557801930" if you are
using GNU date ***
PC: @ 0x7fb2ab088c37 gsignal
*** SIGABRT (@0x3e800001be3) received by PID 7139 (TID 0x7fb2b84f0440) from
PID 7139; stack trace: ***
@ 0x46d9bd __tsan::CallUserSignalHandler() at
/data0/jenkins/workspace/kudu-pre-commit-unittest-TSAN/thirdparty/src/llvm-6.0.0.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1908
@ 0x46e9ab rtl_sigaction() at
/data0/jenkins/workspace/kudu-pre-commit-unittest-TSAN/thirdparty/src/llvm-6.0.0.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1997
@ 0x7fb2b2ee2330 (unknown) at ??:0
@ 0x7fb2ab088c37 gsignal at ??:0
@ 0x7fb2ab08c028 abort at ??:0
@ 0x7fb2ab081bf6 (unknown) at ??:0
@ 0x7fb2ab081ca2 __assert_fail at ??:0
@ 0x4eb7f0 scoped_refptr<>::operator->() at
/data0/jenkins/workspace/kudu-pre-commit-unittest-TSAN/src/kudu/tablet/tablet_replica.h:245
@ 0x4ed463 kudu::tserver::TabletCopyTest::TearDown() at
/data0/jenkins/workspace/kudu-pre-commit-unittest-TSAN/src/kudu/tserver/tablet_copy-test-base.h:60
@ 0x7fb2b75e8300
testing::internal::HandleExceptionsInMethodIfSupported<>() at ??:0
@ 0x7fb2b75c7531 testing::Test::Run() at ??:0
@ 0x7fb2b75c875d testing::TestInfo::Run() at ??:0
@ 0x7fb2b75c9237 testing::TestCase::Run() at ??:0
@ 0x7fb2b75d560b testing::internal::UnitTestImpl::RunAllTests() at
??:0
@ 0x7fb2b75e9270
testing::internal::HandleExceptionsInMethodIfSupported<>() at ??:0
@ 0x7fb2b75d4ef3 testing::UnitTest::Run() at ??:0
@ 0x7fb2b7a3b4fc RUN_ALL_TESTS() at ??:0
@ 0x7fb2b7a3aca7 main at ??:0
@ 0x7fb2ab073f45 __libc_start_main at ??:0
@ 0x44473b (unknown) at ??:?
Change-Id: I9257d20cf9728dfa3a58710e2dfc75f628c2daa5
Reviewed-on: http://gerrit.cloudera.org:8080/13332
Reviewed-by: Alexey Serbin <[email protected]>
Tested-by: Adar Dembo <[email protected]>
---
src/kudu/tserver/tablet_copy-test-base.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/kudu/tserver/tablet_copy-test-base.h
b/src/kudu/tserver/tablet_copy-test-base.h
index 99624b5..b4db99c 100644
--- a/src/kudu/tserver/tablet_copy-test-base.h
+++ b/src/kudu/tserver/tablet_copy-test-base.h
@@ -57,7 +57,9 @@ class TabletCopyTest : public TabletServerTestBase {
}
virtual void TearDown() OVERRIDE {
- ASSERT_OK(tablet_replica_->log_anchor_registry()->Unregister(&anchor_));
+ if (tablet_replica_) {
+ ASSERT_OK(tablet_replica_->log_anchor_registry()->Unregister(&anchor_));
+ }
NO_FATALS(TabletServerTestBase::TearDown());
}