Opened 3 years ago

Closed 3 years ago

#19448 closed defect (duplicate)

Total bandwidth incorrectly computed - missing non-guardfraction bw

Reported by: amj703 Owned by:
Priority: Medium Milestone:
Component: Core Tor Version: Tor: 0.2.8.4-rc
Severity: Normal Keywords: regression, 029-proposed
Cc: asn Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

In or/dirvote.c, lines 1074-1085 we have that

  if (rs->has_guardfraction) {
    guardfraction_bandwidth_t guardfraction_bw;

    tor_assert(is_guard);

    guard_get_guardfraction_bandwidth(&guardfraction_bw,
                                      rs->bandwidth_kb,
                                      rs->guardfraction_percentage);

    default_bandwidth = guardfraction_bw.guard_bw;
    guardfraction_bandwidth = guardfraction_bw.non_guard_bw;
  }

However, then in line 1093, we have

  *T += default_bandwidth;

T here is the total bandwidth, for use in load balancing. I believe that it should hold that T = G+M+E+D, and it used to (in 0.2.5, before guardfractions were added). However, T now is missing the fraction of the guard bandwidth that is considered "non-guard" due to the use of guardfractions.

Child Tickets

Change History (2)

comment:1 Changed 3 years ago by arma

Keywords: regression 029-proposed added

comment:2 Changed 3 years ago by asn

Resolution: duplicate
Status: newclosed

Hello amj703,

thanks for independently finding this bug. Good catch!

That said, this bug is already filed as #16255 so I'll close this as a duplicate if you don't mind (there is even a patch).

As a matter of fact, this bug is the current main blocker of the guardfraction feature. Currently, all dirauths have guardfraction disabled because of this.

I think the next step is someone to test the patch and make sure that the feature works. I have tested it on a small chutney network so far and it seemed to work, but I don't have enough time to test more robustly and help dirauths deploy it. I wonder if we can find someone interested in this...

[Closing this ticket for now. Let me know if you want it open.]

Note: See TracTickets for help on using tickets.