Trac issueshttps://gitlab.torproject.org/legacy/trac/-/issues2020-06-13T15:32:14Zhttps://gitlab.torproject.org/legacy/trac/-/issues/27879Remove pathbias code2020-06-13T15:32:14ZtraumschuleRemove pathbias codeThis is blocked by #26886.
mikeperry in comment:7:issue:27228:
> I think it is fine to remove all of the pathbias code once we get a tagging resistant cipher in place, such as https://gitweb.torproject.org/torspec.git/tree/proposals/295...This is blocked by #26886.
mikeperry in comment:7:issue:27228:
> I think it is fine to remove all of the pathbias code once we get a tagging resistant cipher in place, such as https://gitweb.torproject.org/torspec.git/tree/proposals/295-relay-crypto-with-atl.txt
Hoping for further guidance in any case i will just try this. We'll see if i end up with a stable tor.
Once this is merged unresolved pathbias bugs become obsolete and it might make #16764, #21084, #25783 easier.Tor: unspecifiedhttps://gitlab.torproject.org/legacy/trac/-/issues/19535A can't-happen case for one-hop circuits actually can happen2020-06-13T15:29:47ZAndrea ShepardA can't-happen case for one-hop circuits actually can happenOn commit 4dc7b3ca2825741311b6b849ed109053c643ee23, using the controller EXTENDCIRCUIT command to create a new circuit like this:
`EXTENDCIRCUIT 0 0744F2AE098BAD9F1A0FEF109C01E621FB6A4600`
causes this log message:
```
Jun 30 12:50:44....On commit 4dc7b3ca2825741311b6b849ed109053c643ee23, using the controller EXTENDCIRCUIT command to create a new circuit like this:
`EXTENDCIRCUIT 0 0744F2AE098BAD9F1A0FEF109C01E621FB6A4600`
causes this log message:
```
Jun 30 12:50:44.000 [info] pathbias_should_count(): Bug: One-hop circuit has length 1. Path state is new. Circuit is a General-purpose client currently doing handshakes. (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] tor_bug_occurred_(): Bug: src/or/circpathbias.c:362: pathbias_should_count: This line should not have been reached. (Future instances of this warning will be silenced.) (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: Line unexpectedly reached at pathbias_should_count at src/or/circpathbias.c:362. Stack trace: (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /home/andrea/tor/test/ticket18640/tor-1182ecb3127a6e67f8ff0c5fc0d28e0a3c25ba4b-post(log_backtrace+0x2f) [0x55f6e9] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /home/andrea/tor/test/ticket18640/tor-1182ecb3127a6e67f8ff0c5fc0d28e0a3c25ba4b-post(tor_bug_occurred_+0x18e) [0x578780] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /home/andrea/tor/test/ticket18640/tor-1182ecb3127a6e67f8ff0c5fc0d28e0a3c25ba4b-post() [0x4bcc40] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /home/andrea/tor/test/ticket18640/tor-1182ecb3127a6e67f8ff0c5fc0d28e0a3c25ba4b-post(pathbias_count_build_attempt+0x23) [0x4bcd8d] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /home/andrea/tor/test/ticket18640/tor-1182ecb3127a6e67f8ff0c5fc0d28e0a3c25ba4b-post(circuit_finish_handshake+0x1c) [0x4c2ea6] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /home/andrea/tor/test/ticket18640/tor-1182ecb3127a6e67f8ff0c5fc0d28e0a3c25ba4b-post() [0x4dc1af] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /home/andrea/tor/test/ticket18640/tor-1182ecb3127a6e67f8ff0c5fc0d28e0a3c25ba4b-post(command_process_cell+0xa2) [0x4db6ab] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /home/andrea/tor/test/ticket18640/tor-1182ecb3127a6e67f8ff0c5fc0d28e0a3c25ba4b-post(channel_queue_cell+0x207) [0x4b1b32] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /home/andrea/tor/test/ticket18640/tor-1182ecb3127a6e67f8ff0c5fc0d28e0a3c25ba4b-post(channel_tls_handle_cell+0x2b0) [0x4b79ea] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /home/andrea/tor/test/ticket18640/tor-1182ecb3127a6e67f8ff0c5fc0d28e0a3c25ba4b-post() [0x50c28d] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /home/andrea/tor/test/ticket18640/tor-1182ecb3127a6e67f8ff0c5fc0d28e0a3c25ba4b-post(connection_or_process_inbuf+0x141) [0x509038] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /home/andrea/tor/test/ticket18640/tor-1182ecb3127a6e67f8ff0c5fc0d28e0a3c25ba4b-post() [0x4fd4c7] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /home/andrea/tor/test/ticket18640/tor-1182ecb3127a6e67f8ff0c5fc0d28e0a3c25ba4b-post() [0x4fac08] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /home/andrea/tor/test/ticket18640/tor-1182ecb3127a6e67f8ff0c5fc0d28e0a3c25ba4b-post(connection_handle_read+0x1d) [0x4fad32] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /home/andrea/tor/test/ticket18640/tor-1182ecb3127a6e67f8ff0c5fc0d28e0a3c25ba4b-post() [0x43045c] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5(event_base_loop+0x7fc) [0x7ffff76883dc] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /home/andrea/tor/test/ticket18640/tor-1182ecb3127a6e67f8ff0c5fc0d28e0a3c25ba4b-post() [0x4335ed] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /home/andrea/tor/test/ticket18640/tor-1182ecb3127a6e67f8ff0c5fc0d28e0a3c25ba4b-post() [0x433753] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /home/andrea/tor/test/ticket18640/tor-1182ecb3127a6e67f8ff0c5fc0d28e0a3c25ba4b-post(do_main_loop+0x41b) [0x43352e] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /home/andrea/tor/test/ticket18640/tor-1182ecb3127a6e67f8ff0c5fc0d28e0a3c25ba4b-post(tor_main+0xfd) [0x43772b] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /home/andrea/tor/test/ticket18640/tor-1182ecb3127a6e67f8ff0c5fc0d28e0a3c25ba4b-post(main+0x20) [0x42efd6] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7ffff6870b45] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
Jun 30 12:50:44.000 [warn] Bug: /home/andrea/tor/test/ticket18640/tor-1182ecb3127a6e67f8ff0c5fc0d28e0a3c25ba4b-post() [0x42eee9] (on Tor 0.2.9.0-alpha-dev 1182ecb3127a6e67)
```Tor: unspecifiedhttps://gitlab.torproject.org/legacy/trac/-/issues/24903Bug: Line unexpectedly reached at pathbias_should_count at src/or/circpathbia...2020-06-13T15:29:47ZstarlightBug: Line unexpectedly reached at pathbias_should_count at src/or/circpathbias.c:372Experienced bug-check while testing an explict exit with:
```
setconf __DisablePredictedCircuits=1
setconf ExcludeExitNodes={c1},{c2},{c3}
setconf SocksPort="x.x.x.x:x NoIsolateSOCKSAuth NoIsolateClientProtocol NoIsolateClientAddr NoIso...Experienced bug-check while testing an explict exit with:
```
setconf __DisablePredictedCircuits=1
setconf ExcludeExitNodes={c1},{c2},{c3}
setconf SocksPort="x.x.x.x:x NoIsolateSOCKSAuth NoIsolateClientProtocol NoIsolateClientAddr NoIsolateDestAddr NoIsolateDestPort"
setconf ExitNodes=X
```
```
Bug: Line unexpectedly reached at pathbias_should_count at src/or/circpathbias.c:372.
Stack trace: (on Tor 0.3.2.9 9e8b762fcecfece6)
log_backtrace src/common/backtrace.c:108
tor_bug_occurred_ src/common/util_bug.c:118
pathbias_should_count *src/or/circpathbias.c:372
pathbias_count_build_attempt src/or/circpathbias.c:418
circuit_finish_handshake src/or/circuitbuild.c:1479
src/or/command.c:424
command_process_cell src/or/command.c:209
channel_tls_handle_cell src/or/channeltls.c:1152
src/or/connection_or.c:2095
src/or/connection.c:3468
src/or/main.c:738
event_base_loop event.c:1373
do_main_loop src/or/main.c:2637
tor_main src/or/main.c:3780
main src/or/tor_main.c:35
```Tor: 0.2.9.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/27228pathbias_should_count(): Bug: Circuit X is now being counted2020-06-13T15:29:47Ztraumschulepathbias_should_count(): Bug: Circuit X is now being countedLooking through my tor.log I found 64 lines like this during the last day (out of 66 BUG lines):
```
Aug 20 03:09:58.000 [info] {BUG} pathbias_should_count(): Bug: Circuit 355 is now being counted despite being ignored in the past. Purpo...Looking through my tor.log I found 64 lines like this during the last day (out of 66 BUG lines):
```
Aug 20 03:09:58.000 [info] {BUG} pathbias_should_count(): Bug: Circuit 355 is now being counted despite being ignored in the past. Purpose is Measuring circuit timeout, path state is new (on Tor 0.3.5.0-alpha-dev )
```
The other BUGs were:
```
Aug 20 03:19:00.000 [info] {BUG} pathbias_count_build_success(): Bug: Succeeded circuit is in strange path state new. Circuit is a Measuring circuit timeout currently open. (on Tor 0.3.5.0-alpha-dev )
Aug 20 03:19:03.000 [info] {CIRC} extend_info_from_node(): Including Ed25519 ID for $name at $address
```
(Maybe relevant: #24966, #24903, #19535, #8196, #8081)Tor: unspecifiedtraumschuletraumschulehttps://gitlab.torproject.org/legacy/trac/-/issues/20362Bug: Used circuit is in strange path state new2020-06-13T15:02:04ZTracBug: Used circuit is in strange path state newTor software encountered an internal bug:
pathbias_count_use_attempt(): Bug: Used circuit is in strange path state new. Circuit is a General-purpose client currently open. (on Tor 0.2.8.7 263088633a63982a)
**Trac**:
**Username**: liorTor software encountered an internal bug:
pathbias_count_use_attempt(): Bug: Used circuit is in strange path state new. Circuit is a General-purpose client currently open. (on Tor 0.2.8.7 263088633a63982a)
**Trac**:
**Username**: liorTor: unspecifiedhttps://gitlab.torproject.org/legacy/trac/-/issues/19288Document circuitpathbias in detail2020-06-13T14:58:14ZNick MathewsonDocument circuitpathbias in detailWe have some tricky abstractions and patterns here that could use more documentation.We have some tricky abstractions and patterns here that could use more documentation.Tor: unspecifiedhttps://gitlab.torproject.org/legacy/trac/-/issues/12401Document EntryGuardPathBias in doc/state-contents.txt2020-06-13T14:36:53ZGeorge KadianakisDocument EntryGuardPathBias in doc/state-contents.txtWe should document the newly added `EntryGuardPathBias` and `EntryGuardPathUseBias` to `doc/state-contents.txt`.We should document the newly added `EntryGuardPathBias` and `EntryGuardPathUseBias` to `doc/state-contents.txt`.Tor: unspecifiedhttps://gitlab.torproject.org/legacy/trac/-/issues/10922tor connected to bwauth produces lots of pathbias_count_use_attempt BUG messages2020-06-13T14:34:12ZSebastian Hahntor connected to bwauth produces lots of pathbias_count_use_attempt BUG messagesI'm setting up a new bwauth currently. I'm seeing many (~1000 / hour) BUG messages in its logfile:
[notice] Tor 0.2.4.20 (git-0d50b03673670de6) opening new log file.
[notice] pathbias_count_use_attempt(): Bug: Used circuit is in strange...I'm setting up a new bwauth currently. I'm seeing many (~1000 / hour) BUG messages in its logfile:
[notice] Tor 0.2.4.20 (git-0d50b03673670de6) opening new log file.
[notice] pathbias_count_use_attempt(): Bug: Used circuit is in strange path state new. Circuit is a General-purpose client currently open.
The config for the tor process (it is a relay to evade static throttling):
```
SocksPort 9110
ControlPort 9111
Log notice file ./data/tor/tor.log
DataDirectory ./data/tor
PidFile ./data/tor/tor.pid
CookieAuthentication 1
Nickname gabelmoobwscan
RelayBandwidthRate 20480
RelayBandwidthBurst 20480
OrPort 9999
ContactInfo Sebastian <tor@sebastianhahn.net>
ExitPolicy reject *:*
```Tor: unspecifiedhttps://gitlab.torproject.org/legacy/trac/-/issues/8962pathbias_count_use_attempt strange path state log lines2020-06-13T14:29:22ZTracpathbias_count_use_attempt strange path state log lines"pathbias_count_use_attempt(): Bug: Used circuit is in strange path state build attempted. Circuit is a General-purpose client currently open.
**Trac**:
**Username**: jefnag"pathbias_count_use_attempt(): Bug: Used circuit is in strange path state build attempted. Circuit is a General-purpose client currently open.
**Trac**:
**Username**: jefnagTor: unspecifiedhttps://gitlab.torproject.org/legacy/trac/-/issues/8160Create separate pending counters during circuit construction2020-06-13T14:27:08ZMike PerryCreate separate pending counters during circuit constructionWhile testing the path bias code, I noticed a source of rounding error when we scaled our counts down while circuits are open. I corrected for this by counting the number of open circuits during scaling and subtracting that from our coun...While testing the path bias code, I noticed a source of rounding error when we scaled our counts down while circuits are open. I corrected for this by counting the number of open circuits during scaling and subtracting that from our counts where appropriate, but a better fix might be to actually store separate pending counters that we don't transfer into the official, scaled counters until circuit closure.Tor: unspecified