Opened 2 years ago

Closed 22 months ago

#23710 closed defect (fixed)

sched: channel_more_to_flush() is probably looking at the wrong queue

Reported by: dgoulet Owned by: dgoulet
Priority: High Milestone: Tor: 0.3.3.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-sched
Cc: Actual Points:
Parent ID: #23993 Points:
Reviewer: Sponsor: SponsorV


In the scheduler (both vanilla and kist), we do flush cells from the outgoing_queue to the outbuf using channel_flush_some_cells().

However, once we are done and to know what state the channel should be in, we use channel_more_to_flush() that looks at two things, the incoming_queue and the number of cells in the cmux.

It seems from my investigation that tor doesn't have this concept of "flushing cells from the incoming queue" so it doesn't make sense to look at it when we are trying to flush cells from the outgoing_queue to the outbuf so we can actually send() them.

Thus, this function should look at the outgoing_queue in my opinion although if I'm right in #23709, all this could change.

Child Tickets

Change History (7)

comment:1 Changed 2 years ago by dgoulet

Quick note: #23709 is a thing, the incoming_queue is always empty so it doesn't affect channel_more_to_flush() as it it basically always true that it is empty so it will never return 1 in the case of it being non empty.

Thus, it is safe for now to leave it that way.

comment:2 Changed 2 years ago by dgoulet

Sponsor: SponsorV

Tagging all scheduler (and KIST) related tickets for SponsorV

comment:3 Changed 2 years ago by dgoulet

Owner: set to dgoulet
Status: newaccepted

Taking the scheduler related tickets.

comment:4 Changed 2 years ago by dgoulet

Parent ID: 23993

comment:5 Changed 2 years ago by dgoulet

Parent ID: 23993#23993

comment:6 Changed 23 months ago by dgoulet

This one will get fixed if we ever merge #23709.

comment:7 Changed 22 months ago by dgoulet

Resolution: fixed
Status: acceptedclosed

We are done with this one because #23709 fixed it.

Note: See TracTickets for help on using tickets.