So I finally realized what is happening here. The issue is that I am trying to be robust by preventing recvfrom() on the broadcasting socket. I do this by calling pauseProducing() for the Transport associated with a UDP socket. Apparently this doesn't work work with the epoll backend.
Traceback (mostrecentcalllast):
File"/usr/bin/twistd", line11, in<module>load_entry_point('Twisted==18.9.0', 'console_scripts', 'twistd')()
File"/usr/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line31, inrunapp.run(runApp, ServerOptions)
File"/usr/lib/python2.7/dist-packages/twisted/application/app.py", line674, inrunrunApp(config)
File"/usr/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line25, inrunApprunner.run()
File"/usr/lib/python2.7/dist-packages/twisted/application/app.py", line385, inrunself.postApplication()
File"/usr/lib/python2.7/dist-packages/twisted/scripts/_twistd_unix.py", line254, inpostApplicationself.startApplication(self.application)
File"/usr/lib/python2.7/dist-packages/twisted/scripts/_twistd_unix.py", line442, instartApplicationservice.IService(application).privilegedStartService()
File"/usr/lib/python2.7/dist-packages/twisted/application/service.py", line283, inprivilegedStartServiceservice.privilegedStartService()
File"/home/mdavidsaver/work/epics/recsync/server/recceiver/application.py", line86, inprivilegedStartServiceself.udp.startListening()
File"/usr/lib/python2.7/dist-packages/twisted/internet/udp.py", line179, instartListeningself._connectToProtocol()
File"/usr/lib/python2.7/dist-packages/twisted/internet/udp.py", line217, in_connectToProtocolself.protocol.makeConnection(self)
File"/usr/lib/python2.7/dist-packages/twisted/internet/protocol.py", line771, inmakeConnectionself.doStart()
File"/usr/lib/python2.7/dist-packages/twisted/internet/protocol.py", line727, indoStartself.startProtocol()
File"/home/mdavidsaver/work/epics/recsync/server/recceiver/announce.py", line40, instartProtocolself.transport.pauseProducing()
File"/usr/lib/python2.7/dist-packages/twisted/internet/abstract.py", line470, inpauseProducingself.stopReading()
File"/usr/lib/python2.7/dist-packages/twisted/internet/abstract.py", line422, instopReadingself.reactor.removeReader(self)
File"/usr/lib/python2.7/dist-packages/twisted/internet/epollreactor.py", line172, inremoveReaderEPOLLIN, EPOLLOUT)
File"/usr/lib/python2.7/dist-packages/twisted/internet/epollreactor.py", line160, in_removeself._poller.unregister(fd)
IOError: [Errno2] Nosuchfileordirectory
So I finally realized what is happening here. The issue is that I am trying to be robust by preventing
recvfrom()on the broadcasting socket. I do this by callingpauseProducing()for the Transport associated with a UDP socket. Apparently this doesn't work work with the epoll backend.