[tor-bugs] #24671 [Core Tor/Tor]: sched: KISTLite should set an upper limit to write on the outbuf

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Dec 19 22:56:45 UTC 2017


#24671: sched: KISTLite should set an upper limit to write on the outbuf
------------------------------+-----------------------------------------
     Reporter:  dgoulet       |      Owner:  dgoulet
         Type:  defect        |     Status:  assigned
     Priority:  Very High     |  Milestone:  Tor: 0.3.2.x-final
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:  tor-sched, dos, tor-channel
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+-----------------------------------------
 Right now, for the `KISTLite` scheduler, the write limit on the outbuf for
 a channel is set to `INT_MAX`. This is crazy high and will bloat the
 outbuf if the channel is struggling to send out data on the wire or the
 socket is stuck.

 Vanilla scheduler uses the `num_cells_writeable()` method to limit the
 amount it puts on the outbuf which is 32KB maximum.

 KIST uses the kernel information for this limit.

 This is very important that we actually put a limit in the outbuf because
 it keeps the cells in the circuit queue and that is handled by our OOM in
 case of memory pressure.

 I suggest we simply use the `channel_num_cells_writeable()` for the upper
 limit when KISTLite is used.

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


More information about the tor-bugs mailing list