Hi guys,

I've just written an async gRPC++ server implementation, I'm able to 
successfully receive and finish one request, however the subsequent request 
fails as it's retrieved via ServerCompletionQueue::AsyncNext() within 
ServerContext::BeginCompletionOp() when asserting !compleition_op_ on line 
269. Sequence of events are as follows:

1. Register to receive multiple requests for various rpc calls.
2. Send rpc request from client app.
3. Receive and finish rpc request.
4. Register to receive the request again.
5. Send same rpc request from client app.
6. Assert fails during call to ServerCompletionQueue::AsyncNext() as the 
request arrives server side.

Terminal Output:
E0113 21:37:39.692948234  130281 server_context.cc:269]      assertion 
failed: !completion_op_

Stack Trace from call to AsyncNext:
__GI_raise(int sig) 
(/build/glibc-OTsEL5/glibc-2.27/sysdeps/unix/sysv/linux/raise.c:51)
__GI_abort() (/build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:79)
grpc::ServerContext::BeginCompletionOp(grpc::internal::Call*, bool) 
(Unknown Source:0)
grpc::ServerInterface::BaseAsyncRequest::FinalizeResult(void**, bool*) 
(Unknown Source:0)
grpc::ServerInterface::RegisteredAsyncRequest::FinalizeResult(grpc::ServerInterface::RegisteredAsyncRequest
 
* const this, void ** tag, bool * status) 
(/usr/local/include/grpcpp/impl/codegen/server_interface.h:194)
grpc::ServerInterface::PayloadAsyncRequest<OpenIoTServer::CompileVMRequest>::FinalizeResult(grpc::ServerInterface::PayloadAsyncRequest<OpenIoTServer::CompileVMRequest>
 
* const this, void ** tag, bool * status) 
(/usr/local/include/grpcpp/impl/codegen/server_interface.h:274)
grpc::CompletionQueue::AsyncNextInternal(void**, bool*, gpr_timespec) 
(Unknown Source:0)
grpc::CompletionQueue::AsyncNext<std::chrono::time_point<std::chrono::_V2::system_clock,
 
std::chrono::duration<long, std::ratio<1l, 1000000000l> > > 
>(grpc::CompletionQueue * const this, void ** tag, bool * ok, const 
std::chrono::time_point<std::chrono::_V2::system_clock, 
std::chrono::duration<long, std::ratio<1, 1000000000> > > & deadline) 
(/usr/local/include/grpcpp/impl/codegen/completion_queue.h:190)

Is anyone able to offer any thoughts as to why compleition_op_ may not be 
getting cleared?

Many thanks

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/fb12e28a-3332-4a78-abf7-f9e55fd1cf67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to