You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kudu.apache.org by "Adar Dembo (Code Review)" <ge...@cloudera.org> on 2016/04/28 09:06:52 UTC

[kudu-CR] catalog_manager: further protection for table visitor racing with shutdown

Hello Todd Lipcon,

I'd like you to do a code review.  Please visit

    http://gerrit.cloudera.org:8080/2891

to review the following change.

Change subject: catalog_manager: further protection for table visitor racing with shutdown
......................................................................

catalog_manager: further protection for table visitor racing with shutdown

One of my patches ran into the following master-test failure, which I think
is due to a table visitor thread writing to the table map while the
main thread iterates over it in Shutdown(). I can't reproduce the failure,
but copying the table map while holding the catalog manager lock (also held
by table visitors) should do the trick.

master-test: /home/jenkins-slave/workspace/kudu-1/src/kudu/gutil/ref_counted.h:273: T* scoped_refptr<T>::operator->() const [with T = kudu::master::TableInfo]: Assertion `ptr_ != __null' failed.
*** Aborted at 1461811706 (unix time) try "date -d @1461811706" if you are using GNU date ***
PC: @     0x7fd929da3cc9 gsignal
*** SIGABRT (@0x3e8000000a0) received by PID 160 (TID 0x7fd92d79e840) from PID 160; stack trace: ***
    @     0x7fd929da3d40 (unknown) at ??:0
    @     0x7fd929da3cc9 gsignal at ??:0
    @     0x7fd929da70d8 abort at ??:0
    @     0x7fd929d9cb86 (unknown) at ??:0
    @     0x7fd929d9cc32 __assert_fail at ??:0
    @     0x7fd92d306fdf scoped_refptr<>::operator->() at ??:0
    @     0x7fd92d2df4fb kudu::master::CatalogManager::Shutdown() at ??:0
    @     0x7fd92d327c6b kudu::master::Master::Shutdown() at ??:0
    @     0x7fd92d33c975 kudu::master::MiniMaster::Shutdown() at ??:0
    @           0x466012 kudu::master::MasterTest::TearDown() at /home/jenkins-slave/workspace/kudu-1/src/kudu/master/master-test.cc:75
    @     0x7fd92ab9a909 testing::internal::HandleExceptionsInMethodIfSupported<>() at ??:0
    @     0x7fd92ab8c3c0 testing::Test::Run() at ??:0
    @     0x7fd92ab8c4ad testing::TestInfo::Run() at ??:0
    @     0x7fd92ab8c5c5 testing::TestCase::Run() at ??:0
    @     0x7fd92ab8c878 testing::internal::UnitTestImpl::RunAllTests() at ??:0
    @     0x7fd92ab8cb19 testing::UnitTest::Run() at ??:0
    @     0x7fd92cfdf181 RUN_ALL_TESTS() at ??:0
    @     0x7fd92cfdec1e main at ??:0
    @     0x7fd929d8eec5 __libc_start_main at ??:0
    @           0x44e069 (unknown) at ??:?
    @                0x0 (unknown)

Change-Id: Ifbae665944f180c8b1354717c8ab9479c83d8fc8
---
M src/kudu/master/catalog_manager.cc
1 file changed, 12 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/91/2891/1
-- 
To view, visit http://gerrit.cloudera.org:8080/2891
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifbae665944f180c8b1354717c8ab9479c83d8fc8
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>