deadlock in the server destructor
When Start a server 1.Add a ListeningPort which is already occupied. 2.Add two CompletionQueue to a ServerBuilder ( one for Call,the other for Notification) then it will deadlock in the call to "builder.BuildAndStart()"
If i only add one CompletionQueue, it will be ok. I find the deadlock is in completion_queue.c: grpc_event grpc_completion_queue_next(...)
the call stack is:
GasRunner.exe!grpc_completion_queue_next(grpc_completion_queue * cc, gpr_timespec deadline, void * reserved) line 232 C GasRunner.exe!grpc::CompletionQueue::AsyncNextInternal(void * * tag, bool * ok, gpr_timespec deadline) line 56 C++ GasRunner.exe!grpc::CompletionQueue::Next(void * * tag, bool * ok) line 128 C++ GasRunner.exe!grpc::Server::~Server() line 299 C++ GasRunner.exe!grpc::Server::`scalar deleting destructor'(unsigned int) C++ GasRunner.exe!std::default_deletegrpc::Server::operator()(grpc::Server * _Ptr) line 1200 C++ GasRunner.exe!std::unique_ptrgrpc::Server,std::default_delete<grpc::Server >::~unique_ptrgrpc::Server,std::default_delete<grpc::Server >() line 1449 C++ GasRunner.exe!grpc::ServerBuilder::BuildAndStart() line 130 C++
What's wrong here?
Hi @fxrrrr , Sorry for the delay in getting to this.
The call stack you pasted does not look like it is the complete call stack- it is missing some frames. It would help if you can paste a code snippet or send a link to your code (if its on github) so that I can try to reproduce it here.
Also, considering that it has been a few months since you reported this, can you retry this scenario to see if you are still seeing a deadlock ?
thanks, Sree
@fxrrrr are you still having this issue ?
Stale issue: closing.