Opened 3 years ago

Closed 3 years ago

#13389 closed defect (fixed)

If no authorities votes on a BadExit flag, doctor crashes

Reported by: tom Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/DocTor Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Parse consensuses without any BadExit votes. Doctor crashes with the following error

Traceback (most recent call last):
  File "./consensus_health_checker.py", line 744, in <module>
    main()
  File "./consensus_health_checker.py", line 243, in main
    issues += run_checks(consensuses, votes)
  File "./consensus_health_checker.py", line 325, in run_checks
    issues = checker(latest_consensus, consensuses, votes)
  File "./consensus_health_checker.py", line 649, in bad_exits_in_sync
    agreed_bad_exits = set.intersection(*bad_exits.values())
TypeError: descriptor 'intersection' of 'set' object needs an argument

Child Tickets

Change History (2)

comment:1 Changed 3 years ago by tom

Fixing this may be as simple as

@@ -609,6 +646,8 @@ def bad_exits_in_sync(latest_consensus, consensuses, votes):
       bad_exits[authority] = set(flagged)

   voting_authorities = set(bad_exits.keys())
+  if not voting_authorities:
+    return
   agreed_bad_exits = set.intersection(*bad_exits.values())
   disagreed_bad_exits = set.union(*bad_exits.values()).difference(agreed_bad_exits)

comment:2 Changed 3 years ago by atagar

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.