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

Pipe offset issues with splice when client TCP connection is interrupted #412

Open
johalun opened this issue Aug 14, 2021 · 0 comments
Open

Comments

@johalun
Copy link

johalun commented Aug 14, 2021

This might be more of a general Linux question and not so uring specific, I'm not sure. I have a sendfile implementation using splice which normally works great. I have a pipe cache with pipes that I reuse for each new sendfile operation.

The issue is when the client abort and I get a partial write from the read side of the pipe to the TCP socket and I later reuse that pipe. I believe the offset is not reset because the following sendfile operation using the same pipe get stuck when it can not fill the pipe's buffer with the data. Since the client no longer exists, I have no interest in trying to re-transmit the remaining data.

For now the workaround is to close those pipes and create new ones. But, is there a way to reset the offset in the pipe buffer, or is this something io_uring should do in case of failure?

Thanks!

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

1 participant