Commit Graph

2118 Commits

Author SHA1 Message Date
David Goulet
8b8873b759 Merge branch 'maint-0.4.7' 2022-11-08 15:26:44 -05:00
David Goulet
5b0103cfb4 Merge branch 'tor-gitlab/mr/651' into maint-0.4.7 2022-11-08 15:25:08 -05:00
David Goulet
56ee2131f1 Merge branch 'maint-0.4.7' 2022-11-08 12:47:17 -05:00
Mike Perry
00633bc619 metrics: Report amount of cwnd drop from delta and gamma
Part of #40708.
2022-11-08 12:47:14 -05:00
David Goulet
2adc73afdb Merge branch 'maint-0.4.7' 2022-11-08 12:36:44 -05:00
David Goulet
fde87096c3 Merge branch 'tor-gitlab/mr/650' into maint-0.4.7 2022-11-08 12:36:19 -05:00
David Goulet
d634a5ebc7 relay: Remove unused conn->ext_or_conn_id
This also incidently removes a use of uninitialized stack data from the
connection_or_set_ext_or_identifier() function.

Fixes #40648

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-08 12:35:09 -05:00
Mike Perry
fec9757a37 metrics: Add flow control metrics.
Part of #40708.
2022-11-07 09:55:06 -05:00
Mike Perry
2f7e05d89d metrics: Add stats when the clock stalls.
Part of #40708.
2022-11-07 09:55:06 -05:00
Mike Perry
83fdaff7c0 metrics: Add running average of CC cwnd in slow start when closing circuit
Count slow start separately.

Part of #40708

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-07 09:55:06 -05:00
David Goulet
62ce557b0b metrics: Add stats when reaching vegas delta or ss_cwnd_max
Part of #40708

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-07 09:55:06 -05:00
David Goulet
a0e72fcb97 metrics: Add running average of CC cwnd when closing circuit
Part of #40708

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-07 09:55:06 -05:00
David Goulet
c565ef9c58 metrics: Add running average of CC cwnd when exiting slow start
Part of #40708

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-07 09:55:06 -05:00
David Goulet
6196e9596a metrics: Add connection socket family to metrics
Adds either ipv4 or ipv6 to the "tor_relay_connections_total" stats.

Closes #40710

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-03 13:05:21 -04:00
David Goulet
87e820a0c5 metrics: Add stats for num circ reaching max cell outq
Part of #40708

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-03 09:37:38 -04:00
David Goulet
15e5b203cd Merge branch 'tor-gitlab/mr/594' 2022-11-01 09:11:29 -04:00
David Goulet
3596d193be Merge branch 'tor-gitlab/mr/636' 2022-10-31 14:15:00 -04:00
David Goulet
19b080f2aa Merge branch 'tor-gitlab/mr/646' 2022-10-28 12:07:51 -04:00
Jeremy Saklad
7e80ad4787
relay: Skip warnings for single onion services
Single onion services are not secret, so there is no added risk from
using accounting or running a relay in the same instance.

Related to #40691
2022-10-28 09:15:14 -05:00
Roger Dingledine
338185d840 resolve a BUG() on relays at startup
Remove a harmless "Bug" log message that can happen in
relay_addr_learn_from_dirauth() on relays during startup:

tor_bug_occurred_(): Bug: ../src/feature/relay/relay_find_addr.c:225: relay_addr_learn_from_dirauth: Non-fatal assertion !(!ei) failed. (on Tor 0.4.7.10 )
Bug: Tor 0.4.7.10: Non-fatal assertion !(!ei) failed in relay_addr_learn_from_dirauth at ../src/feature/relay/relay_find_addr.c:225. Stack trace: (on Tor 0.4.7.10 )

Finishes fixing bug 40231.

Fixes bug 40523; bugfix on 0.4.5.4-rc.
2022-10-27 20:07:48 -04:00
David Goulet
3c58fa8a6f Merge branch 'maint-0.4.7' 2022-10-27 11:41:48 -04:00
David Goulet
72f52d2c85 Merge branch 'tor-gitlab/mr/644' into maint-0.4.7 2022-10-27 11:41:43 -04:00
David Goulet
0918cc2783 Merge branch 'maint-0.4.7' 2022-10-27 11:41:26 -04:00
David Goulet
6d40e980fb metrics: Treat relay connections as gauge, not counter
Fixes #40699

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27 11:37:21 -04:00
David Goulet
177f3a40eb metrics: Add number of opened circuits to MetricsPort
Related to #40194

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27 10:48:52 -04:00
David Goulet
1a2d93f72a relay: Add our consensus relay flag to MetricsPort
Related to #40194

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27 10:48:52 -04:00
David Goulet
48ab17cc72 metrics: Add traffic related stats to MetricsPort
At this commit, bytes read and written are exported.

Related to #40194

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27 10:48:48 -04:00
David Goulet
cd7be492d1 relay: Add DoS subsystem stats to MetricsPort
Related to #40194

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27 10:47:56 -04:00
David Goulet
fff2b92682 Merge branch 'maint-0.4.7' 2022-10-27 10:46:54 -04:00
David Goulet
a1c40c8511 metrics: Fix naming and documentation
After nickm's review, minor changes to names and comments.

Related to #40194

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27 10:45:08 -04:00
David Goulet
06a26f1872 relay: Change the connection metrics name
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26 15:16:48 -04:00
David Goulet
00f714b374 relay: Add CC RTT reset stats to MetricsPort
Related to #40194

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26 15:16:48 -04:00
David Goulet
e7e18ae914 relay: Add total number of streams seen on MetricsPort
Related to #40194

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26 15:16:48 -04:00
David Goulet
98b98fd3ce rephist: Track number of streams seen per type
Related to #40194

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26 15:16:48 -04:00
David Goulet
dd272b6ef4 Merge remote-tracking branch 'tor-gitlab/mr/638' 2022-10-26 15:12:54 -04:00
David Goulet
78c184d2fe hs: Retry service rendezvous on circuit close
Move the retry from circuit_expire_building() to when the offending
circuit is being closed.

Fixes #40695

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26 15:10:39 -04:00
David Goulet
5b44a32c59 circ: Get rid of hs_circ_has_timed_out
Logic is too convoluted and we can't efficiently apply a specific
timeout depending on the purpose.

Remove it and instead rely on the right circuit cutoff instead of
keeping this flagged circuit open forever.

Part of #40694

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26 15:10:37 -04:00
David Goulet
fb21387882 Merge branch 'tor-gitlab/mr/637' 2022-10-26 15:07:42 -04:00
David Goulet
a7aa22a4e7 hs: Retry rdv circuit if repurposed
This can happen if our measurement subsystem decides to snatch it.

Fixes #40696

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26 15:05:44 -04:00
David Goulet
ca135a127d Merge branch 'maint-0.4.7' 2022-10-26 15:01:43 -04:00
David Goulet
0a49e04691 Merge branch 'tor-gitlab/mr/635' into maint-0.4.7 2022-10-26 15:01:40 -04:00
David Goulet
a2ee39452a Merge branch 'tor-gitlab/mr/633' 2022-10-26 14:58:21 -04:00
David Goulet
59008c6f51 hs: Change the error for a collapsing client circuit
Change it to an "unreachable" error so the intro point can be retried
and not flagged as a failure and never retried again.

Closes #40692

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26 14:56:45 -04:00
Roger Dingledine
2033cc7b5e clean up comment a bit 2022-10-25 02:55:13 -04:00
David Goulet
6300a9548d hs: Retry rdv circuit if repurposed
This can happen if our measurement subsystem decides to snatch it.

Fixes #40696

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-24 11:03:38 -04:00
Roger Dingledine
bab8375ef5 dir auths now omit Measured= if rs->is_authority
Directory authorities stop voting a consensus "Measured" weight
for relays with the Authority flag. Now these relays will be
considered unmeasured, which should reserve their bandwidth
for their dir auth role and minimize distractions from other roles.

In place of the "Measured" weight, they now include a
"MeasuredButAuthority" weight (not used by anything) so the bandwidth
authority's opinion on this relay can be recorded for posterity.

Resolves ticket 40698.
2022-10-24 04:34:49 -04:00
Roger Dingledine
ea2ba4f5a8 back out most of commit b7992d4f
The AuthDirDontVoteOnDirAuthBandwidth torrc option never worked, and it
was implemented in a way that could have produced consensus conflicts
if it had.

Resolves bug 40700.
2022-10-24 04:34:00 -04:00
David Goulet
04cccd7074 hs: Retry service rendezvous on circuit close
Move the retry from circuit_expire_building() to when the offending
circuit is being closed.

Fixes #40695

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-19 16:39:10 -04:00
David Goulet
921268d4ce circ: Get rid of hs_circ_has_timed_out
Logic is too convoluted and we can't efficiently apply a specific
timeout depending on the purpose.

Remove it and instead rely on the right circuit cutoff instead of
keeping this flagged circuit open forever.

Part of #40694

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-19 16:39:10 -04:00
David Goulet
8463111c9b hs: Change the error for a collapsing client circuit
Change it to an "unreachable" error so the intro point can be retried
and not flagged as a failure and never retried again.

Closes #40692

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-19 14:41:48 -04:00