Current 'cell-processed-cells' entries (an extrainfo descriptor attribute) sometimes has negative values. Moving from irc...
14:47 < atagar> karsten: Should 'cell-processed-cells' extrainfo entries allowfor negative values? Spec describes it as 'Mean number of processed cells percircuit' but I'm spotting values like...14:47 < atagar> cell-processed-cells -5644,65,22,10,5,4,2,1,1,115:07 < rransom> atagar: That looks like a Tor bug.15:37 < atagar> thanks, I'll move to a ticket then
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items
0
Link issues together to show that they're related.
Learn more.
In order to calculate the 6839 in the first line, the relay summed up cells processed for the loudest 308806 circuits, that is, 2111924234 (close to INT32_MAX), and then divided by those 308806 to come up with the mean number of 6839 cells per circuit. When calculating the -5923 in the second line, the sum didn't fit into an integer, because there were 356842 circuits per decile.
See branch task-5849 in my public repo which is based on maint-0.2.2. Note that the patch is untested.
I just asked Moritz to test this branch (or rather, a freshly rebased branch called task-5849-2) on a TorServers relay.
Assigning to 0.2.3.x-final, even though the bug was introduced in 0.2.2.1 and the fix is trivial. But the bug is harmless and I hear we leave 0.2.2.x alone unless fixes are critical.
Are those casts to uint64_t really necessary? They look like cargo-cultism to me. In any binary operation between a uint64_t and a uint32_t, the uint32_t should be promoted to uint64_t losslessly.
In any binary operation between a uint64_t and an int, the int will get converted to a uint64_t anyway (with the possibility of undesirable results if the int is negative). Maybe circs_in_share should be an unsigned type.
Ah, right. It's the very same patch, only rebased to master.
Are those casts to uint64_t really necessary? They look like cargo-cultism to me. In any binary operation between a uint64_t and a uint32_t, the uint32_t should be promoted to uint64_t losslessly.
In any binary operation between a uint64_t and an int, the int will get converted to a uint64_t anyway (with the possibility of undesirable results if the int is negative). Maybe circs_in_share should be an unsigned type.
Sounds reasonable. Pushed a new (fixup) commit to task-5849-3.
I'll watch Moritz' relay for a few more days which still runs the non-fixed-up commit. That should tell us whether the bug is fixed or not. Or do you think I should tell him to git pull and restart his relay?
No need to tell him to pull; the change is minor. Actually, I'm going to merge this branch today anyway, since it appears to be obviously right, and fixes a bug, even if we don't yet know whether it's the fix for this bug. Please comment on this ticket, reopening if necessary, once we know whether it solves the bug for Moritz?
Trac: Resolution: N/Ato fixed Status: needs_review to closed