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

erts: Fix large read/writes on macOS #6248

Conversation

garazdawi
Copy link
Contributor

@garazdawi garazdawi commented Aug 26, 2022

On macOS there is an (as far as I can tell) undocumented limitation
for read and write that the size is not allowed to be greater than
2GB. So if we get an EINVAL from read/write and the size is > 2GB
we try again with a smaller size.

Closes #6242

@garazdawi garazdawi added team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI bug Issue is reported as a bug labels Aug 26, 2022
@garazdawi garazdawi self-assigned this Aug 26, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Aug 26, 2022

CT Test Results

       4 files     179 suites   1h 45m 10s ⏱️
2 730 tests 2 541 ✔️ 182 💤 7
3 226 runs  2 980 ✔️ 239 💤 7

For more details on these failures, see this check.

Results for commit 1369f39.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@garazdawi garazdawi force-pushed the lukas/erts/fix-large-read-write-macOS/OTP-18222 branch 3 times, most recently from 305e514 to fdd8646 Compare August 29, 2022 09:31
On macOS there is an (as far as I can tell) undocumented limitation
for read and write that the size is not allowed to be greater than
2GB. So if we get an EINVAL from read/write and the size is > 2GB
we try again with a smaller size.

Closes erlang#6242
When the binary being encoded is was exactly the same size
as the maximum iovec segment the number of iovec_len would
end up being off by 1 which could lead to a segfault when
writing the buffers.
@garazdawi garazdawi force-pushed the lukas/erts/fix-large-read-write-macOS/OTP-18222 branch from fdd8646 to 1369f39 Compare September 1, 2022 07:06
@garazdawi garazdawi merged commit d1fc872 into erlang:master Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Erlang cannot read nor write files with to 2^31 bytes or more on macOS
2 participants