[tor-commits] [tor/master] On OOM, also log N circuits remaining

nickm at torproject.org nickm at torproject.org
Tue Mar 4 16:04:42 UTC 2014


commit 79c234e0e3fa22d76029bd3b5e2c52072709cff3
Author: Nick Mathewson <nickm at torproject.org>
Date:   Wed Feb 12 13:09:02 2014 -0500

    On OOM, also log N circuits remaining
---
 src/or/circuitlist.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index ffb5e0c..45fc95b 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -1589,9 +1589,11 @@ circuits_handle_oom(size_t current_allocation)
   buf_shrink_freelists(1); /* This is necessary to actually release buffer
                               chunks. */
 
-  log_notice(LD_GENERAL, "Removed "U64_FORMAT" bytes by killing %d circuits.",
+  log_notice(LD_GENERAL, "Removed "U64_FORMAT" bytes by killing %d circuits; "
+             "%d circuits remain alive.",
              U64_PRINTF_ARG(mem_recovered),
-             n_circuits_killed);
+             n_circuits_killed,
+             smartlist_len(circlist) - n_circuits_killed);
 
   smartlist_free(circlist);
 }





More information about the tor-commits mailing list