Opened 4 months ago

Closed 4 months ago

#24671 closed defect (fixed)

sched: KISTLite should set an upper limit to write on the outbuf

Reported by: dgoulet Owned by: dgoulet
Priority: Very High Milestone: Tor: 0.3.2.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-sched, dos, tor-channel
Cc: pastly Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

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.

Child Tickets

Change History (3)

comment:1 Changed 4 months ago by dgoulet

Status: assignedneeds_review

See branch: bug24671_032_01

comment:2 Changed 4 months ago by pastly

Status: needs_reviewmerge_ready

I wish I would have realized the outbuf didn't enforce its own size limit. I think this could have been avoided.

LGTM.

comment:3 Changed 4 months ago by nickm

Resolution: fixed
Status: merge_readyclosed

merged to 0.3.2 and forward.

Note: See TracTickets for help on using tickets.