Tor issueshttps://gitlab.torproject.org/tpo/core/tor/-/issues2024-01-30T15:49:43Zhttps://gitlab.torproject.org/tpo/core/tor/-/issues/40891Allow BandwidthFiles without the dollar sign in `node_id` KeyValue2024-01-30T15:49:43ZjugaAllow BandwidthFiles without the dollar sign in `node_id` KeyValueAs commented at tpo/core/torspec#241As commented at tpo/core/torspec#241jugajugahttps://gitlab.torproject.org/tpo/core/tor/-/issues/40876Tor has extra guard connections2023-11-09T17:11:33ZMike PerryTor has extra guard connectionsWe lowered the number of directory guards to 2 in part because I suspected it was causing extra guard connections to get made and kept open, leading to fingerprinting: https://gitlab.torproject.org/tpo/network-health/team/-/issues/325
H...We lowered the number of directory guards to 2 in part because I suspected it was causing extra guard connections to get made and kept open, leading to fingerprinting: https://gitlab.torproject.org/tpo/network-health/team/-/issues/325
However, a forum user pointed out that their Tor is using 3 guards still: https://forum.torproject.org/t/tor-browser-connecting-to-3-guard-relays-simultaneously/9819
I also just checked my Tor, and it is using 4 guards...
So there definitely is some problem with Tor opening too many guard connections, and then just keeping them open for as long as it wants.Tor: 0.4.8.x-post-stableMike PerryMike Perryhttps://gitlab.torproject.org/tpo/core/tor/-/issues/40875From coverity: possible memory leak. (CID 1547857)2023-10-30T16:52:23ZNick MathewsonFrom coverity: possible memory leak. (CID 1547857)```
*** CID 1547857: Resource leaks (RESOURCE_LEAK)
/src/core/or/connection_edge.c: 4239 in connection_exit_begin_resolve()
4233 case DOS_STREAM_DEFENSE_NONE:
4234 break;
4235 case DOS_STREAM_DEFENSE_REFUSE_ST...```
*** CID 1547857: Resource leaks (RESOURCE_LEAK)
/src/core/or/connection_edge.c: 4239 in connection_exit_begin_resolve()
4233 case DOS_STREAM_DEFENSE_NONE:
4234 break;
4235 case DOS_STREAM_DEFENSE_REFUSE_STREAM:
4236 dns_send_resolved_error_cell(dummy_conn, RESOLVED_TYPE_ERROR_TRANSIENT);
4237 return 0;
4238 case DOS_STREAM_DEFENSE_CLOSE_CIRCUIT:
>>> CID 1547857: Resource leaks (RESOURCE_LEAK)
>>> Variable "dummy_conn" going out of scope leaks the storage it points to.
4239 return -END_CIRC_REASON_RESOURCELIMIT;
4240 }
4241
4242 /* send it off to the gethostbyname farm */
4243 switch (dns_resolve(dummy_conn)) {
4244 case -1: /* Impossible to resolve; a resolved cell was sent. */
```trinity-1686atrinity-1686ahttps://gitlab.torproject.org/tpo/core/tor/-/issues/40871Tor incorrectly stores stats on incoming PT connections2023-12-10T21:38:18ZAlexander Færøyahf@torproject.orgTor incorrectly stores stats on incoming PT connections@trinity-1686a and @dcf discussed this issue on tor-dev@ in https://lists.torproject.org/pipermail/tor-dev/2023-October/014858.html
It seems like we have a bug after we updated our connectiong tracking code to track incoming connections...@trinity-1686a and @dcf discussed this issue on tor-dev@ in https://lists.torproject.org/pipermail/tor-dev/2023-October/014858.html
It seems like we have a bug after we updated our connectiong tracking code to track incoming connections earlier. We don't handle the transport name parameter of our eager call to `geoip_note_client_seen()`.
@trinity-1686a may potentially have a patch for this. I think it would be good if we could get some testing on this before we merge it.
Would you be up for running your Tor instance with a patch that potentially fixes this issue, @dcf ?Tor: 0.4.8.x-post-stabletrinity-1686atrinity-1686ahttps://gitlab.torproject.org/tpo/core/tor/-/issues/40859Cleanup ci-driver.sh after 0.4.3 and 0.4.5 is a thing of the past2023-09-21T13:03:17ZAlexander Færøyahf@torproject.orgCleanup ci-driver.sh after 0.4.3 and 0.4.5 is a thing of the pastThis is a placeholder ticket for !586 which does some general clean-up of our CI driver script.This is a placeholder ticket for !586 which does some general clean-up of our CI driver script.Tor: 0.4.7.x-post-stableAlexander Færøyahf@torproject.orgAlexander Færøyahf@torproject.orghttps://gitlab.torproject.org/tpo/core/tor/-/issues/40850Make it possible to run a PoW onion service with a minimum effort level for t...2023-09-05T21:09:16ZAlexander Færøyahf@torproject.orgMake it possible to run a PoW onion service with a minimum effort level for test purposesSome folks have asked if it's possible to run Tor in a way where you manually specifiy a min. effort level for a PoW enabled Onion Service. This allows them to test the overhead of PoW and figure out good values to use as maximum efforts...Some folks have asked if it's possible to run Tor in a way where you manually specifiy a min. effort level for a PoW enabled Onion Service. This allows them to test the overhead of PoW and figure out good values to use as maximum efforts they are willing to solve.
I think the feature should make it such that Tor *always* uses the given effort level when it is specified, thus changing the behaver slightly with that PoW won't be disabled even if there is no activity for the PoW.
Discussed with @beth and @arma on IRC earlier today.Alexander Færøyahf@torproject.orgAlexander Færøyahf@torproject.orghttps://gitlab.torproject.org/tpo/core/tor/-/issues/40848tor_bug_occurred_: Bug: ./src/feature/relay/routerkeys.h:56: relay_key_is_una...2023-09-12T14:42:45Ztlator_bug_occurred_: Bug: ./src/feature/relay/routerkeys.h:56: relay_key_is_unavailable_: This line should not have been reached. (on Tor 0.4.8.4 6d6bd21b9d364302)### Summary
[warn] tor_bug_occurred_: Bug: ./src/feature/relay/routerkeys.h:56: relay_key_is_unavailable_: This line should not have been reached. (on Tor 0.4.8.4 6d6bd21b9d364302)
This happens at least on iOS and macOS.
I have also s...### Summary
[warn] tor_bug_occurred_: Bug: ./src/feature/relay/routerkeys.h:56: relay_key_is_unavailable_: This line should not have been reached. (on Tor 0.4.8.4 6d6bd21b9d364302)
This happens at least on iOS and macOS.
I have also seen this in older versions. Not just me, users report it, too:
https://github.com/guardianproject/orbot-apple/issues/76
### Steps to reproduce:
1. git clone https://github.com/iCepa/Tor.framework
2. cd Tor.framework
3. pod install
4. open Example/Tor.xcworkspace
5. run Tor-Example or Tor-Example-Mac
### What is the current bug behavior?
Everything keeps working, but debug log shows this:
```
Aug 30 12:08:01.023 [notice] Tor 0.4.8.4 (git-6d6bd21b9d364302) running on Darwin with Libevent 2.1.12-stable, OpenSSL 3.1.2, Zlib 1.2.11, Liblzma 5.4.4, Libzstd N/A and Unknown N/A as libc.
Aug 30 12:08:01.023 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://support.torproject.org/faq/staying-anonymous/
Aug 30 12:08:01.023 [notice] Configuration file "/Users/berhart/Library/Developer/CoreSimulator/Devices/D3204428-26B1-4C55-8177-B3057F6F67AC/data/Containers/Data/Application/C659E399-A46C-4058-8F8E-86E3EFA82568/.torrc" not present, using reasonable defaults.
Aug 30 12:08:01.025 [notice] Opening Socks listener on 127.0.0.1:9050
Aug 30 12:08:01.025 [notice] Opened Socks listener connection (ready) on 127.0.0.1:9050
Aug 30 12:08:01.025 [notice] Opening Control listener on 127.0.0.1:0
Aug 30 12:08:01.026 [notice] Control listener listening on port 52975.
Aug 30 12:08:01.026 [notice] Opened Control listener connection (ready) on 127.0.0.1:52975
Aug 30 12:08:01.000 [notice] Parsing GEOIP IPv4 file /Users/berhart/Library/Developer/CoreSimulator/Devices/D3204428-26B1-4C55-8177-B3057F6F67AC/data/Containers/Bundle/Application/6DBEF322-E91E-4DF6-9058-F54252ED7E54/Tor-Example.app/Frameworks/Tor.framework/GeoIP.bundle/geoip.
Aug 30 12:08:01.000 [notice] Parsing GEOIP IPv6 file /Users/berhart/Library/Developer/CoreSimulator/Devices/D3204428-26B1-4C55-8177-B3057F6F67AC/data/Containers/Bundle/Application/6DBEF322-E91E-4DF6-9058-F54252ED7E54/Tor-Example.app/Frameworks/Tor.framework/GeoIP.bundle/geoip6.
Aug 30 12:08:01.000 [notice] Bootstrapped 0% (starting): Starting
Aug 30 12:08:14.000 [notice] Starting with guard context "default"
Aug 30 12:08:14.000 [warn] tor_bug_occurred_: Bug: ./src/feature/relay/routerkeys.h:56: relay_key_is_unavailable_: This line should not have been reached. (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: Tor 0.4.8.4 (git-6d6bd21b9d364302): Line unexpectedly reached at relay_key_is_unavailable_ at ./src/feature/relay/routerkeys.h:56. Stack trace: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 0 Tor 0x0000000101ed4254 log_backtrace_impl + 104 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 1 Tor 0x0000000101ee18ec tor_bug_occurred_ + 324 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 2 Tor 0x0000000101e71580 server_onion_keys_new + 64 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 3 Tor 0x0000000101e133a0 worker_state_new + 48 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 4 Tor 0x0000000101ed857c threadpool_new + 256 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 5 Tor 0x0000000101e132d8 cpuworker_init + 128 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 6 Tor 0x0000000101e513c4 run_tor_main_loop + 200 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 7 Tor 0x0000000101e516bc tor_run_main + 312 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 8 Tor 0x00000001019c3a9c -[TORThread main] + 324 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 9 Foundation 0x0000000180851578 __NSThread__start__ + 792 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 10 libsystem_pthread.dylib 0x00000001cc0b3428 _pthread_start + 116 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 11 libsystem_pthread.dylib 0x00000001cc0ae648 thread_start + 8 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] tor_bug_occurred_: Bug: ./src/feature/relay/routerkeys.h:56: relay_key_is_unavailable_: This line should not have been reached. (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: Tor 0.4.8.4 (git-6d6bd21b9d364302): Line unexpectedly reached at relay_key_is_unavailable_ at ./src/feature/relay/routerkeys.h:56. Stack trace: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 0 Tor 0x0000000101ed4254 log_backtrace_impl + 104 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 1 Tor 0x0000000101ee18ec tor_bug_occurred_ + 324 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 2 Tor 0x0000000101e71580 server_onion_keys_new + 64 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 3 Tor 0x0000000101e133a0 worker_state_new + 48 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 4 Tor 0x0000000101ed857c threadpool_new + 256 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 5 Tor 0x0000000101e132d8 cpuworker_init + 128 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 6 Tor 0x0000000101e513c4 run_tor_main_loop + 200 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 7 Tor 0x0000000101e516bc tor_run_main + 312 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 8 Tor 0x00000001019c3a9c -[TORThread main] + 324 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 9 Foundation 0x0000000180851578 __NSThread__start__ + 792 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 10 libsystem_pthread.dylib 0x00000001cc0b3428 _pthread_start + 116 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 11 libsystem_pthread.dylib 0x00000001cc0ae648 thread_start + 8 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] tor_bug_occurred_: Bug: ./src/feature/relay/routerkeys.h:56: relay_key_is_unavailable_: This line should not have been reached. (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: Tor 0.4.8.4 (git-6d6bd21b9d364302): Line unexpectedly reached at relay_key_is_unavailable_ at ./src/feature/relay/routerkeys.h:56. Stack trace: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 0 Tor 0x0000000101ed4254 log_backtrace_impl + 104 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 1 Tor 0x0000000101ee18ec tor_bug_occurred_ + 324 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 2 Tor 0x0000000101e71580 server_onion_keys_new + 64 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 3 Tor 0x0000000101e133a0 worker_state_new + 48 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 4 Tor 0x0000000101ed857c threadpool_new + 256 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 5 Tor 0x0000000101e132d8 cpuworker_init + 128 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 6 Tor 0x0000000101e513c4 run_tor_main_loop + 200 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 7 Tor 0x0000000101e516bc tor_run_main + 312 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 8 Tor 0x00000001019c3a9c -[TORThread main] + 324 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 9 Foundation 0x0000000180851578 __NSThread__start__ + 792 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 10 libsystem_pthread.dylib 0x00000001cc0b3428 _pthread_start + 116 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 11 libsystem_pthread.dylib 0x00000001cc0ae648 thread_start + 8 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] tor_bug_occurred_: Bug: ./src/feature/relay/routerkeys.h:56: relay_key_is_unavailable_: This line should not have been reached. (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: Tor 0.4.8.4 (git-6d6bd21b9d364302): Line unexpectedly reached at relay_key_is_unavailable_ at ./src/feature/relay/routerkeys.h:56. Stack trace: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 0 Tor 0x0000000101ed4254 log_backtrace_impl + 104 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 1 Tor 0x0000000101ee18ec tor_bug_occurred_ + 324 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 2 Tor 0x0000000101e71580 server_onion_keys_new + 64 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 3 Tor 0x0000000101e133a0 worker_state_new + 48 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 4 Tor 0x0000000101ed857c threadpool_new + 256 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 5 Tor 0x0000000101e132d8 cpuworker_init + 128 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 6 Tor 0x0000000101e513c4 run_tor_main_loop + 200 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 7 Tor 0x0000000101e516bc tor_run_main + 312 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 8 Tor 0x00000001019c3a9c -[TORThread main] + 324 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 9 Foundation 0x0000000180851578 __NSThread__start__ + 792 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 10 libsystem_pthread.dylib 0x00000001cc0b3428 _pthread_start + 116 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 11 libsystem_pthread.dylib 0x00000001cc0ae648 thread_start + 8 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] tor_bug_occurred_: Bug: ./src/feature/relay/routerkeys.h:56: relay_key_is_unavailable_: This line should not have been reached. (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: Tor 0.4.8.4 (git-6d6bd21b9d364302): Line unexpectedly reached at relay_key_is_unavailable_ at ./src/feature/relay/routerkeys.h:56. Stack trace: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 0 Tor 0x0000000101ed4254 log_backtrace_impl + 104 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 1 Tor 0x0000000101ee18ec tor_bug_occurred_ + 324 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 2 Tor 0x0000000101e71580 server_onion_keys_new + 64 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 3 Tor 0x0000000101e133a0 worker_state_new + 48 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 4 Tor 0x0000000101ed857c threadpool_new + 256 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 5 Tor 0x0000000101e132d8 cpuworker_init + 128 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 6 Tor 0x0000000101e513c4 run_tor_main_loop + 200 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 7 Tor 0x0000000101e516bc tor_run_main + 312 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 8 Tor 0x00000001019c3a9c -[TORThread main] + 324 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 9 Foundation 0x0000000180851578 __NSThread__start__ + 792 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 10 libsystem_pthread.dylib 0x00000001cc0b3428 _pthread_start + 116 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 11 libsystem_pthread.dylib 0x00000001cc0ae648 thread_start + 8 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] tor_bug_occurred_: Bug: ./src/feature/relay/routerkeys.h:56: relay_key_is_unavailable_: This line should not have been reached. (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: Tor 0.4.8.4 (git-6d6bd21b9d364302): Line unexpectedly reached at relay_key_is_unavailable_ at ./src/feature/relay/routerkeys.h:56. Stack trace: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 0 Tor 0x0000000101ed4254 log_backtrace_impl + 104 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 1 Tor 0x0000000101ee18ec tor_bug_occurred_ + 324 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 2 Tor 0x0000000101e71580 server_onion_keys_new + 64 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 3 Tor 0x0000000101e133a0 worker_state_new + 48 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 4 Tor 0x0000000101ed857c threadpool_new + 256 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 5 Tor 0x0000000101e132d8 cpuworker_init + 128 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 6 Tor 0x0000000101e513c4 run_tor_main_loop + 200 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 7 Tor 0x0000000101e516bc tor_run_main + 312 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 8 Tor 0x00000001019c3a9c -[TORThread main] + 324 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 9 Foundation 0x0000000180851578 __NSThread__start__ + 792 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 10 libsystem_pthread.dylib 0x00000001cc0b3428 _pthread_start + 116 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 11 libsystem_pthread.dylib 0x00000001cc0ae648 thread_start + 8 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] tor_bug_occurred_: Bug: ./src/feature/relay/routerkeys.h:56: relay_key_is_unavailable_: This line should not have been reached. (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: Tor 0.4.8.4 (git-6d6bd21b9d364302): Line unexpectedly reached at relay_key_is_unavailable_ at ./src/feature/relay/routerkeys.h:56. Stack trace: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 0 Tor 0x0000000101ed4254 log_backtrace_impl + 104 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 1 Tor 0x0000000101ee18ec tor_bug_occurred_ + 324 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 2 Tor 0x0000000101e71580 server_onion_keys_new + 64 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 3 Tor 0x0000000101e133a0 worker_state_new + 48 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 4 Tor 0x0000000101ed857c threadpool_new + 256 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 5 Tor 0x0000000101e132d8 cpuworker_init + 128 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 6 Tor 0x0000000101e513c4 run_tor_main_loop + 200 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 7 Tor 0x0000000101e516bc tor_run_main + 312 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 8 Tor 0x00000001019c3a9c -[TORThread main] + 324 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 9 Foundation 0x0000000180851578 __NSThread__start__ + 792 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 10 libsystem_pthread.dylib 0x00000001cc0b3428 _pthread_start + 116 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 11 libsystem_pthread.dylib 0x00000001cc0ae648 thread_start + 8 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] tor_bug_occurred_: Bug: ./src/feature/relay/routerkeys.h:56: relay_key_is_unavailable_: This line should not have been reached. (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: Tor 0.4.8.4 (git-6d6bd21b9d364302): Line unexpectedly reached at relay_key_is_unavailable_ at ./src/feature/relay/routerkeys.h:56. Stack trace: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 0 Tor 0x0000000101ed4254 log_backtrace_impl + 104 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 1 Tor 0x0000000101ee18ec tor_bug_occurred_ + 324 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 2 Tor 0x0000000101e71580 server_onion_keys_new + 64 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 3 Tor 0x0000000101e133a0 worker_state_new + 48 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 4 Tor 0x0000000101ed857c threadpool_new + 256 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 5 Tor 0x0000000101e132d8 cpuworker_init + 128 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 6 Tor 0x0000000101e513c4 run_tor_main_loop + 200 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 7 Tor 0x0000000101e516bc tor_run_main + 312 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 8 Tor 0x00000001019c3a9c -[TORThread main] + 324 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 9 Foundation 0x0000000180851578 __NSThread__start__ + 792 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 10 libsystem_pthread.dylib 0x00000001cc0b3428 _pthread_start + 116 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 11 libsystem_pthread.dylib 0x00000001cc0ae648 thread_start + 8 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] tor_bug_occurred_: Bug: ./src/feature/relay/routerkeys.h:56: relay_key_is_unavailable_: This line should not have been reached. (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: Tor 0.4.8.4 (git-6d6bd21b9d364302): Line unexpectedly reached at relay_key_is_unavailable_ at ./src/feature/relay/routerkeys.h:56. Stack trace: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 0 Tor 0x0000000101ed4254 log_backtrace_impl + 104 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 1 Tor 0x0000000101ee18ec tor_bug_occurred_ + 324 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 2 Tor 0x0000000101e71580 server_onion_keys_new + 64 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 3 Tor 0x0000000101e133a0 worker_state_new + 48 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 4 Tor 0x0000000101ed857c threadpool_new + 256 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 5 Tor 0x0000000101e132d8 cpuworker_init + 128 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 6 Tor 0x0000000101e513c4 run_tor_main_loop + 200 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 7 Tor 0x0000000101e516bc tor_run_main + 312 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 8 Tor 0x00000001019c3a9c -[TORThread main] + 324 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 9 Foundation 0x0000000180851578 __NSThread__start__ + 792 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 10 libsystem_pthread.dylib 0x00000001cc0b3428 _pthread_start + 116 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 11 libsystem_pthread.dylib 0x00000001cc0ae648 thread_start + 8 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] tor_bug_occurred_: Bug: ./src/feature/relay/routerkeys.h:56: relay_key_is_unavailable_: This line should not have been reached. (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: Tor 0.4.8.4 (git-6d6bd21b9d364302): Line unexpectedly reached at relay_key_is_unavailable_ at ./src/feature/relay/routerkeys.h:56. Stack trace: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 0 Tor 0x0000000101ed4254 log_backtrace_impl + 104 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 1 Tor 0x0000000101ee18ec tor_bug_occurred_ + 324 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 2 Tor 0x0000000101e71580 server_onion_keys_new + 64 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 3 Tor 0x0000000101e133a0 worker_state_new + 48 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 4 Tor 0x0000000101ed857c threadpool_new + 256 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 5 Tor 0x0000000101e132d8 cpuworker_init + 128 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 6 Tor 0x0000000101e513c4 run_tor_main_loop + 200 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 7 Tor 0x0000000101e516bc tor_run_main + 312 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 8 Tor 0x00000001019c3a9c -[TORThread main] + 324 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 9 Foundation 0x0000000180851578 __NSThread__start__ + 792 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 10 libsystem_pthread.dylib 0x00000001cc0b3428 _pthread_start + 116 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [warn] Bug: 11 libsystem_pthread.dylib 0x00000001cc0ae648 thread_start + 8 (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 30 12:08:14.000 [notice] New control connection opened from 127.0.0.1.
2023-08-30 12:08:14.446361+0200 Tor-Example[9047:362250] authenticated success=1
2023-08-30 12:08:14.446749+0200 Tor-Example[9047:362251] established=0
Aug 30 12:08:15.000 [notice] Bootstrapped 5% (conn): Connecting to a relay
Aug 30 12:08:15.000 [notice] Bootstrapped 10% (conn_done): Connected to a relay
Aug 30 12:08:15.000 [notice] Bootstrapped 14% (handshake): Handshaking with a relay
Aug 30 12:08:15.000 [notice] Bootstrapped 15% (handshake_done): Handshake with a relay done
Aug 30 12:08:15.000 [notice] Bootstrapped 75% (enough_dirinfo): Loaded enough directory info to build circuits
Aug 30 12:08:15.000 [notice] Bootstrapped 90% (ap_handshake_done): Handshake finished with a relay to build circuits
Aug 30 12:08:15.000 [notice] Bootstrapped 95% (circuit_create): Establishing a Tor circuit
Aug 30 12:08:16.000 [notice] Bootstrapped 100% (done): Done
2023-08-30 12:08:16.044047+0200 Tor-Example[9047:362251] established=1
2023-08-30 12:08:17.063880+0200 Tor-Example[9047:362251] Circuits: (
"<TORCircuit: 0x6000022ee530> circuitId=1, status=EXTENDED, nodes=(\n \"<TORNode: 0x600001c8d900> fingerprint=$2B1FF21E30BA75F43F696E0634489C806408E3F8, nickName=noWarPlz, ipv4Address=62.101.228.30, ipv6Address=(null), countryCode=no, localizedCountryName=Norway\",\n \"<TORNode: 0x600001c8d8c0> fingerprint=$9BA9334DA769A7C96D464F9EA38A970088B6FECB, nickName=FASHIONCLEFT, ipv4Address=95.217.223.54, ipv6Address=2a01:4f9:c010:9ed2::1, countryCode=fi, localizedCountryName=Finland\"\n), buildFlags=(\n \"NEED_CAPACITY\",\n \"NEED_UPTIME\"\n), purpose=CONFLUX_UNLINKED, hsState=(null), rendQuery=(null), timeCreated=2023-08-30 10:08:15 +0000, reason=(null), remoteReason=(null), socksUsername=(null), socksPassword=(null), raw=1 EXTENDED $2B1FF21E30BA75F43F696E0634489C806408E3F8~noWarPlz,$9BA9334DA769A7C96D464F9EA38A970088B6FECB~FASHIONCLEFT BUILD_FLAGS=NEED_CAPACITY,NEED_UPTIME PURPOSE=CONFLUX_UNLINKED TIME_CREATED=2023-08-30T10:08:15.450637]",
"<TORCircuit: 0x6000022ee5a0> circuitId=2, status=EXTENDED, nodes=(\n \"<TORNode: 0x600001c944c0> fingerprint=$780004EAD7B2B96C26AB320713BAAA7BC246B862, nickName=salentrakain, ipv4Address=185.195.237.116, ipv6Address=(null), countryCode=ee, localizedCountryName=Estonia\",\n \"<TORNode: 0x600001c945c0> fingerprint=$E04861C32098EF38D6BB2AEFEC81095953FEF0ED, nickName=willwallace, ipv4Address=95.217.72.151, ipv6Address=2a01:4f9:4a:1812::2, countryCode=fi, localizedCountryName=Finland\"\n), buildFlags=(\n \"NEED_CAPACITY\",\n \"NEED_UPTIME\"\n), purpose=CONFLUX_UNLINKED, hsState=(null), rendQuery=(null), timeCreated=2023-08-30 10:08:15 +0000, reason=(null), remoteReason=(null), socksUsername=(null), socksPassword=(null), raw=2 EXTENDED $780004EAD7B2B96C26AB320713BAAA7BC246B862~salentrakain,$E04861C32098EF38D6BB2AEFEC81095953FEF0ED~willwallace BUILD_FLAGS=NEED_CAPACITY,NEED_UPTIME PURPOSE=CONFLUX_UNLINKED TIME_CREATED=2023-08-30T10:08:15.459137]",
"<TORCircuit: 0x6000022ee8b0> circuitId=3, status=BUILT, nodes=(\n \"<TORNode: 0x600001c94540> fingerprint=$2B1FF21E30BA75F43F696E0634489C806408E3F8, nickName=noWarPlz, ipv4Address=62.101.228.30, ipv6Address=(null), countryCode=no, localizedCountryName=Norway\",\n \"<TORNode: 0x600001c94740> fingerprint=$EEA85567CD7EBEB1CBC70AEE97C45E0019BDBDF9, nickName=jstark1809n0n0n0, ipv4Address=194.32.107.206, ipv6Address=2a03:94e0:ffff:194:32:107:0:206, countryCode=no, localizedCountryName=Norway\",\n \"<TORNode: 0x600001c947c0> fingerprint=$4E60DE549B3B4C063E6035BCDAA69DD4F3AE3C4D, nickName=Chimera2, ipv4Address=149.56.22.133, ipv6Address=2607:5300:61:785::, countryCode=ca, localizedCountryName=Canada\"\n), buildFlags=(\n \"NEED_CAPACITY\"\n), purpose=GENERAL, hsState=(null), rendQuery=(null), timeCreated=2023-08-30 10:08:15 +0000, reason=(null), remoteReason=(null), socksUsername=(null), socksPassword=(null), raw=3 BUILT $2B1FF21E30BA75F43F696E0634489C806408E3F8~noWarPlz,$EEA85567CD7EBEB1CBC70AEE97C45E0019BDBDF9~jstark1809n0n0n0,$4E60DE549B3B4C063E6035BCDAA69DD4F3AE3C4D~Chimera2 BUILD_FLAGS=NEED_CAPACITY PURPOSE=GENERAL TIME_CREATED=2023-08-30T10:08:15.463437]"
)
2023-08-30 12:08:17.075981+0200 Tor-Example[9047:362251] Elapsed Time: 1.031664
```
### What is the expected behavior?
Bug not happening.
### Environment
- Which version of Tor are you using? See first lines of log. 0.4.8.4
- Which operating system are you using? For example: iOS 15.5 in simulator, macOS Ventura 13.5.1
- Which installation method did you use? Git; see "steps to reproduce"
### Relevant logs and/or screenshots
### Possible fixesAlexander Færøyahf@torproject.orgAlexander Færøyahf@torproject.orghttps://gitlab.torproject.org/tpo/core/tor/-/issues/40844tor 0.4.8.4: two test failures on NetBSD2023-08-30T18:21:26Zwiztor 0.4.8.4: two test failures on NetBSDUpdating tor in pkgsrc to 0.4.8.4 I see two new test failures (compared to 0.4.6 which tested without any errors).
From the `test-suite.log`:
```
FAIL: src/test/test-slow
========================
slow/crypto/s2k_rfc2440: OK
slow/crypto/...Updating tor in pkgsrc to 0.4.8.4 I see two new test failures (compared to 0.4.6 which tested without any errors).
From the `test-suite.log`:
```
FAIL: src/test/test-slow
========================
slow/crypto/s2k_rfc2440: OK
slow/crypto/s2k_pbkdf2: OK
slow/crypto/s2k_rfc2440_general: OK
slow/crypto/s2k_rfc2440_legacy: OK
slow/crypto/s2k_errors: OK
slow/crypto/scrypt_vectors: SKIPPED
slow/crypto/pbkdf2_vectors: OK
slow/crypto/pwbox: OK
slow/crypto/fuzz_donna/ed25519_donna: [forking] OK
slow/crypto/fuzz_donna/ed25519_ref10: [forking] OK
slow/crypto/equix:
FAIL src/test/test_crypto_slow.c:684: assert(result OP_EQ EQUIX_OK): 5 vs 0
[equix FAILED]
slow/process/callbacks: OK
slow/process/callbacks_terminate: OK
slow/process/nonexistent_executable: OK
slow/hs_pow/vectors: OK
slow/prob_distr/stochastic_genpareto: [forking] OK
slow/prob_distr/stochastic_geometric: [forking] OK
slow/prob_distr/stochastic_uniform: [forking] OK
slow/prob_distr/stochastic_logistic: [forking] OK
slow/prob_distr/stochastic_log_logistic: [forking] OK
slow/prob_distr/stochastic_weibull: [forking] OK
slow/ptr/int_voidstar_interop: OK
slow/ptr/uint_voidstar_interop: OK
1/22 TESTS FAILED. (1 skipped)
FAIL src/test/test-slow (exit status: 1)
```
and
```
FAIL: src/test/unittest_part3.sh
================================
...
crypto/validation/ed25519_donna: OK
crypto/validation/ed25519_ref10: OK
crypto/ed25519_storage: OK
crypto/siphash: OK
crypto/blake2b: OK
crypto/hashx:
FAIL src/test/test_crypto.c:3017: assert(retval OP_EQ HASHX_OK): 4 vs 0
[hashx FAILED]
crypto/failure_modes: [forking] OK
crypto/ope/consistency: OK
crypto/ope/oob: OK
crypto/ope/vectors: OK
crypto/openssl/rng_engine: [forking] OK
crypto/openssl/base64_encode_match: [forking] OK
crypto/pem/encode: OK
crypto/pem/decode: OK
crypto/pem/decode_crlf: OK
...
```Micah Elizabeth ScottMicah Elizabeth Scotthttps://gitlab.torproject.org/tpo/core/tor/-/issues/40843tor 0.4.8.4: compilation error on NetBSD2023-08-30T18:21:26Zwiztor 0.4.8.4: compilation error on NetBSDI tried updating the pkgsrc package from the 0.4.7 branch to 0.4.8.4, but got an error:
```
--- src/ext/equix/hashx/src/libhashx_a-virtual_memory.o ---
src/ext/equix/hashx/src/virtual_memory.c: In function 'hashx_vm_alloc_huge':
src/ext/...I tried updating the pkgsrc package from the 0.4.7 branch to 0.4.8.4, but got an error:
```
--- src/ext/equix/hashx/src/libhashx_a-virtual_memory.o ---
src/ext/equix/hashx/src/virtual_memory.c: In function 'hashx_vm_alloc_huge':
src/ext/equix/hashx/src/virtual_memory.c:113:5: error: 'MAP_HUGETLB' undeclared (first use in this function)
113 | | MAP_HUGETLB | MAP_POPULATE, -1, 0);
| ^~~~~~~~~~~
src/ext/equix/hashx/src/virtual_memory.c:113:5: note: each undeclared identifier is reported only once for each function it appears in
src/ext/equix/hashx/src/virtual_memory.c:113:19: error: 'MAP_POPULATE' undeclared (first use in this function); did you mean 'MAP_PRIVATE'?
113 | | MAP_HUGETLB | MAP_POPULATE, -1, 0);
| ^~~~~~~~~~~~
| MAP_PRIVATE
```
These defines do not exist on NetBSD (and I suspect on other BSDs neither, e.g. FreeBSD doesn't mention it in https://man.freebsd.org/cgi/man.cgi?query=mmap&apropos=0&sektion=0&manpath=FreeBSD+13.2-RELEASE+and+Ports&arch=default&format=html).
Please make the code conditional on these defines existing.Micah Elizabeth ScottMicah Elizabeth Scotthttps://gitlab.torproject.org/tpo/core/tor/-/issues/40842Non-fatal assertion !(smartlist_len(cfx->legs) <= 0) failed in conflux_pick_f...2023-12-06T16:54:59ZPeter GerberNon-fatal assertion !(smartlist_len(cfx->legs) <= 0) failed in conflux_pick_first_leg at src/core/or/conflux.c:565### Summary
Since I upgraded to 0.4.8.4 (from 0.4.8.3-rc) I've been seeing the following error:
```
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: Tor 0.4.8.4 (git-6d6bd21b9d364302): Non-fatal assertion !(smartlist_len(cfx->legs) <= 0)...### Summary
Since I upgraded to 0.4.8.4 (from 0.4.8.3-rc) I've been seeing the following error:
```
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: Tor 0.4.8.4 (git-6d6bd21b9d364302): Non-fatal assertion !(smartlist_len(cfx->legs) <= 0) failed in conflux_pick_first_leg at src/core/or/conflux.c:565. Stack trace: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(log_backtrace_impl+0x57) [0x5853d2aeed97] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(tor_bug_occurred_+0x169) [0x5853d2af9ce9] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(conflux_decide_next_circ+0x3fe) [0x5853d2b8b66e] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(circuit_get_package_window+0x3d) [0x5853d2b9108d] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(+0x95bd7) [0x5853d2a99bd7] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(connection_edge_package_raw_inbuf+0xa1) [0x5853d2a9bbd1] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(connection_edge_process_inbuf+0x66) [0x5853d2ba81f6] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(+0x19cb16) [0x5853d2ba0b16] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(+0x70359) [0x5853d2a74359] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(+0x21585) [0x7e2bdb469585] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(event_base_loop+0x49f) [0x7e2bdb469c1f] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(do_main_loop+0xf1) [0x5853d2a75661] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(tor_run_main+0x1e5) [0x5853d2a70f95] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(tor_main+0x59) [0x5853d2a6d319] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(main+0x19) [0x5853d2a6ced9] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /lib/x86_64-linux-gnu/libc.so.6(+0x271ca) [0x7e2bdab6a1ca] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x7e2bdab6a285] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(_start+0x21) [0x5853d2a6cf21] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: conflux_pick_first_leg(): Bug: Matching client sets: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: conflux_log_set(): Bug: Conflux 36ED52A99B9B1D95: 0 linked, 0 launched (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: conflux_pick_first_leg(): Bug: Matching server sets: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: conflux_log_set(): Bug: Conflux 36ED52A99B9B1D95: 0 linked, 0 launched (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: conflux_pick_first_leg(): Bug: End conflux set dump (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: tor_bug_occurred_(): Bug: src/core/or/conflux.c:565: conflux_pick_first_leg: Non-fatal assertion !(smartlist_len(cfx->legs) <= 0) failed. (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: Tor 0.4.8.4 (git-6d6bd21b9d364302): Non-fatal assertion !(smartlist_len(cfx->legs) <= 0) failed in conflux_pick_first_leg at src/core/or/conflux.c:565. Stack trace: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(log_backtrace_impl+0x57) [0x5853d2aeed97] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(tor_bug_occurred_+0x169) [0x5853d2af9ce9] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(conflux_decide_next_circ+0x3fe) [0x5853d2b8b66e] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(circuit_get_package_window+0x3d) [0x5853d2b9108d] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(+0x95bd7) [0x5853d2a99bd7] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(connection_edge_package_raw_inbuf+0xa1) [0x5853d2a9bbd1] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(connection_edge_process_inbuf+0x66) [0x5853d2ba81f6] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(+0x19d004) [0x5853d2ba1004] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(+0x70359) [0x5853d2a74359] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(+0x21585) [0x7e2bdb469585] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(event_base_loop+0x49f) [0x7e2bdb469c1f] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(do_main_loop+0xf1) [0x5853d2a75661] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(tor_run_main+0x1e5) [0x5853d2a70f95] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(tor_main+0x59) [0x5853d2a6d319] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(main+0x19) [0x5853d2a6ced9] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /lib/x86_64-linux-gnu/libc.so.6(+0x271ca) [0x7e2bdab6a1ca] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x7e2bdab6a285] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: Bug: /usr/bin/tor(_start+0x21) [0x5853d2a6cf21] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: conflux_pick_first_leg(): Bug: Matching client sets: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: conflux_log_set(): Bug: Conflux 36ED52A99B9B1D95: 0 linked, 0 launched (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: conflux_pick_first_leg(): Bug: Matching server sets: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: conflux_log_set(): Bug: Conflux 36ED52A99B9B1D95: 0 linked, 0 launched (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 01:43:21 host Tor-relay0[1977034]: conflux_pick_first_leg(): Bug: End conflux set dump (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: tor_bug_occurred_(): Bug: src/core/or/conflux.c:565: conflux_pick_first_leg: Non-fatal assertion !(smartlist_len(cfx->legs) <= 0) failed. (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: Tor 0.4.8.4 (git-6d6bd21b9d364302): Non-fatal assertion !(smartlist_len(cfx->legs) <= 0) failed in conflux_pick_first_leg at src/core/or/conflux.c:565. Stack trace: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(log_backtrace_impl+0x57) [0x5853d2aeed97] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(tor_bug_occurred_+0x169) [0x5853d2af9ce9] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(conflux_decide_next_circ+0x3fe) [0x5853d2b8b66e] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(circuit_get_package_window+0x3d) [0x5853d2b9108d] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(+0x95bd7) [0x5853d2a99bd7] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(connection_edge_package_raw_inbuf+0xa1) [0x5853d2a9bbd1] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(connection_edge_process_inbuf+0x66) [0x5853d2ba81f6] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(+0x19cb16) [0x5853d2ba0b16] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(+0x70359) [0x5853d2a74359] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(+0x21585) [0x7e2bdb469585] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(event_base_loop+0x49f) [0x7e2bdb469c1f] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(do_main_loop+0xf1) [0x5853d2a75661] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(tor_run_main+0x1e5) [0x5853d2a70f95] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(tor_main+0x59) [0x5853d2a6d319] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(main+0x19) [0x5853d2a6ced9] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /lib/x86_64-linux-gnu/libc.so.6(+0x271ca) [0x7e2bdab6a1ca] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x7e2bdab6a285] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(_start+0x21) [0x5853d2a6cf21] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: conflux_pick_first_leg(): Bug: Matching client sets: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: conflux_log_set(): Bug: Conflux A9C38A44F68539F0: 0 linked, 0 launched (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: conflux_pick_first_leg(): Bug: Matching server sets: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: conflux_log_set(): Bug: Conflux A9C38A44F68539F0: 0 linked, 0 launched (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: conflux_pick_first_leg(): Bug: End conflux set dump (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: tor_bug_occurred_(): Bug: src/core/or/conflux.c:565: conflux_pick_first_leg: Non-fatal assertion !(smartlist_len(cfx->legs) <= 0) failed. (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: Tor 0.4.8.4 (git-6d6bd21b9d364302): Non-fatal assertion !(smartlist_len(cfx->legs) <= 0) failed in conflux_pick_first_leg at src/core/or/conflux.c:565. Stack trace: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(log_backtrace_impl+0x57) [0x5853d2aeed97] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(tor_bug_occurred_+0x169) [0x5853d2af9ce9] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(conflux_decide_next_circ+0x3fe) [0x5853d2b8b66e] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(circuit_get_package_window+0x3d) [0x5853d2b9108d] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(+0x95bd7) [0x5853d2a99bd7] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(connection_edge_package_raw_inbuf+0xa1) [0x5853d2a9bbd1] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(connection_edge_process_inbuf+0x66) [0x5853d2ba81f6] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(+0x19d004) [0x5853d2ba1004] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(+0x70359) [0x5853d2a74359] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(+0x21585) [0x7e2bdb469585] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(event_base_loop+0x49f) [0x7e2bdb469c1f] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(do_main_loop+0xf1) [0x5853d2a75661] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(tor_run_main+0x1e5) [0x5853d2a70f95] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(tor_main+0x59) [0x5853d2a6d319] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(main+0x19) [0x5853d2a6ced9] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /lib/x86_64-linux-gnu/libc.so.6(+0x271ca) [0x7e2bdab6a1ca] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x7e2bdab6a285] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: Bug: /usr/bin/tor(_start+0x21) [0x5853d2a6cf21] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: conflux_pick_first_leg(): Bug: Matching client sets: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: conflux_log_set(): Bug: Conflux A9C38A44F68539F0: 0 linked, 0 launched (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: conflux_pick_first_leg(): Bug: Matching server sets: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: conflux_log_set(): Bug: Conflux A9C38A44F68539F0: 0 linked, 0 launched (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 17:43:02 host Tor-relay0[1977034]: conflux_pick_first_leg(): Bug: End conflux set dump (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: tor_bug_occurred_(): Bug: src/core/or/conflux.c:565: conflux_pick_first_leg: Non-fatal assertion !(smartlist_len(cfx->legs) <= 0) failed. (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: Tor 0.4.8.4 (git-6d6bd21b9d364302): Non-fatal assertion !(smartlist_len(cfx->legs) <= 0) failed in conflux_pick_first_leg at src/core/or/conflux.c:565. Stack trace: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(log_backtrace_impl+0x57) [0x578c64619d97] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(tor_bug_occurred_+0x169) [0x578c64624ce9] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(conflux_decide_next_circ+0x3fe) [0x578c646b666e] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(circuit_get_package_window+0x3d) [0x578c646bc08d] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(+0x95bd7) [0x578c645c4bd7] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(connection_edge_package_raw_inbuf+0xa1) [0x578c645c6bd1] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(connection_edge_process_inbuf+0x66) [0x578c646d31f6] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(+0x19cb16) [0x578c646cbb16] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(+0x70359) [0x578c6459f359] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(+0x21585) [0x708318e9e585] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(event_base_loop+0x49f) [0x708318e9ec1f] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(do_main_loop+0xf1) [0x578c645a0661] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(tor_run_main+0x1e5) [0x578c6459bf95] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(tor_main+0x59) [0x578c64598319] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(main+0x19) [0x578c64597ed9] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /lib/x86_64-linux-gnu/libc.so.6(+0x271ca) [0x70831858a1ca] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x70831858a285] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(_start+0x21) [0x578c64597f21] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: conflux_pick_first_leg(): Bug: Matching client sets: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: conflux_log_set(): Bug: Conflux 5AC0CD28AE0575FA: 0 linked, 0 launched (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: conflux_pick_first_leg(): Bug: Matching server sets: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: conflux_log_set(): Bug: Conflux 5AC0CD28AE0575FA: 0 linked, 0 launched (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: conflux_pick_first_leg(): Bug: End conflux set dump (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: tor_bug_occurred_(): Bug: src/core/or/conflux.c:565: conflux_pick_first_leg: Non-fatal assertion !(smartlist_len(cfx->legs) <= 0) failed. (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: Tor 0.4.8.4 (git-6d6bd21b9d364302): Non-fatal assertion !(smartlist_len(cfx->legs) <= 0) failed in conflux_pick_first_leg at src/core/or/conflux.c:565. Stack trace: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(log_backtrace_impl+0x57) [0x578c64619d97] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(tor_bug_occurred_+0x169) [0x578c64624ce9] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(conflux_decide_next_circ+0x3fe) [0x578c646b666e] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(circuit_get_package_window+0x3d) [0x578c646bc08d] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(+0x95bd7) [0x578c645c4bd7] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(connection_edge_package_raw_inbuf+0xa1) [0x578c645c6bd1] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(connection_edge_process_inbuf+0x66) [0x578c646d31f6] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(+0x19d004) [0x578c646cc004] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(+0x70359) [0x578c6459f359] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(+0x21585) [0x708318e9e585] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(event_base_loop+0x49f) [0x708318e9ec1f] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(do_main_loop+0xf1) [0x578c645a0661] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(tor_run_main+0x1e5) [0x578c6459bf95] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(tor_main+0x59) [0x578c64598319] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(main+0x19) [0x578c64597ed9] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /lib/x86_64-linux-gnu/libc.so.6(+0x271ca) [0x70831858a1ca] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x70831858a285] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: Bug: /usr/bin/tor(_start+0x21) [0x578c64597f21] (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: conflux_pick_first_leg(): Bug: Matching client sets: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: conflux_log_set(): Bug: Conflux 5AC0CD28AE0575FA: 0 linked, 0 launched (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: conflux_pick_first_leg(): Bug: Matching server sets: (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: conflux_log_set(): Bug: Conflux 5AC0CD28AE0575FA: 0 linked, 0 launched (on Tor 0.4.8.4 6d6bd21b9d364302)
Aug 24 18:47:09 host Tor-relay1[1977028]: conflux_pick_first_leg(): Bug: End conflux set dump (on Tor 0.4.8.4 6d6bd21b9d364302)
```
### Environment
- Tor 0.4.8.4 6d6bd21b9d364302
- Debian 12 "bookworm"
- Compiled from sourceTor: 0.4.8.x-post-stableMike PerryMike Perryhttps://gitlab.torproject.org/tpo/core/tor/-/issues/40841conflux_validate_legs(): Bug: Number of legs is above maximum of 2 allowed: 3...2023-08-30T18:21:26ZMike Perryconflux_validate_legs(): Bug: Number of legs is above maximum of 2 allowed: 3#012 (on Tor 0.4.8.3-rc-dev )A cypherpunks user reported some logspam due to this BUG check as a random comment in https://gitlab.torproject.org/tpo/core/tor/-/issues/40834#note_2935264. Initially, this looks like a rogue Tor client hitting this check. This has neve...A cypherpunks user reported some logspam due to this BUG check as a random comment in https://gitlab.torproject.org/tpo/core/tor/-/issues/40834#note_2935264. Initially, this looks like a rogue Tor client hitting this check. This has never happened in a Shadow run.
This is harmless, but noisy. It is also at warn and not protocol warn.
We could remove the BUG() and demote to ProtocolWarn, but should have a look through the client codepaths for cases that could somehow spawn 3 legs instead of 2, just in case.Tor: 0.4.8.x-stableMike PerryMike Perryhttps://gitlab.torproject.org/tpo/core/tor/-/issues/40839MetricsPort Counter for "Bug" Events2024-03-26T07:07:34Zapplied_privacyMetricsPort Counter for "Bug" Events### Summary
Allow relay operators to monitor bug events via a MetricsPort counter
### What is the expected behavior?
Every time tor writes a block of "Bug: ..." log lines the counter should increase by 1.
This will allow us to monito...### Summary
Allow relay operators to monitor bug events via a MetricsPort counter
### What is the expected behavior?
Every time tor writes a block of "Bug: ..." log lines the counter should increase by 1.
This will allow us to monitor for such events using prometheus/alertmanager and report such events earlier.trinity-1686atrinity-1686ahttps://gitlab.torproject.org/tpo/core/tor/-/issues/40817Allow directory authorities to reject descriptors with EOL Tor versions2023-11-16T06:02:56ZGeorg KoppenAllow directory authorities to reject descriptors with EOL Tor versionsSo, we have the option that directory authorities recommend Tor versions but it seems there is no way right now to just set an option that blocks old Tor versions unless this is taken care of by a new Tor release. While in theory we coul...So, we have the option that directory authorities recommend Tor versions but it seems there is no way right now to just set an option that blocks old Tor versions unless this is taken care of by a new Tor release. While in theory we could try to just get those new Tor releases deployed as we decide EOL versions need to go the fact that we often need to treat bridges differently (as they are scarce) makes that route a bit cumbersome as we'd need to convince `Serge` not to update to such a new Tor version yet. Things get really complicated if we want the directory authorities to deploy a Tor security update after that as for `Serge` we'd then need a backout of the "block EOL versions" part.
In order to avoid all that hassle it would be nice to have some option directory authorities could set to block particular old Tor versions without the need for a new Tor release. That would make the whole EOL process easier for a *lot* of involved parties (right now we need to get dirauths to block all the fingerprints and then once a bunch of relay operators get back to us one by one after the upgraded their Tor version those fingerprints need to get unblocked again...).trinity-1686atrinity-1686ahttps://gitlab.torproject.org/tpo/core/tor/-/issues/40815Make zstd warning a debug log-level statement2023-12-20T14:04:48ZAlexander Færøyahf@torproject.orgMake zstd warning a debug log-level statementPeople and packages are unhappy about the Zstd compatibility mismatch, for good reasons, because it is a bit of a hack. Maybe we should consider lowering the log-level of this warning?
See also https://bugs.debian.org/963151People and packages are unhappy about the Zstd compatibility mismatch, for good reasons, because it is a bit of a hack. Maybe we should consider lowering the log-level of this warning?
See also https://bugs.debian.org/963151Tor: 0.4.7.x-post-stableAlexander Færøyahf@torproject.orgAlexander Færøyahf@torproject.orghttps://gitlab.torproject.org/tpo/core/tor/-/issues/40811conflux_launch_leg infinite loop2023-07-05T21:32:13ZRoger Dingledineconflux_launch_leg infinite loopI finally got a proper core from the seg fault that my tor has been hitting periodically.
The seg fault seems to happen because my stack has thousands of entries on it, presumably because we are calling functions that call themselves in...I finally got a proper core from the seg fault that my tor has been hitting periodically.
The seg fault seems to happen because my stack has thousands of entries on it, presumably because we are calling functions that call themselves in a circle and it keeps stacking deeper.
It happens in practice when my Tor is minding its own business (not actively being used) but then my wifi goes away.
Here is a sample of the 'where' output from gdb
```
#69 0x000055a2356ef88a in circuit_establish_circuit_conflux (
conflux_nonce=conflux_nonce@entry=0x7ffc342cc320 "\215Oĩaa8\307R\325\035\344C\304_2\020\205\354\347&O\213\221\300D\251\301g\343,M\320\323\325<\242U",
purpose=purpose@entry=25 '\031', exit_ei=exit_ei@entry=0x55a236878cd0,
flags=flags@entry=70) at src/core/or/circuitbuild.c:547
#70 0x000055a23571aae7 in conflux_launch_leg (
nonce=nonce@entry=0x7ffc342cc320 "\215Oĩaa8\307R\325\035\344C\304_2\020\205\354\347&O\213\221\300D\251\301g\343,M\320\323\325<\242U")
at src/core/or/conflux_pool.c:1110
#71 0x000055a23571bcb7 in unlinked_circuit_closed (circ=0x55a23cd5d3d0)
at src/core/or/conflux_pool.c:1426
#72 conflux_circuit_has_closed (circ=circ@entry=0x55a23cd5d3d0)
at src/core/or/conflux_pool.c:1632
#73 0x000055a2356f6875 in circuit_mark_for_close_ (circ=0x55a23cd5d3d0,
reason=0, line=line@entry=547,
file=file@entry=0x55a23582f102 "src/core/or/circuitbuild.c")
at src/core/or/circuitlist.c:2262
#74 0x000055a2356ef88a in circuit_establish_circuit_conflux (
conflux_nonce=conflux_nonce@entry=0x7ffc342cc450 "\215Oĩaa8\307R\325\035\344C\304_2\020\205\354\347&O\213\221\300D\251\301g\343,MP\305\325<\242U",
purpose=purpose@entry=25 '\031', exit_ei=exit_ei@entry=0x55a236878cd0,
flags=flags@entry=70) at src/core/or/circuitbuild.c:547
#75 0x000055a23571aae7 in conflux_launch_leg (
nonce=nonce@entry=0x7ffc342cc450 "\215Oĩaa8\307R\325\035\344C\304_2\020\205\354\347&O\213\221\300D\251\301g\343,MP\305\325<\242U")
at src/core/or/conflux_pool.c:1110
#76 0x000055a23571bcb7 in unlinked_circuit_closed (circ=0x55a23cd5c550)
at src/core/or/conflux_pool.c:1426
#77 conflux_circuit_has_closed (circ=circ@entry=0x55a23cd5c550)
at src/core/or/conflux_pool.c:1632
#78 0x000055a2356f6875 in circuit_mark_for_close_ (circ=0x55a23cd5c550,
reason=0, line=line@entry=547,
file=file@entry=0x55a23582f102 "src/core/or/circuitbuild.c")
at src/core/or/circuitlist.c:2262
#79 0x000055a2356ef88a in circuit_establish_circuit_conflux (
conflux_nonce=conflux_nonce@entry=0x7ffc342cc580 "\215Oĩaa8\307R\325\035\344C\304_2\020\205\354\347&O\213\221\300D\251\301g\343,Mж\325<\242U",
purpose=purpose@entry=25 '\031', exit_ei=exit_ei@entry=0x55a236878cd0,
flags=flags@entry=70) at src/core/or/circuitbuild.c:547
#80 0x000055a23571aae7 in conflux_launch_leg (
nonce=nonce@entry=0x7ffc342cc580 "\215Oĩaa8\307R\325\035\344C\304_2\020\205\354\347&O\213\221\300D\251\301g\343,Mж\325<\242U")
at src/core/or/conflux_pool.c:1110
#81 0x000055a23571bcb7 in unlinked_circuit_closed (circ=0x55a23cd5b6d0)
at src/core/or/conflux_pool.c:1426
#82 conflux_circuit_has_closed (circ=circ@entry=0x55a23cd5b6d0)
at src/core/or/conflux_pool.c:1632
#83 0x000055a2356f6875 in circuit_mark_for_close_ (circ=0x55a23cd5b6d0,
reason=0, line=line@entry=547,
file=file@entry=0x55a23582f102 "src/core/or/circuitbuild.c")
at src/core/or/circuitlist.c:2262
#84 0x000055a2356ef88a in circuit_establish_circuit_conflux (
conflux_nonce=conflux_nonce@entry=0x7ffc342cc6b0 "\215Oĩaa8\307R\325\035\344C\304_2\020\205\354\347&O\213\221\300D\251\301g\343,MP\250\325<\242U",
purpose=purpose@entry=25 '\031', exit_ei=exit_ei@entry=0x55a236878cd0,
flags=flags@entry=70) at src/core/or/circuitbuild.c:547
```
I still have the core, but my internet for the next days is pretty crappy so I will try to respond as I can. :)
This is Tor running from git commit d5306e107f. I can't easily trigger it, or I would try a git bisect. It's been happening since before the Tor 0.4.8.1-alpha release. I am just a client.Tor: 0.4.8.x-stableMike PerryMike Perryhttps://gitlab.torproject.org/tpo/core/tor/-/issues/40810In Shadow, rare case with 3 conflux legs rather than 22023-06-15T17:20:30ZMike PerryIn Shadow, rare case with 3 conflux legs rather than 2```
Jan 01 00:16:28.462 [warn] tor_bug_occurred_(): Bug: src/core/or/conflux_util.c:378: conflux_validate_legs: Non-fatal assertion !(smartlist_len(cfx->legs) > conflux_params_get_num_legs_set()) failed. (on Tor 0.4.8.1-alpha-dev dec385e...```
Jan 01 00:16:28.462 [warn] tor_bug_occurred_(): Bug: src/core/or/conflux_util.c:378: conflux_validate_legs: Non-fatal assertion !(smartlist_len(cfx->legs) > conflux_params_get_num_legs_set()) failed. (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: Tor 0.4.8.1-alpha-dev (git-dec385ebc6bfe8ea): Non-fatal assertion !(smartlist_len(cfx->legs) > conflux_params_get_num_legs_set()) failed in conflux_validate_legs at src/core/or/conflux_util.c:378. Stack trace: (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(log_backtrace_impl+0x5a) [0x558cb3dcc5ca] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(tor_bug_occurred_+0x16f) [0x558cb3dd788f] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(conflux_validate_legs+0x1a7) [0x558cb3e6b087] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(conflux_decide_next_circ+0x2a) [0x558cb3e642aa] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(conflux_decide_circ_for_send+0x58) [0x558cb3e64768] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(relay_send_command_from_edge_+0x302) [0x558cb3d7a8a2] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(connection_edge_send_command+0x72) [0x558cb3d7abf2] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(connection_edge_finished_connecting+0xad) [0x558cb3e829ed] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(connection_handle_write+0x765) [0x558cb3e7b5c5] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(+0x6e892) [0x558cb3d53892] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(+0x2113f) [0x7f215ee9013f] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(event_base_loop+0x52f) [0x7f215ee9087f] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(do_main_loop+0xe1) [0x558cb3d54d91] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(tor_run_main+0x195) [0x558cb3d50705] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(tor_main+0x3e) [0x558cb3d4cc9e] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(main+0x1d) [0x558cb3d4c84d] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f215e913083] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(_start+0x2e) [0x558cb3d4c8ae] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] conflux_validate_legs(): Bug: BADSTUFF: Number of legs is above maximum of 2 allowed: 3
```
This happened 3 times in one of the 3 runs. So roughly 3 out of ~750k circuits. If I had to guess, this means somewhere in the maze, we think a leg has failed, but it actually ends up succeeding later?
It is not serious, but this backtrace could also emerge on live, since conflux_validate_legs() is still being performed there.
At minimum, we can add a call to `conflux_log_set()` there, to try to get more info on what these legs are.Tor: 0.4.8.x-stableMike PerryMike Perryhttps://gitlab.torproject.org/tpo/core/tor/-/issues/40808Restrict KIST parameter range and make a separate client param2023-06-20T17:38:18ZMike PerryRestrict KIST parameter range and make a separate client paramNetwork parameter KISTSchedRunInterval is allowed to be between 0 and 100, with the idea that 0 disables KIST, and 1-100 are interval values in ms. However, the code path to disable KIST via this param is broken due to additional safety ...Network parameter KISTSchedRunInterval is allowed to be between 0 and 100, with the idea that 0 disables KIST, and 1-100 are interval values in ms. However, the code path to disable KIST via this param is broken due to additional safety checks elsewhere, and 1ms drives relays into 100% CPU loop.
We should change the allowed range of this param to be 2-100 (though 100 is awful high).
While at it, we should make a separate KISTSchedRunIntervalClient param, so we can control client and relay KIST values separately.Mike PerryMike Perryhttps://gitlab.torproject.org/tpo/core/tor/-/issues/40801conflux_pick_first_leg: Non-fatal assertion !(!min_leg) failed2023-07-28T18:59:04Zrelay-operatorconflux_pick_first_leg: Non-fatal assertion !(!min_leg) failed### Summary
I see the following warning on my exit relay sometimes:
```
May 30 15:52:28 host Tor-relay[4144596]: tor_bug_occurred_(): Bug: src/core/or/conflux.c:551: conflux_pick_first_leg: Non-fatal assertion !(!min_leg) failed. (on T...### Summary
I see the following warning on my exit relay sometimes:
```
May 30 15:52:28 host Tor-relay[4144596]: tor_bug_occurred_(): Bug: src/core/or/conflux.c:551: conflux_pick_first_leg: Non-fatal assertion !(!min_leg) failed. (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: Tor 0.4.8.0-alpha-dev (git-d5dea2202cfee1ea): Non-fatal assertion !(!min_leg) failed in conflux_pick_first_leg at src/core/or/conflux.c:551. Stack trace: (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: /usr/local/bin/tor-master(log_backtrace_impl+0x57) [0x5d2f16105c07] (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: /usr/local/bin/tor-master(tor_bug_occurred_+0x169) [0x5d2f16110b59] (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: /usr/local/bin/tor-master(conflux_decide_next_circ+0x36d) [0x5d2f161a242d] (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: /usr/local/bin/tor-master(conflux_decide_circ_for_send+0x98) [0x5d2f161a2588] (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: /usr/local/bin/tor-master(relay_send_command_from_edge_+0x2fa) [0x5d2f160b263a] (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: /usr/local/bin/tor-master(connection_exit_begin_conn+0x3c1) [0x5d2f161c0de1] (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: /usr/local/bin/tor-master(+0x9a659) [0x5d2f160b6659] (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: /usr/local/bin/tor-master(circuit_receive_relay_cell+0x365) [0x5d2f160b6b75] (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: /usr/local/bin/tor-master(command_process_cell+0x420) [0x5d2f16194930] (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: /usr/local/bin/tor-master(+0x1a64da) [0x5d2f161c24da] (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: /usr/local/bin/tor-master(+0x19c704) [0x5d2f161b8704] (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: /usr/local/bin/tor-master(+0x6f329) [0x5d2f1608b329] (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(+0x21585) [0x77112266e585] (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(event_base_loop+0x49f) [0x77112266ec1f] (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: /usr/local/bin/tor-master(do_main_loop+0xf1) [0x5d2f1608c631] (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: /usr/local/bin/tor-master(tor_run_main+0x1e5) [0x5d2f16087f75] (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: /usr/local/bin/tor-master(tor_main+0x59) [0x5d2f160842f9] (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: /usr/local/bin/tor-master(main+0x19) [0x5d2f16083eb9] (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: /lib/x86_64-linux-gnu/libc.so.6(+0x2718a) [0x771121d7e18a] (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x771121d7e245] (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 30 15:52:28 host Tor-relay[4144596]: Bug: /usr/local/bin/tor-master(_start+0x21) [0x5d2f16083f01] (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
```
and possibly related:
```
May 31 20:56:41 host Tor-relay[4144596]: connection_edge_package_raw_inbuf(): Bug: called on conn that's already marked for close at src/core/or/relay.c:1852. (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 31 20:56:41 host Tor-relay[4144596]: connection_edge_package_raw_inbuf(): Bug: called on conn that's already marked for close at src/core/or/relay.c:1852. (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 31 20:56:41 host Tor-relay[4144596]: connection_edge_package_raw_inbuf(): Bug: called on conn that's already marked for close at src/core/or/relay.c:1852. (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 31 20:56:41 host Tor-relay[4144596]: connection_edge_package_raw_inbuf(): Bug: called on conn that's already marked for close at src/core/or/relay.c:1852. (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 31 20:56:45 host Tor-relay[4144596]: connection_edge_package_raw_inbuf(): Bug: called on conn that's already marked for close at src/core/or/relay.c:1852. (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 31 20:56:45 host Tor-relay[4144596]: connection_edge_package_raw_inbuf(): Bug: called on conn that's already marked for close at src/core/or/relay.c:1852. (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
May 31 20:56:45 host Tor-relay[4144596]: connection_edge_package_raw_inbuf(): Bug: called on conn that's already marked for close at src/core/or/relay.c:1852. (on Tor 0.4.8.0-alpha-dev d5dea2202cfee1ea)
```
### Environment
```
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
```Mike PerryMike Perryhttps://gitlab.torproject.org/tpo/core/tor/-/issues/40758Follow-up from "metrics: Add service side metrics for REND/INTRO circuit fail...2023-03-08T15:51:34Zgabi-250Follow-up from "metrics: Add service side metrics for REND/INTRO circuit failures."The following discussion from !695 should be addressed:
- [x] @gabi-250 started a [discussion](https://gitlab.torproject.org/tpo/core/tor/-/merge_requests/695#note_2878450):
> Hmm, maybe it's worth adding a `reason` label so we ca...The following discussion from !695 should be addressed:
- [x] @gabi-250 started a [discussion](https://gitlab.torproject.org/tpo/core/tor/-/merge_requests/695#note_2878450):
> Hmm, maybe it's worth adding a `reason` label so we can break these down by cause (when visualizing in e.g. grafana).gabi-250gabi-250https://gitlab.torproject.org/tpo/core/tor/-/issues/40757Add timing metrics for onion service handshakes2023-03-14T11:46:00Zgabi-250Add timing metrics for onion service handshakesOur [metrics library](https://gitlab.torproject.org/tpo/core/tor/-/blob/455471835da35d8ee64e6a2c0a70acb89a003bf4/src/lib/metrics/metrics_common.h#L25-31) only supports [counters](https://prometheus.io/docs/concepts/metric_types/#counter)...Our [metrics library](https://gitlab.torproject.org/tpo/core/tor/-/blob/455471835da35d8ee64e6a2c0a70acb89a003bf4/src/lib/metrics/metrics_common.h#L25-31) only supports [counters](https://prometheus.io/docs/concepts/metric_types/#counter) and [gauges](https://prometheus.io/docs/concepts/metric_types/#gauge). For time measurements, we're going to need e.g. [histograms](https://prometheus.io/docs/concepts/metric_types/#histogram), so we'll have to update the metrics library accordingly.gabi-250gabi-250