Opened 6 years ago

Closed 3 years ago

#14327 closed defect (fixed)

bwauth crash when one or more of the relay classes are not measured

Reported by: ln5 Owned by: aagbsn
Priority: Medium Milestone:
Component: Core Tor/Torflow Version:
Severity: Blocker Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


This code will crash when one or more of the relay classes are not
represented in 'nodes', i.e. when c_node is empty:

for cl in ["Guard+Exit", "Guard", "Exit", "Middle"]:

c_nodes = filter(lambda n: n.node_class() == cl, nodes.itervalues())
true_filt_avg[cl] = sum(map(lambda n: n.filt_bw, c_nodes))/float(len(c_node\
true_strm_avg[cl] = sum(map(lambda n: n.strm_bw, c_nodes))/float(len(c_node\


true_circ_avg[cl] = sum(map(lambda n: (1.0-n.circ_fail_rate),


Child Tickets

Change History (3)

comment:1 Changed 6 years ago by cypherpunks

Status: newneeds_information

Interesting. In order to determine which condition results in there being none of a given node class in nodes it would be helpful to see bw.log snippets.

comment:2 Changed 6 years ago by ln5

I don't have them. Please just make sure the program don't crashes when one or more is missing.

comment:3 Changed 3 years ago by teor

Resolution: fixed
Severity: Blocker
Status: needs_informationclosed

Duplicate of #20467, fixed in a8abac7.

Note: See TracTickets for help on using tickets.