Commit graph

6 commits

Author SHA1 Message Date
Joel Stanley
72160cea89 Fixes a concurrency bug wherein a thread (running beyond the maximum number of
pluckers) would register a CQ notification via
grpc_server_request_registered_call prior to obtaining pluck permission, block
on acquiring such permission, and thus miss notification of the server call.

The bug can could be witnessed with particular interleavings by ensuring that
GRPC_MAX_COMPLETION_QUEUE_PLUCKERS server threads are blocked on their own
server call notifications, and then using the
(GRPC_MAX_COMPLETION_QUEUE_PLUCKERS+1)th server thread to attempt to block on a
notification for an additional server call.

In order to fix this, we simply extended the pluck permission held window for
serverRequestCall, and created a variant of pluck (called pluck') which assumes
permission to pluck is already held by the calling thread.
2016-07-10 17:15:57 -05:00
Connor Clark
accc8b8573 fix all warnings (#35) 2016-06-23 16:35:11 -05:00
Connor Clark
ff73b5eb5a serverRequestCall: block until request received (#30)
* fix error for client timeouts

* registered calls: block until call received, simplify cleanup

* unregistered calls: block until request received

* Fix up tests
2016-06-22 10:41:14 -07:00
Connor Clark
4ce7497a33 Fix test failure: remove timeout from runOps, make timeout optional in pluck. (#27) 2016-06-15 10:30:17 -07:00
Joel Stanley
8069ebba07 Rename reg operations in all modules; use qualified imports whenever selecting unregistered variants 2016-06-08 15:29:12 -05:00
Joel Stanley
e8d3e6450e Split up CompletionQueue into CompletionQueue.{Unregistered,Internal} and add Unregistered namespace for Op 2016-06-08 15:29:12 -05:00