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

Keep writes within IOV_MAX #633

Open
talex5 opened this issue Oct 23, 2023 · 1 comment
Open

Keep writes within IOV_MAX #633

talex5 opened this issue Oct 23, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@talex5
Copy link
Collaborator

talex5 commented Oct 23, 2023

Calling Flow.write with more than IOV_MAX buffers results in EINVAL. This can happen when e.g. using Buf_write to write a lot of data without flushing.

Reported by @Cjen1 (see https://github.com/Cjen1/prototyping-testing/tree/master/eio-pipe).

Implementations of Flow.write with such limits should just truncate the list of buffers. Possibly Buf_write should also know the limit and flush before sending so many (or just use a low enough limit that it work on all platforms).

On Linux, ocaml-multicore/ocaml-uring#76 can be used to get the limit.

@talex5 talex5 added the bug Something isn't working label Oct 23, 2023
@smondet
Copy link
Contributor

smondet commented Nov 7, 2023

I think this is the same issue: mirage/ocaml-cohttp#1005

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants