Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPC时,对方挂掉,会导致调用者段错误 #29

Closed
yvxiang opened this issue Sep 9, 2015 · 1 comment
Closed

RPC时,对方挂掉,会导致调用者段错误 #29

yvxiang opened this issue Sep 9, 2015 · 1 comment

Comments

@yvxiang
Copy link
Collaborator

yvxiang commented Sep 9, 2015

进行RPC调用时,如果对方进程挂掉,会导致调用者进程段错误

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff488f700 (LWP 20041)]
google::protobuf::MessageLite::SerializePartialToCodedStream (this=this@entry=0x7fffd00027d0, output=output@entry=0x7ffff488e330) at google/protobuf/message_lite.cc:235
235 const int size = ByteSize(); // Force size to be cached.
(gdb) bt
#0 google::protobuf::MessageLite::SerializePartialToCodedStream (this=this@entry=0x7fffd00027d0, output=output@entry=0x7ffff488e330) at google/protobuf/message_lite.cc:235
#1 0x00007ffff7b20ee5 in google::protobuf::MessageLite::SerializeToCodedStream (this=this@entry=0x7fffd00027d0, output=output@entry=0x7ffff488e330)

at google/protobuf/message_lite.cc:230

#2 0x00007ffff7b20f1f in google::protobuf::MessageLite::SerializeToZeroCopyStream (this=0x7fffd00027d0, output=) at google/protobuf/message_lite.cc:263
#3 0x000000000048b100 in sofa::pbrpc::RpcClientImpl::CallMethod(google::protobuf::Message const_, google::protobuf::Message_, sofa::pbrpc::shared_ptrsofa::pbrpc::RpcControllerImpl const&) ()
#4 0x00000000004a2fc9 in sofa::pbrpc::SimpleRpcChannelImpl::CallMethod(google::protobuf::MethodDescriptor const_, google::protobuf::RpcController_, google::protobuf::Message const_, google::protobuf::Message_, google::protobuf::Closure*) ()
#5 0x000000000043d342 in bfs::ChunkServer_Stub::WriteBlock (this=0x740070, controller=0x7fffc4000a20, request=0x7fffd00027d0, response=0x7fffc4000940, done=0x7fffc4000e90)

    at src/proto/chunkserver.pb.cc:2720

#6 0x000000000041d89a in bfs::RpcClient::AsyncRequest<bfs::ChunkServer_Stub, bfs::WriteBlockRequest, bfs::WriteBlockResponse, google::protobuf::Closure>(bfs::ChunkServer_Stub_, void (bfs::ChunkServer_Stub::)(google::protobuf::RpcController, bfs::WriteBlockRequest const_, bfs::WriteBlockResponse_, google::protobuf::Closure_), bfs::WriteBlockRequest const_, bfs::WriteBlockResponse_, boost::function<void (bfs::WriteBlockRequest const*, bfs::WriteBlockResponse*, bool, int)>, int, int) (this=0x742fc0, stub=0x740070,

        func=&virtual table offset 48, request=0x7fffd00027d0, response=0x7fffc4000940, callback=..., rpc_timeout=60, retry_times=1) at ./src/rpc/rpc_client.h:86

#7 0x0000000000412b7a in bfs::BfsFileImpl::DelayWriteChunk (this=0x74e740, buffer=0x73f860, request=0x7fffd00027d0, retry_times=0, cs_addr="Porsche:8020")

at src/sdk/bfs.cc:846

#8 0x000000000042f0e5 in boost::_mfi::mf4<void, bfs::BfsFileImpl, bfs::WriteBuffer*, bfs::WriteBlockRequest const*, int, std::string>::operator() (this=0x7fffc4000900,

        p=0x74e740, a1=0x73f860, a2=0x7fffd00027d0, a3=0, a4="Porsche:8020") at /usr/include/boost/bind/mem_fn_template.hpp:506

#9 0x000000000042e10c in boost::_bi::list5boost::_bi::value<bfs::BfsFileImpl*, boost::_bi::valuebfs::WriteBuffer*, boost::_bi::value<bfs::WriteBlockRequest const*>, boost::_bi::value, boost::_bi::valuestd::string >::operator()<boost::_mfi::mf4<void, bfs::BfsFileImpl, bfs::WriteBuffer*, bfs::WriteBlockRequest const*, int, std::string>, boost::_bi::list0> (this=0x7fffc4000910, f=..., a=...) at /usr/include/boost/bind/bind.hpp:525
#10 0x000000000042c4e0 in boost::_bi::bind_t<void, boost::_mfi::mf4<void, bfs::BfsFileImpl, bfs::WriteBuffer*, bfs::WriteBlockRequest const*, int, std::string>, boost::_bi::list5boost::_bi::value<bfs::BfsFileImpl*, boost::_bi::valuebfs::WriteBuffer*, boost::_bi::value<bfs::WriteBlockRequest const*>, boost::_bi::value, boost::_bi::valuestd::string > >::operator() (this=0x7fffc4000900) at /usr/include/boost/bind/bind_template.hpp:20
#11 0x0000000000429cca in boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void, boost::_mfi::mf4<void, bfs::BfsFileImpl, bfs::WriteBuffer*, bfs::WriteBlockRequest const*, int, std::string>, boost::_bi::list5boost::_bi::value<bfs::BfsFileImpl*, boost::_bi::valuebfs::WriteBuffer*, boost::_bi::value<bfs::WriteBlockRequest const*>, boost::_bi::value, boost::_bi::valuestd::string > >, void>::invoke (function_obj_ptr=...) at /usr/include/boost/function/function_template.hpp:153
#12 0x000000000041a6a5 in boost::function0::operator() (this=0x7ffff488ee40) at /usr/include/boost/function/function_template.hpp:767
#13 0x00000000004165de in common::ThreadPool::ThreadProc (this=0x738c80 bfs::g_thread_pool) at ./src/common/thread_pool.h:171
#14 0x00000000004162ce in common::ThreadPool::ThreadWrapper (arg=0x738c80 bfs::g_thread_pool) at ./src/common/thread_pool.h:145
#15 0x00007ffff76a50a5 in start_thread (arg=0x7ffff488f700) at pthread_create.c:309
#16 0x00007ffff6c93cfd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

@qinzuoyan
Copy link
Collaborator

能否给出可以重现case的代码?

@yvxiang yvxiang closed this as completed Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants