Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#1805 closed defect (fixed)

Frequently repeated [Warning] Weighted bandwidth is 0.000000 ... when using bridges

Reported by: phobos Owned by: mikeperry
Priority: High Milestone: Tor: 0.2.2.x-final
Component: Core Tor/Tor Version: Tor: 0.2.2.x-final
Severity: Keywords: easy
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


When using bridges, the following log message repeats every few seconds:

[Warning] Weighted bandwidth is 0.000000 in node selection for rule weight as guard

I have two bridges configured, both are online and available. Other than the bridges, this is a default install of the vidalia bundle for ubuntu 10.04 running tor

Child Tickets

Change History (9)

comment:1 Changed 10 years ago by nickm

Milestone: Tor: 0.2.2.x-final
Owner: set to mikeperry
Status: newassigned

comment:2 Changed 10 years ago by arma

Keywords: easy added
Priority: normalmajor

We should fix this before 0.2.2.x-rc.

I believe the fix is to not log the warning in this situation.

comment:3 Changed 10 years ago by Sebastian

This doesn't normally happen when you use a bridge except when the bridge has a bandwidth capacity of 0, which can of course happen with new/private/unused bridges. See the related bug #1912 which I noticed when looking at this. Getting rid of the warn is easy, see bug1805 in my repo for that. Depending on what we decide for #1912 though it might be a redundant fix.

comment:4 Changed 10 years ago by tractor

Just for note: this bug could be more complicated than just a loud warn. Warn could happen not only with the zero capacity of the bridge(s).

See conditions: DBL_TO_U64(weighted_bw), with weighted_bw += weight*this_bw; and means of a weight with DBL_TO_U64().

comment:5 Changed 10 years ago by Sebastian

Status: assignedneeds_review

Hm. I think my patch would remove the warning in this case too, no?

comment:6 Changed 10 years ago by arma

tractor: I didn't understand your comment. Are you talking about a round-off error where going from DBL to U64 could end up rounding to 0 even if it is not quite zero? Or something else?

Sebastian: I think your bug1805 is fine to put in. Even if we resolve #1912, we will want something like this patch to handle the case where the controller postdescs some descriptors that have 0 bandwidth, and then we load balance over them. (I'm not sure if this can happen in practice, but one day I'd like it to be able to happen.)

comment:7 Changed 10 years ago by arma

Your comment says "Dont't"

+ int have_unknown = 0; /< sl contains element not in consensus. */
should say /* rather than /
since doxygen comments are not intended for local variables inside functions

comment:8 Changed 10 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Hrm. I think it's okay to merge. Even it this doesn't fix every case of the warning, we probably want to hear about the others anyway, and it does fix the one we've been seeing.

Fixing comments, merging, closing for now.

comment:9 Changed 8 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.