Skip to content
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

grpc-uds: update to h2 v0.3.26 #3

Merged
merged 44 commits into from
May 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
072f7ee
Serialize debug_data when present in GOAWAY frames
Herbstein Apr 14, 2023
b0e5470
Fix markdown code element in error::is_library
foresterre Apr 27, 2023
70eade5
Add too_many_resets debug_data to the GOAWAY we send (#678)
Herbstein Apr 28, 2023
7a77f93
Rename is_local_reset to is_local_error
nox May 10, 2023
3d558a6
Ignore Error::GoAway in State::is_remote_reset
nox May 10, 2023
f126229
v0.3.19
seanmonstar May 12, 2023
04e6398
fix: panicked when a reset stream would decrement twice
seanmonstar May 23, 2023
66c36c4
fix panic on receiving invalid headers frame by making the `take_requ…
May 23, 2023
97bc3e3
hammer test requires a new tokio feature
Jun 8, 2023
972fb6f
chore: add funding file
seanmonstar Jun 12, 2023
864430c
Enabled clippy in CI and ran `clippy --fix`
Jun 9, 2023
478f7b9
Fix for invalid header panic corrected (#695)
f0rki Jun 22, 2023
0189722
Fix for a fuzzer-discovered integer underflow of the flow control win…
f0rki Jun 26, 2023
6a75f23
v0.3.20
seanmonstar Jun 26, 2023
46fb80b
test: early server response with data (#703)
DDtKey Jul 22, 2023
633116e
fix: do not ignore result of `ensure_recv_open` (#687)
DDtKey Jul 24, 2023
cdcc641
msrv: bump to 1.63 (#708)
seanmonstar Aug 21, 2023
da9f34b
chore: fix up some clippy nags (#709)
seanmonstar Aug 21, 2023
9bd62a2
Test that client reacts correctly on rogue HEADERS (#667)
nox Aug 21, 2023
ee04292
Fix opening new streams over max concurrent (#707)
seanmonstar Aug 21, 2023
da38b1c
v0.3.21
seanmonstar Aug 21, 2023
62cf7a6
Check minimal versions more precisely
tottoto Sep 16, 2023
a3f01c1
perf: Improve throughput when vectored IO is not enabled (#712)
xiaoyawei Sep 28, 2023
1f247de
Update indexmap to version 2 (#698)
djc Oct 9, 2023
cbe7744
chore(ci): update to actions/checkout@v4 (#716)
tottoto Oct 16, 2023
05cf352
chore(ci): add minimal versions checking on stable rust
tottoto Oct 16, 2023
3cdef96
fix(test): mark h2-support as private crate
tottoto Oct 16, 2023
d03c54a
chore(dependencies): update tracing minimal version to 0.1.35
tottoto Oct 16, 2023
4aa7b16
Fix documentation for max_send_buffer_size (#718)
Protryon Oct 18, 2023
56651e6
fix lint about unused import
seanmonstar Oct 30, 2023
ef743ec
Add a setter for header_table_size (#638)
4JX Oct 30, 2023
c7ca62f
docs: fix typos (#724)
vuittont60 Nov 7, 2023
0f412d8
v0.3.22
seanmonstar Nov 15, 2023
b668c7f
fix: streams awaiting capacity lockout (#730) (#734)
seanmonstar Jan 10, 2024
a7eb14a
v0.3.23
seanmonstar Jan 10, 2024
d919cd6
streams: limit error resets for misbehaving connections
Noah-Kennedy Jan 10, 2024
7243ab5
Prepare v0.3.24
Noah-Kennedy Jan 17, 2024
94e80b1
perf: optimize header list size calculations (#750)
Noah-Kennedy Feb 22, 2024
3a79832
v0.3.25
seanmonstar Mar 15, 2024
5b6c9e0
refactor: cleanup new unused warnings (#757)
seanmonstar Apr 2, 2024
1a357aa
fix: limit number of CONTINUATION frames allowed
seanmonstar Apr 3, 2024
357127e
v0.3.26
seanmonstar Apr 3, 2024
19ec427
Merge tag 'v0.3.26' into feature/grpc-uds
nightkr May 8, 2024
4e77adb
Update tests to account for grpc-uds patch
nightkr May 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Ignore Error::GoAway in State::is_remote_reset
When Streams::recv_go_away is called, Recv::handle_error is called
on every stream whose stream id is past the GO_AWAY's last stream id,
and those streams may have been pending-accepting.

If the stream had not encountered an error before, Recv::handle_error
then sets its state to State::Closed(Error::GoAway(_, _, Initiator::Remote))
which makes State::is_remote_reset return true in Streams::next_incoming,
which leads to Counts::dec_remote_reset_streams being called even though
Counts::inc_remote_reset_streams was never called for that stream,
causing a panic about the counter being 0.
nox authored and seanmonstar committed May 10, 2023
commit 3d558a6ed0b2cbaeb11805a7e6ecd53e38b508d6
2 changes: 1 addition & 1 deletion src/proto/streams/state.rs
Original file line number Diff line number Diff line change
@@ -362,7 +362,7 @@ impl State {

pub fn is_remote_reset(&self) -> bool {
match self.inner {
Closed(Cause::Error(ref e)) => !e.is_local(),
Closed(Cause::Error(Error::Reset(_, _, Initiator::Remote))) => true,
_ => false,
}
}
47 changes: 47 additions & 0 deletions tests/h2-tests/tests/stream_states.rs
Original file line number Diff line number Diff line change
@@ -240,6 +240,53 @@ async fn reset_streams_dont_grow_memory_continuously() {
join(srv, client).await;
}

#[tokio::test]
async fn go_away_with_pending_accepting() {
// h2_support::trace_init!();
let (io, mut client) = mock::new();

let (sent_go_away_tx, sent_go_away_rx) = oneshot::channel();
let (recv_go_away_tx, recv_go_away_rx) = oneshot::channel();

let client = async move {
let settings = client.assert_server_handshake().await;
assert_default_settings!(settings);

client
.send_frame(frames::headers(1).request("GET", "https://baguette/").eos())
.await;

client
.send_frame(frames::headers(3).request("GET", "https://campagne/").eos())
.await;
client.send_frame(frames::go_away(1).protocol_error()).await;

sent_go_away_tx.send(()).unwrap();

recv_go_away_rx.await.unwrap();
};

let srv = async move {
let mut srv = server::Builder::new()
.max_pending_accept_reset_streams(1)
.handshake::<_, Bytes>(io)
.await
.expect("handshake");

let (_req_1, _send_response_1) = srv.accept().await.unwrap().unwrap();

poll_fn(|cx| srv.poll_closed(cx))
.drive(sent_go_away_rx)
.await
.unwrap();

let (_req_2, _send_response_2) = srv.accept().await.unwrap().unwrap();

recv_go_away_tx.send(()).unwrap();
};
join(srv, client).await;
}

#[tokio::test]
async fn pending_accept_reset_streams_decrement_too() {
h2_support::trace_init!();