teepark / greenhouse

non-blocking IO with coroutines to mimic blocking IO with threads
BSD 3-Clause "New" or "Revised" License
35 stars 5 forks source link

IOError via Tornado #12

Open dsully opened 12 years ago

dsully commented 12 years ago
[MainThread     ] [ERROR] 2012-09-11 15:15:07,013 - [Errno 17] File exists
Traceback (most recent call last):
  File "/export/home/eng/dsully/dev/tools/apps/deployment/bin/process-deployment-queue", line 170, in main
    server.start()
  File "/export/home/eng/dsully/.virtualenvs/test/lib/python2.6/site-packages/tornado/ioloop.py", line 301, in start
    event_pairs = self._impl.poll(poll_timeout)
  File "/export/home/eng/dsully/.virtualenvs/test/lib/python2.6/site-packages/greenhouse/emulation/select.py", line 107, in poll
    reg = poller.register(self._epoll.fileno(), poller.INMASK)
  File "/export/home/eng/dsully/.virtualenvs/test/lib/python2.6/site-packages/greenhouse/poller.py", line 37, in register
    self._update_registration(fd, registered, registered | eventmask)
  File "/export/home/eng/dsully/.virtualenvs/test/lib/python2.6/site-packages/greenhouse/poller.py", line 79, in _update_registration
    self._poller.register(fd, to_mask)
IOError: [Errno 17] File exists
dsully commented 12 years ago

Still encountering this occasionally - seems to be epoll related. I've not gotten it via either poll or select (yet).

Exception [ERROR] 2012-09-19 09:22:13,775 - [Errno 17] File exists Traceback (most recent call last): File "/export/home/eng/dsully/dev/tools/apps/deployment/bin/process-deployment-queue", line 163, in main server.start() File "/export/home/eng/dsully/.virtualenvs/test/lib/python2.6/site-packages/tornado/ioloop.py", line 301, in start event_pairs = self._impl.poll(poll_timeout) File "/export/home/eng/dsully/.virtualenvs/test/lib/python2.6/site-packages/greenhouse/emulation/select.py", line 112, in poll reg = poller.register(self._epoll.fileno(), poller.INMASK) File "/export/home/eng/dsully/.virtualenvs/test/lib/python2.6/site-packages/greenhouse/poller.py", line 39, in register self._update_registration(fd, registered, registered | eventmask) File "/export/home/eng/dsully/.virtualenvs/test/lib/python2.6/site-packages/greenhouse/poller.py", line 81, in _update_registration self._poller.register(fd, to_mask) IOError: [Errno 17] File exists

dsully commented 12 years ago

In a local module that I use (which calls out to svn), switching from Python 2.6's subprocess module to subprocess32: http://pypi.python.org/pypi/subprocess32/ appears to fix this problem.