GRPC Seg faults during streaming

47 views
Skip to first unread message

deepankar

unread,
May 13, 2020, 6:04:06 AM5/13/20
to grpc.io
I am using grpc for streaming audio streams. My grpc client runs fine most of the time, but crashes occasionally.  I have implemented a async client using CompletionQueue.

Here is the stack trace of my application seg fault.

0x00007f60957976b6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 0x00007f6095797701 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 0x00007f609579823f in __cxa_pure_virtual () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 0x00007f60961f5302 in grpc::CompletionQueue::AsyncNextInternal(void**, bool*, gpr_timespec) () from /usr/local/lib/libgrpc++.so.1 0x00007f60965a4edf in grpc::ByteBuffer::Swap(grpc::ByteBuffer*) () from /usr/local/unimrcp/plugin/vairecog.so 0x00007f60965ac353 in CCACallStream::reset() () from /usr/local/unimrcp/plugin/vairecog.so 0x00007f60965bc6bb in std::_Bind<std::_Bind<std::_Mem_fn<void (CCACallStream::*)()> (CCACallStream*)> ()>* std::__addressof<std::_Bind<std::_Bind<std::_Mem_fn<void (CCACallStream::*)()> (CCACallStream*)> ()> >(std::_Bind<std::_Bind<std::_Mem_fn<void (CCACallStream::*)()> (CCACallStream*)> ()>&) () from /usr/local/unimrcp/plugin/vairecog.so

I also get some grpc core dumps though I am not sure if it is related to this problem.

#0 0x00007fef70ec8f00 in grpc_cq_end_op(grpc_completion_queue*, void*, grpc_error*, void (*)(void*, grpc_cq_completion*), void*, grpc_cq_completion*) () from /usr/local/lib/libgrpc.so.7 #1 0x00007fef7157d421 in grpc_impl::internal::AlarmImpl::Set(grpc::CompletionQueue*, gpr_timespec, void*)::{lambda(void*, grpc_error*)#1}::_FUN(void*, grpc_error*) () from /usr/local/lib/libgrpc++.so.1 #2 0x00007fef70ea6e31 in grpc_core::ExecCtx::Flush() () from /usr/local/lib/libgrpc.so.7 #3 0x00007fef70eb7e68 in ?? () from /usr/local/lib/libgrpc.so.7 #4 0x00007fef70f695b3 in ?? () from /usr/local/lib/libgrpc.so.7 #5 0x00007fef738116ba in start_thread (arg=0x7fef6a7fc700) at pthread_create.c:333 #6 0x00007fef7354741d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thanks in advance for any help.

Yang Gao

unread,
May 14, 2020, 12:09:07 AM5/14/20
to grpc.io
This seems like some kind of memory corruption. I suggest you run the program under some memory tools such as AddressSanitizer.
Reply all
Reply to author
Forward
0 new messages