[tor-bugs] #27228 [Core Tor/Tor]: pathbias_should_count(): Bug: Circuit X is now being counted

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Aug 20 23:12:19 UTC 2018


#27228: pathbias_should_count(): Bug: Circuit X is now being counted
--------------------------+------------------------------------
 Reporter:  traumschule   |          Owner:  (none)
     Type:  defect        |         Status:  new
 Priority:  Medium        |      Milestone:  Tor: 0.3.5.x-final
Component:  Core Tor/Tor  |        Version:  Tor: unspecified
 Severity:  Normal        |     Resolution:
 Keywords:                |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+------------------------------------

Comment (by traumschule):

 {{{
 $ git log --pretty=oneline -S "is now being counted"
 b4ebf8421ada3edf104ae5fc96d288f11271445b Move pathbias functions into a
 new file.
 6828a19670080a3d19bdddf1e55d53928d81a410 Add a tristate to guard against
 unexpected circ purpose transitions
 $ git checkout b4ebf8421ada3edf104ae5fc96d288f11271445b
 $ rgrep "is now being counted despite being ignored" -n
 src/or/circpathbias.c:335:              "Circuit %d is now being counted
 despite being ignored "
 $ git checkout 6828a19670080a3d19bdddf1e55d53928d81a410
 $ rgrep "is now being counted despite being ignored" -n
 src/or/circuitbuild.c:1414:              "Circuit %d is now being counted
 despite being ignored "
 $ gitk
 }}}
 > Author: Mike Perry <mikeperry-git at fscked.org>  2013-01-30 22:46:25
 > Committer: Nick Mathewson <nickm at torproject.org>  2013-02-01 23:01:12
 > Parent: 173ed05d2f7233371dfcb1ef32a4d95f5096c435 (Clarify state
 transition and related pathbias comments)
 > Follows: tor-0.2.4.9-alpha
 > Precedes: tor-0.2.4.10-alpha
 {{{
 +    /* Check to see if the shouldcount result has changed due to a
 +     * unexpected purpose change that would affect our results.
 +     *
 +     * The reason we check the path state too here is because for the
 +     * cannibalized versions of these purposes, we count them as
 successful
 +     * before their purpose change.
 +     */
 +    if (circ->pathbias_shouldcount == PATHBIAS_SHOULDCOUNT_COUNTED
 +            && circ->path_state != PATH_STATE_ALREADY_COUNTED) {
 +      log_info(LD_BUG,
 +               "Circuit %d is now being ignored despite being counted "
 +               "in the past. Purpose is %s, path state is %s",
 +               circ->global_identifier,
 +               circuit_purpose_to_string(circ->base_.purpose),
 +               pathbias_state_to_string(circ->path_state));
 +    }
 +    circ->pathbias_shouldcount = PATHBIAS_SHOULDCOUNT_IGNORED;
      return 0;
    }
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/27228#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list