aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-07-16 10:05:00 +0200
committerNick Mathewson <nickm@torproject.org>2014-07-16 10:05:00 +0200
commit32495ee3099c3fb512a986a8e5db32ebf153b439 (patch)
treee24e2c2581792d8e0f6184b8e891bab4afdf7fd2 /src/or/circuituse.c
parent856114ab1c5a8a7a1b7993ee34adbb7cbf4eaa10 (diff)
downloadtor-32495ee3099c3fb512a986a8e5db32ebf153b439.tar.gz
tor-32495ee3099c3fb512a986a8e5db32ebf153b439.zip
Add another 8387 diagnostic
When we run into bug 8387 (if we run into it again), report when we last called circuit_expire_old_circuits_clientside(). This will let us know -- if my fix for 8387 doesn't work -- whether my diagnosis was at least correct. Suggested by Andrea.
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 600aede233..714754a672 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -783,6 +783,10 @@ circuit_expire_building(void)
}
}
+/** For debugging #8387: track when we last called
+ * circuit_expire_old_circuits_clientside. */
+static time_t last_expired_clientside_circuits = 0;
+
/**
* As a diagnostic for bug 8387, log information about how many one-hop
* circuits we have around that have been there for at least <b>age</b>
@@ -894,6 +898,10 @@ circuit_log_ancient_one_hop_circuits(int age)
}
} SMARTLIST_FOREACH_END(ocirc);
+ log_notice(LD_HEARTBEAT, "It has been %ld seconds since I last called "
+ "circuit_expire_old_circuits_clientside().",
+ (long)(now - last_expired_clientside_circuits));
+
done:
smartlist_free(log_these);
}
@@ -1220,6 +1228,7 @@ circuit_expire_old_circuits_clientside(void)
tor_gettimeofday(&now);
cutoff = now;
+ last_expired_clientside_circuits = now.tv_sec;
if (! circuit_build_times_disabled() &&
circuit_build_times_needs_circuits(get_circuit_build_times())) {