Skip to content
This repository has been archived by the owner on Aug 3, 2021. It is now read-only.

[httpproxy] Exception in callback _SelectorDatagramTransport._read_ready() #56

Closed
appliedprivacy opened this issue Feb 24, 2019 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@appliedprivacy
Copy link

setup as described in https://facebookexperimental.github.io/doh-proxy/tutorials/nginx-dohhttpproxy-unbound-centos7.html but on Debian

running from git 149c97d
Python 3.5.3

The setup works but the logs contain many occurrences of:

ERROR: Exception in callback _SelectorDatagramTransport._read_ready()
handle: <Handle _SelectorDatagramTransport._read_ready()>
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/events.py", line 126, in _run
    self._callback(*self._args)
  File "/usr/lib/python3.5/asyncio/selector_events.py", line 1077, in _read_ready
    self._protocol.datagram_received(data, addr)
  File "/usr/local/lib/python3.5/dist-packages/dohproxy/server_protocol.py", line 139, in datagram_received
    self.receive_helper(dnsr)
  File "/usr/local/lib/python3.5/dist-packages/dohproxy/server_protocol.py", line 128, in receive_helper
    self.fut.set_result(dnsr)
  File "/usr/lib/python3.5/asyncio/futures.py", line 348, in set_result
    raise InvalidStateError('{}: {!r}'.format(self._state, self))
asyncio.futures.InvalidStateError: CANCELLED: <Future cancelled>
@chantra
Copy link
Contributor

chantra commented Feb 24, 2019

The error is happening because the future we are trying to set the result for is already cancelled. I don’t have access to a computer now, so I did not check the sources, but most likely this is due to a query that already timeouted. We eventually get the result later from the dns server, call in the callback and try to set result on the future, but this was already cancelled.

Sent with GitHawk

@chantra
Copy link
Contributor

chantra commented Apr 2, 2019

This should be fixed with #59

@chantra chantra closed this as completed Apr 2, 2019
@chantra
Copy link
Contributor

chantra commented Jul 4, 2019

v0.0.9, which contains the fix, was pushed to pip

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants