You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Alexey Serbin (Code Review)" <ge...@cloudera.org> on 2017/03/11 05:48:16 UTC

[kudu-CR] [client] fixed crash in ConnectToMasterRpc::SendRpcCb

Alexey Serbin has uploaded a new change for review.

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

Change subject: [client] fixed crash in ConnectToMasterRpc::SendRpcCb
......................................................................

[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
---
M src/kudu/client/master_rpc.cc
1 file changed, 0 insertions(+), 1 deletion(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icefc19d3ac3db9494fd60b7d1d56f194bdff14d3
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>

[kudu-CR] [client] fixed crash in ConnectToMasterRpc::SendRpcCb

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change.

Change subject: [client] fixed crash in ConnectToMasterRpc::SendRpcCb
......................................................................


Patch Set 1: Code-Review+2

How did you find this? Would it be possible to trigger it in a test?

-- 
To view, visit http://gerrit.cloudera.org:8080/6355
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icefc19d3ac3db9494fd60b7d1d56f194bdff14d3
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] [client] fixed crash in ConnectToMasterRpc::SendRpcCb

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change.

Change subject: [client] fixed crash in ConnectToMasterRpc::SendRpcCb
......................................................................


Patch Set 1:

> How did you find this? Would it be possible to trigger it in a
 > test?

I found this while working on https://issues.apache.org/jira/browse/KUDU-1927

The code in https://gerrit.cloudera.org/#/c/6356/ triggered that crash.

-- 
To view, visit http://gerrit.cloudera.org:8080/6355
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icefc19d3ac3db9494fd60b7d1d56f194bdff14d3
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] [client] fixed crash in ConnectToMasterRpc::SendRpcCb

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has submitted this change and it was merged.

Change subject: [client] fixed crash in ConnectToMasterRpc::SendRpcCb
......................................................................


[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>
---
M src/kudu/client/master_rpc.cc
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Adar Dembo: Looks good to me, approved
  Kudu Jenkins: Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/6355
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icefc19d3ac3db9494fd60b7d1d56f194bdff14d3
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>