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

Fixed crash on Linux when writing a Jay file and the disk is low on space #1838

Merged
merged 3 commits into from
May 1, 2019

Conversation

st-pasha
Copy link
Contributor

@st-pasha st-pasha commented May 1, 2019

Apparently we need to call posix_fallocate to ensure that writes to mem-mapped file will succeed. This function is available on Linux, but not on MacOS.

On MacOS the equivalent can be achieved with fcntl command F_PREALLOCATE (see https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/fcntl.2.html).

Not adding any tests, because on Linux creating and mounting a size-restricted file system requires root privileges, and on MacOS even that is not possible. Testing can be done manually as described in the issue.

Closes #1837

@st-pasha st-pasha requested a review from oleksiyskononenko May 1, 2019 19:51
@st-pasha st-pasha self-assigned this May 1, 2019
@st-pasha st-pasha merged commit 010b2e6 into master May 1, 2019
@st-pasha st-pasha deleted the 1837 branch May 1, 2019 21:42
@st-pasha st-pasha added this to the Release 0.9.0 milestone Jan 28, 2020
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

Successfully merging this pull request may close these issues.

SIGBUS encountered when writing a Jay file and disk space is too low
2 participants