-
-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wire in recv flow control #26
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this panics in my test application.
TRACE:h2::proto::streams::flow_control: assign capacity: window=65388 available=65388 capacity=147
thread 'main' panicked at 'assertion failed: self.window_size() >= self.available + capacity', /.../h2/src/proto/streams/flow_control.rs:53:8
stack backtrace:
5: 0x1071de316 - h2::proto::streams::flow_control::FlowControl::assign_capacity::hb50875cf8dbffb8c
It looks like both window_size AND available are decremented when receiving a frame. When assign_capacity is called, the assertion fails because window_size == available
|
Ah yes. That assertion isn't correct. I had it for send but it is expected to not be the case for recv |
Removing that assertion triggers another panic, this time after 400 requests (so most likely on the connection flow controller) TRACE:h2::proto::streams::prioritize: pop frame TRACE:h2::proto::streams::prioritize: --> data frame TRACE:h2::proto::streams::prioritize: -- updating stream flow -- TRACE:h2::proto::streams::flow_control: send_data: window=65535 available=147 sz=147 TRACE:h2::proto::streams::flow_control: send_data: window=65388; available=0 TRACE:h2::proto::streams::flow_control: assign capacity: window=33048 available=0 capacity=147 TRACE:h2::proto::streams::flow_control: assign capacity: window=33048 available=147 TRACE:h2::proto::streams::prioritize: -- updating connection flow -- TRACE:h2::proto::streams::flow_control: send_data: window=33048 available=147 sz=147 TRACE:h2::proto::streams::flow_control: send_data: window=32901; available=0 TRACE:h2::proto::streams::prioritize: writing frame=Frame::Data(..) DEBUG:h2::proto::framed_write: send; frame=Frame::Data(..) TRACE:h2::proto::streams::flow_control: assign capacity: window=50835 available=57303 capacity=147 TRACE:h2::proto::streams::flow_control: assign capacity: window=50835 available=57450 TRACE:h2::proto::streams::flow_control: assign capacity: window=65388 available=65388 capacity=147 TRACE:h2::proto::streams::flow_control: assign capacity: window=65388 available=65535 TRACE:h2::proto::streams::prioritize: try reclaim frame TRACE:h2::proto::streams::prioritize: -> reclaimed; frame=Data { stream_id: StreamId(901), data: Prioritized { remaining: 0, end_of_stream: false, stream: Key(444) }, flags: DataFlag(0), pad_len: None } TRACE:h2::proto::streams::prioritize: pop frame TRACE:h2::proto::streams::prioritize: --> data frame TRACE:h2::proto::streams::prioritize: -- updating stream flow -- TRACE:h2::proto::streams::flow_control: send_data: window=65535 available=120 sz=147 thread 'main' panicked at 'attempt to subtract with overflow', /Users/ver/b/rs/h2/src/proto/streams/flow_control.rs:106:9 stack backtrace: 0: 0x1101a88d3 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::ha7e300af98739b0a 1: 0x1101aa00a - std::panicking::default_hook::{{closure}}::hf87bad6075b566a9 2: 0x1101a9cc2 - std::panicking::default_hook::hf2545c692bf4b891 3: 0x1101ac282 - std::panicking::rust_panic_with_hook::h89c2ff4bac8586ab 4: 0x1101ac0e4 - std::panicking::begin_panic::h624277f74f45eb29 5: 0x1101ac032 - std::panicking::begin_panic_fmt::ha453ab564ee65d9d 6: 0x1101abf9a - rust_begin_unwind 7: 0x1101d0b53 - core::panicking::panic_fmt::h70f80d2989621b59 8: 0x1101d0a56 - core::panicking::panic::h26c4c1ccdfa09abb 9: 0x11012c7be - h2::proto::streams::flow_control::FlowControl::send_data::he95599c04238a21e |
No description provided.