BIND 10 #2882: ModuleCCSession::rpcCall (C++ version) is mostly unusable

BIND 10 Development do-not-reply at isc.org
Fri Mar 22 18:59:56 UTC 2013


#2882: ModuleCCSession::rpcCall (C++ version) is mostly unusable
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:
  jinmei                             |                Status:  new
                       Type:         |             Milestone:  New Tasks
  defect                             |              Keywords:
                   Priority:         |             Sensitive:  0
  medium                             |           Sub-Project:  DNS
                  Component:         |  Estimated Difficulty:  0
  Inter-module communication         |           Total Hours:  0
               CVSS Scoring:         |
            Defect Severity:  N/A    |
Feature Depending on Ticket:         |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
 In #2562, I first thought we could simply use the new rpcCall() in
 b10-auth and implemented it, but then lettuce tests constantly failed.
 Then I noticed this method has a fundamental issue, and won't
 reasonably work at least with some substantial updates.

 The problem is that it calls `group_recvmsg` in its internal `Session`
 object.  This internally results in asio::async_read(), but unless it
 happens in the context of command or config handler (this is not the
 case for #2562, and it would be too fragile to request app be
 responsible for it), it breaks an assumption of ASIO: read operation
 cannot be nested.  (in that sense, it's not specific to `rpcCall()`.
 The problem has been there with `groupRecvMsg`, but we've not relied
 on it in practice so far, so we haven't been hit).

 I suspect we basically can't mix asynchronous and synchronous
 operations at least in the C++ version that uses ASIO.  And, in the
 case of #2562, we actually shouldn't use the synchronous interface
 anyway, because there's no guarantee that this I/O doesn't block.

 So my suggestion is: deprecate `groupRecvMsg()` and `rpcCall`; they
 are not used so far, and, as described above, they generally won't
 work.

-- 
Ticket URL: <http://bind10.isc.org/ticket/2882>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list