[tor-bugs] #23676 [Core Tor/Tor]: kist on 0.3.2.1-alpha-dev beats its head against a wall trying to flush a conn that's closed

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Sep 28 20:13:33 UTC 2017


#23676: kist on 0.3.2.1-alpha-dev beats its head against a wall trying to flush a
conn that's closed
-------------------------------------------------+-------------------------
 Reporter:  arma                                 |          Owner:  (none)
     Type:  defect                               |         Status:
                                                 |  needs_review
 Priority:  High                                 |      Milestone:  Tor:
                                                 |  0.3.2.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  regression, cpu, tor-sched, 0.3.2.2  |  Actual Points:
  -alpha-must                                    |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by dgoulet):

 I've been debugging this one for a while and I think we have more problems
 then just this. However, I can explain how we get in this situation where
 we have a channel scheduled with *no* cells to flush.

 The offending party is the `circuitmux_append_destroy_cell()` which
 basically creates one DESTROY cell, push it on the cmux queue and then
 flushes it with `channel_flush_from_first_active_circuit()`. That function
 does MANY thins and among those, it writes the cell directly to the outbuf
 if the `outgoing_queue` of the channel is empty (which turns out to be
 ALWAYS empty...).

 So then `scheduler_channel_wants_writes()` is called by the libevent write
 of the connection `connection_handle_write_impl()` which schedule the
 empty channel for a write to kernel but that has already been done by that
 function...

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


More information about the tor-bugs mailing list