-
Notifications
You must be signed in to change notification settings - Fork 123
poll_read data is buffered without bounds #308
Copy link
Copy link
Open
Labels
B-rfcBlocked: request for comments. Needs more discussion.Blocked: request for comments. Needs more discussion.C-bugCategory: bug. Something is wrong. This is bad!Category: bug. Something is wrong. This is bad!C-refactorCategory: refactor. This would improve the clarity of internal code.Category: refactor. This would improve the clarity of internal code.
Milestone
Metadata
Metadata
Assignees
Labels
B-rfcBlocked: request for comments. Needs more discussion.Blocked: request for comments. Needs more discussion.C-bugCategory: bug. Something is wrong. This is bad!Category: bug. Something is wrong. This is bad!C-refactorCategory: refactor. This would improve the clarity of internal code.Category: refactor. This would improve the clarity of internal code.
h3/h3/src/stream.rs
Line 433 in 84316da
The
poll_read()onBufRecvStream(wrapping the underlying QUIC provider's stream) is buffering chunks in-memory in aBufListthat appears to grows without bounds:h3/h3/src/stream.rs
Lines 448 to 450 in 84316da
In some tests that I ran over loopback to send and receive data as fast as possible, if the client does not consume from
BufRecvStreamquickly (for any reason) I observed that the client memory grows without bounds. This should ideally not be the case -- a slow consumer should back-pressure the sender. This problem does not exist if I use the underlying QUIC provider's stream directly.I don't have a handy reproducer that I can share at the moment, but I can work on one if it'll be useful.