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

The length of the iov array created by sendMany may exceed UIO_MAXIOV #58

Closed
edsko opened this issue Sep 21, 2012 · 3 comments
Closed

Comments

@edsko
Copy link

edsko commented Sep 21, 2012

When sending large payloads (the boundary is somewhere between 33439816 bytes, which is okay, and 33439824 bytes, which is not) the length of the array created by sendMany and then passed to writev goes from 1024 to 1025, at which point writev returns an error which is then thrown as "writev: invalid argument (Invalid argument)" exception.

@dcoutts
Copy link
Contributor

dcoutts commented Sep 24, 2012

(In case it's not obvious, we hit this when testing Cloud Haskell)

@tibbe tibbe closed this as completed in eafad15 Sep 27, 2012
@tibbe
Copy link
Member

tibbe commented Sep 27, 2012

@edsko It would be great if you can try this patch to make sure it works.

Note, sending a large number of chunks to sendMany is likely to result in subpar performance. On Linux you should send <= 16 chunks for best performance.

@edsko
Copy link
Author

edsko commented Sep 28, 2012

Thanks @tibbe. I can confirm that this fixes the problem. Will make a note of your words of caution about the number of chunks.

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