From e41b680f50e6f49b7167262281fbedf55a5ce8b4 Mon Sep 17 00:00:00 2001 From: Mike Perry Date: Wed, 15 Jun 2022 14:13:09 +0000 Subject: [PATCH 1/4] Demote a warning about finding hops in path if no dir info. Leave it at notice if we do have enough dir info. --- src/core/or/circuitbuild.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/core/or/circuitbuild.c b/src/core/or/circuitbuild.c index 8027a96565..337bcfdd53 100644 --- a/src/core/or/circuitbuild.c +++ b/src/core/or/circuitbuild.c @@ -2520,8 +2520,19 @@ onion_extend_cpath(origin_circuit_t *circ) } if (!info) { - log_warn(LD_CIRC,"Failed to find node for hop #%d of our path. Discarding " - "this circuit.", cur_len+1); + /* This can happen on first startup, possibly due to insufficient relays + * downloaded to pick vanguards-lite layer2 nodes, or other ephemeral + * reasons. It only happens briefly, is hard to reproduce, and then goes + * away for ever. :/ */ + if (!router_have_minimum_dir_info()) { + log_info(LD_CIRC, + "Failed to find node for hop #%d of our path. Discarding " + "this circuit.", cur_len+1); + } else { + log_notice(LD_CIRC, + "Failed to find node for hop #%d of our path. Discarding " + "this circuit.", cur_len+1); + } return -1; } From 2ce5142718ff61c5dc754b0e845fcddf8a4a0c73 Mon Sep 17 00:00:00 2001 From: Mike Perry Date: Wed, 15 Jun 2022 14:14:03 +0000 Subject: [PATCH 2/4] Changes file for Bug #40603. --- changes/bug40603 | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changes/bug40603 diff --git a/changes/bug40603 b/changes/bug40603 new file mode 100644 index 0000000000..aa00718a48 --- /dev/null +++ b/changes/bug40603 @@ -0,0 +1,5 @@ + o Minor bugfixes (logging): + - Demote a harmless warn log message about finding a second hop to from + warn level to info level, if we do not have enough descriptors yet. + Leave it at notice level for other cases. Fixes bug 40603; + bugfix on 0.4.7.1-alpha. From 84e31c00daa53b7af2bc4670b653b78eb8c5fc83 Mon Sep 17 00:00:00 2001 From: Mike Perry Date: Wed, 15 Jun 2022 14:42:37 +0000 Subject: [PATCH 3/4] Demote "Unexpected path length" log to info. You win Maze; we surrender. --- src/core/or/circuitbuild.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/or/circuitbuild.c b/src/core/or/circuitbuild.c index 337bcfdd53..511df4112b 100644 --- a/src/core/or/circuitbuild.c +++ b/src/core/or/circuitbuild.c @@ -1289,8 +1289,7 @@ circuit_finish_handshake(origin_circuit_t *circ, * don't seem able to do it, so there is some magic way that hops can * still get added. Perhaps some cases of circuit pre-build that change * purpose? */ - static ratelim_t cc_path_limit = RATELIM_INIT(600); - log_fn_ratelim(&cc_path_limit, LOG_NOTICE, LD_CIRC, + log_info(LD_CIRC, "Unexpected path length %d for exit circuit %d, purpose %d", circ_len, circ->global_identifier, TO_CIRCUIT(circ)->purpose); From 254ca6717f4b1a7012efda42e42f6a3e37b6f454 Mon Sep 17 00:00:00 2001 From: Mike Perry Date: Wed, 15 Jun 2022 14:43:52 +0000 Subject: [PATCH 4/4] Changes file for Bug 40612 --- changes/bug40612 | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changes/bug40612 diff --git a/changes/bug40612 b/changes/bug40612 new file mode 100644 index 0000000000..526f23bdd6 --- /dev/null +++ b/changes/bug40612 @@ -0,0 +1,5 @@ + o Minor bugfixes (logging): + - Demote a notice log message about "Unexpected path length" to info + level. These cases seem to happen arbitrarily, and we likely will + never find all of them before the switch to arti. Fixes bug 40612; + bugfix on 0.4.7.5-alpha.