kist: Channel in waiting_to_write goes missing until a destroy cell
Here is the gist with some logs I added to tor:
Sep 28 20:03:09.472 [info] kist_scheduler_run(): Case 4: channel 471. Out queue len: 0, in queue len: 0, cmux queue len: 15. Is there more to flush: yes. Channel state 'open' (sched: 3)
Sep 28 20:03:09.472 [info] channel_write_cell_queue_entry(): Channel 471 cell sent. cmux queue len: 15
Sep 28 20:03:09.483 [info] kist_scheduler_run(): Case 3: channel 471. Out queue len: 0, in queue len: 0, cmux queue len: 14. Is there more to flush: yes. Channel state 'open' (sched: 2)
Sep 28 20:03:09.484 [info] channel_write_to_kernel(): Writing 0 bytes to kernel for chan 471
[...]
Sep 28 20:04:13.738 [info] circuitmux_append_destroy_cell(): Destroy cell on channel 471
Sep 28 20:04:13.738 [info] channel_write_cell_queue_entry(): Channel 471 cell sent. cmux queue len: 0
Notice the 60+ seconds gap from the channel going to SCHED_CHAN_WAITING_TO_WRITE
(sched: 2) and then nothing until a destroy cell happens. Then suddenly at that point, no more cells in the cmux queue nor any calls to the flush function.
So questions are:
-
Why the channel in waiting_to_write never got scheduled again?
-
Where are those cells from the cmux queue? Is something else in tor moving those to the outbuf?