You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2017/03/11 08:36:13 UTC

kudu git commit: [client] fixed crash in ConnectToMasterRpc::SendRpcCb

Repository: kudu
Updated Branches:
  refs/heads/master 4a33783ee -> fb9298a6b


[client] fixed crash in ConnectToMasterRpc::SendRpcCb

Removed stale code which did a couple of suspicious things:
 * write-reading-from-itself
 * merging protobuf messages of different types

The latter lead to crash with stack looking like the following:

[libprotobuf FATAL
/Users/aserbin/Projects/kudu/thirdparty/src/protobuf-2.6.1/src/google/protobuf/reflection_ops.cc:58]
CHECK failed: (to->GetDescriptor()) == (descriptor): Tried to merge
messages of different types (merge kudu.AppStatusPB to
kudu.master.MasterErrorPB)
libc++abi.dylib: terminating with uncaught exception of type
google::protobuf::FatalException: CHECK failed: (to->GetDescriptor()) ==
(descriptor): Tried to merge messages of different types (merge
kudu.AppStatusPB to kudu.master.MasterErrorPB)
*** Aborted at 1489209465 (unix time) try "date -d @1489209465" if you
are using GNU date ***
PC: @     0x7fff8e7c7f06 __pthread_kill
*** SIGABRT (@0x7fff8e7c7f06) received by PID 54227 (TID 0x70000028d000)
stack trace: ***
    @     0x7fff94b6152a _sigtramp
    @         0x6a405f90 (unknown)
    @     0x7fff89a826df abort
    @     0x7fff8a672c11 abort_message
    @     0x7fff8a698dff default_terminate_handler()
    @     0x7fff941df6c3 _objc_terminate()
    @     0x7fff8a69600e std::__terminate()
    @     0x7fff8a695a7a __cxa_throw
    @        0x10c6ab699
google::protobuf::internal::LogMessage::Finish()
    @        0x10c7251b8
google::protobuf::internal::ReflectionOps::Merge()
    @        0x10af826f9 kudu::master::MasterErrorPB::MergeFrom()
    @        0x10af8280e kudu::master::MasterErrorPB::CopyFrom()
    @        0x10a98c486 kudu::client::internal::(anonymous
namespace)::ConnectToMasterRpc::SendRpcCb()
    @        0x10a98d121 boost::_mfi::mf1<>::operator()()
    @        0x10a98d07f boost::_bi::list2<>::operator()<>()
    @        0x10a98d00a boost::_bi::bind_t<>::operator()()
    @        0x10a98cd70
boost::detail::function::void_function_obj_invoker0<>::invoke()
    @        0x10b264f68 boost::function0<>::operator()()
    @        0x10b264cca kudu::rpc::OutboundCall::CallCallback()
    @        0x10b2651e9 kudu::rpc::OutboundCall::SetResponse()
    @        0x10b22b2ea kudu::rpc::Connection::HandleCallResponse()
    @        0x10b22a6b1 kudu::rpc::Connection::ReadHandler()
    @        0x10b232ef4 ev::base<>::method_thunk<>()
    @        0x10c63dd61 ev_invoke_pending
    @        0x10c63e429 ev_run
    @        0x10b275a4e ev::loop_ref::run()
    @        0x10b26d746 kudu::rpc::ReactorThread::RunThread()
    @        0x10b27bd99 boost::_mfi::mf0<>::operator()()
    @        0x10b27bd00 boost::_bi::list1<>::operator()<>()
    @        0x10b27bcaa boost::_bi::bind_t<>::operator()()
    @        0x10b27ba8d
boost::detail::function::void_function_obj_invoker0<>::invoke()
    @        0x10b264f68 boost::function0<>::operator()()

Change-Id: Icefc19d3ac3db9494fd60b7d1d56f194bdff14d3
Reviewed-on: http://gerrit.cloudera.org:8080/6355
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <ad...@cloudera.com>


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

Branch: refs/heads/master
Commit: fb9298a6bf3d199d68d5bd925a638929c2e8dfd5
Parents: 4a33783
Author: Alexey Serbin <as...@cloudera.com>
Authored: Fri Mar 10 21:40:40 2017 -0800
Committer: Alexey Serbin <as...@cloudera.com>
Committed: Sat Mar 11 08:30:15 2017 +0000

----------------------------------------------------------------------
 src/kudu/client/master_rpc.cc | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/fb9298a6/src/kudu/client/master_rpc.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/master_rpc.cc b/src/kudu/client/master_rpc.cc
index 3d97f3d..61e45c5 100644
--- a/src/kudu/client/master_rpc.cc
+++ b/src/kudu/client/master_rpc.cc
@@ -176,7 +176,6 @@ void ConnectToMasterRpc::SendRpcCb(const Status& status) {
       out_->set_role(RaftPeerPB::FOLLOWER);
       new_status = Status::OK();
     } else {
-      out_->mutable_error()->CopyFrom(out_->error().status());
       new_status = StatusFromPB(out_->error().status());
     }
   }