Opened 5 years ago

Closed 5 years ago

#16330 closed defect (fixed)

BridgeDB isn't parsing server descriptors because Stem is choking on a line

Reported by: isis Owned by: isis
Priority: Very High Milestone:
Component: Circumvention/BridgeDB Version:
Severity: Keywords: bridgedb-parsers, bridgedb-0.3.3
Cc: isis Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


WARNING:root:This Python version is too old! It doesn't support new-style buffer interfaces:
Traceback (most recent call last):
  File "/home/bridgedb/virtualenvs/bridgedb/bin/bridgedb", line 5, in <module>
    pkg_resources.run_script('bridgedb==0.3.2-dirty', 'bridgedb')
  File "/usr/lib/python2.7/dist-packages/", line 499, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/", line 1235, in run_script
    execfile(script_filename, namespace, namespace)
  File "/srv/", line 31, in <module>
  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.3.2_dirty-py2.7.egg/bridgedb/", line 499, in run
    emailDistributor, ipDistributor = reload(False)
  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.3.2_dirty-py2.7.egg/bridgedb/", line 425, in reload
    load(state, splitter, clear=False)
  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.3.2_dirty-py2.7.egg/bridgedb/", line 137, in load
    serverdescriptors = descriptors.parseServerDescriptorsFile(filename)
  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.3.2_dirty-py2.7.egg/bridgedb/parse/", line 144, in parseServerDescriptorsFile
    routers = list(document)
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/stem/descriptor/", line 169, in parse_file
    for desc in handler(descriptor_file, descriptor_type, validate, document_handler, **kwargs):
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/stem/descriptor/", line 234, in _parse_file_for_path
    for desc in parse_file(desc_file, *args, **kwargs):
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/stem/descriptor/", line 219, in parse_file
    for desc in file_parser(descriptor_file):
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/stem/descriptor/", line 269, in _parse_metrics_file
    for desc in stem.descriptor.server_descriptor._parse_file(descriptor_file, is_bridge = False, validate = validate, **kwargs):
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/stem/descriptor/", line 170, in _parse_file
    yield RelayDescriptor(descriptor_text, validate, annotations, **kwargs)
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/stem/descriptor/", line 674, in __init__
    super(RelayDescriptor, self).__init__(raw_contents, validate, annotations)
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/stem/descriptor/", line 539, in __init__
    self._parse(entries, validate)
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/stem/descriptor/", line 494, in _parse
    raise exc
ValueError: extra-info-digest line had an invalid value (should be 40 hex characters): extra-info-digest 24EAF6D76B81EF9DC51B5B913812EBCFA8535639 BlGu+TfQKcL46aQ/PZvnsub6ki+YvO9iEagu6jZHpA0

This also means that BridgeDB won't start/restart.

Child Tickets

Change History (4)

comment:3 Changed 5 years ago by isis

In addition, after re-reviewing BridgeDB's error handling in bridgedb.Main.load(), the implementation there is lacking quite a bit of error handling, which should increase the BridgeDB's robustness for the next time it suddenly starts seeing very odd bridge descriptors.

Sorry for the lack of clarity — I was panicking since it's late and the servers wouldn't restart. I meant for this ticket to be a problem with BridgeDB's handling of Stem's handling.

comment:4 Changed 5 years ago by isis

Keywords: bridgedb-0.3.3 added
Resolution: fixed
Status: newclosed

Fixed in my fix/16330-eid-sds-2-fields branch and merged for bridgedb-0.3.3. There's also integration tests with examples of the new Ed25519 descriptors to ensure from now on that we can parse them.

Note: See TracTickets for help on using tickets.