[tor-bugs] #24501 [Core Tor/Tor]: When we hit MaxMemInQueues, make the log message more quantitative

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Dec 3 05:36:14 UTC 2017


#24501: When we hit MaxMemInQueues, make the log message more quantitative
------------------------------+--------------------
     Reporter:  arma          |      Owner:  (none)
         Type:  defect        |     Status:  new
     Priority:  Medium        |  Milestone:
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+--------------------
 A relay operator on #tor shared these log lines, on a fast exit relay
 running with 1GByte of memory (so maxmeminqueues is 768MBytes):
 {{{
 Nov 30 03:13:52.000 [notice] We're low on memory.  Killing circuits with
 over-long queues. (This behavior is controlled by MaxMemInQueues.)
 Nov 30 03:13:52.000 [notice] Removed 118288 bytes by killing 124 circuits;
 0 circuits remain alive. Also killed 0 non-linked directory connections.
 Nov 30 03:13:52.000 [notice] We're low on memory.  Killing circuits with
 over-long queues. (This behavior is controlled by MaxMemInQueues.)
 Nov 30 03:13:52.000 [notice] Removed 25940496 bytes by killing 125
 circuits; 0 circuits remain alive. Also killed 0 non-linked directory
 connections.
 Nov 30 03:13:53.000 [notice] We're low on memory.  Killing circuits with
 over-long queues. (This behavior is controlled by MaxMemInQueues.)
 Nov 30 03:13:53.000 [notice] Removed 528 bytes by killing 1 circuits; 0
 circuits remain alive. Also killed 0 non-linked directory connections.
 Nov 30 03:13:53.000 [notice] We're low on memory.  Killing circuits with
 over-long queues. (This behavior is controlled by MaxMemInQueues.)
 Nov 30 03:13:53.000 [notice] Removed 528 bytes by killing 2 circuits; 0
 circuits remain alive. Also killed 0 non-linked directory connections.
 Nov 30 03:13:54.000 [notice] We're low on memory.  Killing circuits with
 over-long queues. (This behavior is controlled by MaxMemInQueues.)
 Nov 30 03:13:54.000 [notice] Removed 528 bytes by killing 1 circuits; 0
 circuits remain alive. Also killed 0 non-linked directory connections.
 Nov 30 03:13:54.000 [notice] We're low on memory.  Killing circuits with
 over-long queues. (This behavior is controlled by MaxMemInQueues.)
 Nov 30 03:13:54.000 [notice] Removed 528 bytes by killing 2 circuits; 0
 circuits remain alive. Also killed 0 non-linked directory connections.
 }}}

 I notice in cell_queues_check_size() that we sum up four things to compute
 alloc:
 {{{
   size_t alloc = cell_queues_get_total_allocation();
   alloc += buf_get_total_allocation();
   alloc += tor_compress_get_total_allocation();
   const size_t rend_cache_total = rend_cache_get_total_allocation();
   alloc += rend_cache_total;
 }}}
 For operators who are debugging their memory use, and for us poor people
 trying to help diagnose, it would seem smart for us to expose these four
 numbers when we say "We're low on memory".

 (I thought about this idea in particular because of the
 tor_compress_get_total_allocation() call and #24368.)

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24501>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list