Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

self._poller.unregister IOError: [Errno 2] No such file or directory #44

Open
mdavidsaver opened this issue Aug 22, 2019 · 1 comment
Open

Comments

@mdavidsaver
Copy link
Collaborator

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 (most recent call last):
  File "/usr/bin/twistd", line 11, in <module>
    load_entry_point('Twisted==18.9.0', 'console_scripts', 'twistd')()
  File "/usr/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line 31, in run
    app.run(runApp, ServerOptions)
  File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 674, in run
    runApp(config)
  File "/usr/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line 25, in runApp
    runner.run()
  File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 385, in run
    self.postApplication()
  File "/usr/lib/python2.7/dist-packages/twisted/scripts/_twistd_unix.py", line 254, in postApplication
    self.startApplication(self.application)
  File "/usr/lib/python2.7/dist-packages/twisted/scripts/_twistd_unix.py", line 442, in startApplication
    service.IService(application).privilegedStartService()
  File "/usr/lib/python2.7/dist-packages/twisted/application/service.py", line 283, in privilegedStartService
    service.privilegedStartService()
  File "/home/mdavidsaver/work/epics/recsync/server/recceiver/application.py", line 86, in privilegedStartService
    self.udp.startListening()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/udp.py", line 179, in startListening
    self._connectToProtocol()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/udp.py", line 217, in _connectToProtocol
    self.protocol.makeConnection(self)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/protocol.py", line 771, in makeConnection
    self.doStart()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/protocol.py", line 727, in doStart
    self.startProtocol()
  File "/home/mdavidsaver/work/epics/recsync/server/recceiver/announce.py", line 40, in startProtocol
    self.transport.pauseProducing()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/abstract.py", line 470, in pauseProducing
    self.stopReading()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/abstract.py", line 422, in stopReading
    self.reactor.removeReader(self)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/epollreactor.py", line 172, in removeReader
    EPOLLIN, EPOLLOUT)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/epollreactor.py", line 160, in _remove
    self._poller.unregister(fd)
IOError: [Errno 2] No such file or directory
@mdavidsaver
Copy link
Collaborator Author

The workaround, as mentioned in server/README, is to pass -r poll.

twistd -r poll -n recceiver -f demo.conf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant