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

Stream poll_write() sometimes returning Poll::Ready(Ok(0)) on large transfers #595

Closed
jvimal-eg opened this issue Jan 16, 2022 · 4 comments
Assignees

Comments

@jvimal-eg
Copy link

Encountering a weird issue where a h2 stream that's upgraded used to work with h2 0.3.7, but fails with 0.3.9. (Didn't try 0.3.8 as I hit the connection hanging issue #584.)

I have a h2 stream that received a CONNECT request to host:port and subsequently upgraded. I then use tokio's copy function to copy bytes back and forth between the stream and the host:port TCP connection. For large file (> 20MB or so) downloads, write() to the stream fails and hits this error: https://github.com/tokio-rs/tokio-io/blob/master/src/copy.rs#L75-L78.

poll_write() shouldn't return Poll::Ready(Ok(0)), but Poll::Pending... I suspect it's related to the recent send buffer size changes, but can't put my finger on the line that's causing the issue.

@jvimal-eg jvimal-eg changed the title Stream poll_write() returning Poll::Ready(Ok(0)) on large transfers Stream poll_write() sometimes returning Poll::Ready(Ok(0)) on large transfers Jan 16, 2022
@seanmonstar
Copy link
Member

Are you referring to hyper::upgrade::Upgraded? I'm not sure of any type exposed in the h2 crate that has a poll_write method.

@jvimal-eg
Copy link
Author

Yes, it's a hyper::upgrade::Upgraded instance that's backed by a h2 stream. A hyper::upgrade::Upgrade instance over a http/1.1 connection works just fine.

@nox
Copy link
Contributor

nox commented Jan 19, 2022

@nox
Copy link
Contributor

nox commented Jan 19, 2022

So this is a duplicate of #270.

@nox nox closed this as completed Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants