BIND 10 #312: python msgq timeouts differ from c++ ones

BIND 10 Development do-not-reply at isc.org
Wed Sep 8 12:24:29 UTC 2010


#312: python msgq timeouts differ from c++ ones
-------------------------+--------------------------------------------------
      Reporter:  jelte   |        Owner:  jelte               
          Type:  defect  |       Status:  reviewing           
      Priority:  major   |    Milestone:  y2 6 month milestone
     Component:  msgq    |   Resolution:                      
      Keywords:          |    Sensitive:  0                   
Estimatedhours:  0.0     |        Hours:  0                   
      Billable:  1       |   Totalhours:  0                   
      Internal:  0       |  
-------------------------+--------------------------------------------------
Changes (by vorner):

  * owner:  vorner => jelte


Comment:

 In src/lib/python/isc/cc/session.py, in the _receive_full_buffer, there
 are two small problems:
 • On line 138, if a short read happens (for example 2 bytes of the length
 came in one packet, another 2 in another packet that is still travelling
 somewhere on the network), it returns None, when it should probably loop
 and wait for the rest (and either get a timeout waiting for the rest or
 get the length part eventually).
 • The except: thing is odd. One thing is it catches even ctrl+c, in which
 case it just returns None and does not terminate. And when something like
 a real error happens, maybe some exception would be better than return
 None? However, this was here even before the changes introduced in this
 branch.

 Anyway, if this is interrupted/terminated in a non-standard way, is it
 always considered unrecoverable for this Session object? Since if the
 whole message is not read and some of it is left in the socket, next read
 would consider first 4 bytes of the remaining part as length of the next
 one.

-- 
Ticket URL: <http://bind10.isc.org/ticket/312#comment:4>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list