BIND 10 #2190: (msgq) select.poll() broken on osx's python

BIND 10 Development do-not-reply at isc.org
Tue Aug 14 13:45:08 UTC 2012


#2190: (msgq) select.poll() broken on osx's python
-------------------------------+-----------------------------------------
            Reporter:  jelte   |                        Owner:
                Type:  defect  |                       Status:  new
            Priority:  medium  |                    Milestone:  New Tasks
           Component:  msgq    |                     Keywords:
           Sensitive:  0       |              Defect Severity:  N/A
         Sub-Project:  DNS     |  Feature Depending on Ticket:
Estimated Difficulty:  0       |          Add Hours to Ticket:  0
         Total Hours:  0       |                    Internal?:  0
-------------------------------+-----------------------------------------
 We saw a failure recently where select.poll() returned a bad file
 descriptor, making msgq crash.

 {{{
 Traceback (most recent call last):
   File "/Local/Users/jelte/repos/bind10_clang/src/bin/msgq/b10-msgq", line
 553, in <module>
     msgq.run()
   File "/Local/Users/jelte/repos/bind10_clang/src/bin/msgq/b10-msgq", line
 461, in run
     self.run_poller()
   File "/Local/Users/jelte/repos/bind10_clang/src/bin/msgq/b10-msgq", line
 481, in run_poller
     self.__process_write(fd)
   File "/Local/Users/jelte/repos/bind10_clang/src/bin/msgq/b10-msgq", line
 392, in __process_write
     (_, msg) = self.sendbuffs[fileno]
 KeyError: 8249280
 }}}

 (that value being an fd returned by poll())

 I am not sure if we can and want to recover from this situation (it is
 unclear at this point whether these are 'extraneous' events or replacing
 actual events it should not miss).

 One thing I did find is that the system-installed version of python has
 select.poll() completely disabled. In which case msgq falls back to using
 kqueue (i am running repeated tests now and have not seen any problems
 with kqueue yet). Since we use python 3 and have built our own, poll() is
 once again available, but bad.

 This may be related: http://bugs.python.org/issue5154

 It would appear this is a wont-fix because it is unclear why Apple
 disabled this in the first place.

 So, perhaps we should use kqueue by default if available, and/or update
 the documentation so make sure the self-built python has select.poll()
 disabled (which is, well, bleh). Alternatively maybe we should replace the
 entire thing by select()...

 I also wonder if we should try to reopen that ticket.

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


More information about the bind10-tickets mailing list