Solved. I was using poll.register(fileno) without any flags specfied, which means "tell me when _anything_ happens". Because of this, I was receiving OOB data, which seems to use strange fileno values. to fix this, I now use this: poll.register(sock.fileno(), select.POLLIN|select.POLLOUT| select.POLLERR|select.POLLHUP)