Opened 12 months ago

Closed 12 months ago

Last modified 11 months ago

#28141 closed defect (fixed)

Catch DNS-related unhandled exception

Reported by: pastly Owned by:
Priority: Medium Milestone: sbws: 1.0.x-final
Component: Core Tor/sbws Version:
Severity: Critical Keywords: sbws-1.0-must-closed-moved-20181128
Cc: pastly, juga, teor Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

I've been running sbws for about 5 days without checking on it.

The first time the following exception appeared in my logs, I went from seeing a variety of thread names in the logs to only seeing a couple. This indicates to me this is (a/the) exception that has been causing sbws to fallback to just one measurement thread. (Later instances of this exception don't change anything)

2018-10-21 11:09:45,926 ERROR Thread-6 scanner.py:259 - dispatch_worker_thread - Unhandled exception in worker thread
Traceback (most recent call last):
  File "/home/mtraudt/.pyenv/versions/3.5.6/envs/sbws-venv-3.5.6/lib/python3.5/site-packages/sbws/core/scanner.py", line 257, in dispatch_worker_thread
    return measure_relay(*a, **kw)
  File "/home/mtraudt/.pyenv/versions/3.5.6/envs/sbws-venv-3.5.6/lib/python3.5/site-packages/sbws/core/scanner.py", line 171, in measure_relay
    dest = destinations.next()
  File "/home/mtraudt/.pyenv/versions/3.5.6/envs/sbws-venv-3.5.6/lib/python3.5/site-packages/sbws/lib/destination.py", line 251, in next
    self._perform_usability_test()
  File "/home/mtraudt/.pyenv/versions/3.5.6/envs/sbws-venv-3.5.6/lib/python3.5/site-packages/sbws/lib/destination.py", line 182, in _perform_usability_test
    possible_exits = [e for e in self._rl.exits
  File "/home/mtraudt/.pyenv/versions/3.5.6/envs/sbws-venv-3.5.6/lib/python3.5/site-packages/sbws/lib/destination.py", line 183, in <listcomp>
    if e.can_exit_to(dest.hostname, dest.port)]
  File "/home/mtraudt/.pyenv/versions/3.5.6/envs/sbws-venv-3.5.6/lib/python3.5/site-packages/sbws/lib/relaylist.py", line 123, in can_exit_to
    host = resolve(host)[0]
  File "/home/mtraudt/.pyenv/versions/3.5.6/envs/sbws-venv-3.5.6/lib/python3.5/site-packages/sbws/globals.py", line 71, in resolve
    for result in socket.getaddrinfo(hostname, 0):
  File "/home/mtraudt/.pyenv/versions/3.5.6/lib/python3.5/socket.py", line 733, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
2018-10-21 11:09:45,926 ERROR Thread-10 scanner.py:314 - closure - Unhandled exception caught while measuring ViDiSrv: <class 'socket.gaierror'> [Errno -2] Name or service not known

Branch incoming.

Child Tickets

Change History (6)

comment:1 Changed 12 months ago by pastly

Status: newneeds_review

https://github.com/torproject/sbws/pull/278

Make sure CI passes before merging.

Looks like GitHub is still having a ton of ongoing issues after their outage yesterday.

comment:2 Changed 12 months ago by juga

Status: needs_reviewneeds_revision

Invalid syntax: there is a semicolon at the end of the line

comment:3 Changed 12 months ago by pastly

Status: needs_revisionneeds_review

Oops. Made a commit yesterday to fix that but didn't push it to the right place.

comment:4 Changed 12 months ago by juga

Status: needs_reviewmerge_ready

Happens :)

comment:5 Changed 12 months ago by juga

Resolution: fixed
Status: merge_readyclosed

Merged

comment:6 Changed 11 months ago by teor

Keywords: sbws-1.0-must-closed-moved-20181128 added
Milestone: sbws 1.0 (MVP must)sbws: 1.0.x-final

Move all closed sbws 1.0 must tickets to sbws 1.0.x-final

Note: See TracTickets for help on using tickets.