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

hang when client receives header response that's too big in http2 #3724

Open
ajwerner opened this issue Aug 2, 2024 · 0 comments
Open

hang when client receives header response that's too big in http2 #3724

ajwerner opened this issue Aug 2, 2024 · 0 comments
Labels
C-bug Category: bug. Something is wrong. This is bad!

Comments

@ajwerner
Copy link

ajwerner commented Aug 2, 2024

Version
Hyper @ 7de0237

Platform
Linux 6.5.0-42-generic

Description
When the server sends a response with headers that are too big, hyper can sometimes just hang.

I wrote this test:

// Test that clients get responses when the server sends a response with
// headers that are too large by just a bit.
t! {
long_header_response,
client:
request:
;
response:
status: 500,
headers: {
},
;
server:
request:
;
response:
status: 500,
headers: {
// Just above DEFAULT_SETTINGS_MAX_HEADER_LIST_SIZE.
"error" => ("a".repeat(16 << 10 + 1)),
},
;
}

I expected to see an error. Instead the test just blocks forever.

See hyperium/tonic#1834 and https://discord.com/channels/500028886025895936/1268954374634471484 for context.

@ajwerner ajwerner added the C-bug Category: bug. Something is wrong. This is bad! label Aug 2, 2024
ajwerner added a commit to ajwerner/h2 that referenced this issue Aug 2, 2024
Before this change, the transition to the reset state wouldn't notify
tasks that were waiting for a response. The motivating case for this
patch involved a large header being sent by the server. This case was
mostly tested by an existing test, but because that test did not spawn
separate tasks and kept polling the futures through its use of
`conn.drive`, the missing notify was masked.

Informs hyperium/hyper#3724.
seanmonstar pushed a commit to hyperium/h2 that referenced this issue Aug 2, 2024
Before this change, the transition to the reset state wouldn't notify
tasks that were waiting for a response. The motivating case for this
patch involved a large header being sent by the server. This case was
mostly tested by an existing test, but because that test did not spawn
separate tasks and kept polling the futures through its use of
`conn.drive`, the missing notify was masked.

Informs hyperium/hyper#3724.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug. Something is wrong. This is bad!
Projects
None yet
Development

No branches or pull requests

1 participant