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

error while preallocating on nfs #2707

Closed
xaverdh opened this issue Feb 28, 2019 · 3 comments
Closed

error while preallocating on nfs #2707

xaverdh opened this issue Feb 28, 2019 · 3 comments

Comments

@xaverdh
Copy link

xaverdh commented Feb 28, 2019

I get the following error message while running nix run --store $HOME/.nix -f channel:nixpkgs-unstable hello -c hello:

error: preallocating file of 12044580 bytes: Not supported

I am running a static nix binary compiled from NixOS/nixpkgs#56281, with the setup according to https://matthewbauer.us/blog/static-nix.html.

I think the problem may be that the nfs filesystem in question does not implement posix_fallocate (properly).
But the errno is not what the code at

if (errno && errno != EINVAL)
expects.

Is there any chance this can be made more robust?

@dtzWill
Copy link
Member

dtzWill commented Feb 28, 2019

To address this sort of thing I've been using this change for quite some time:

98b8c0b

I encountered this when using musl (and perhaps NFS as well), and remember it as a known intentional difference in behavior vs. glibc. This mailing list thread touches on some of this at least:

https://www.openwall.com/lists/musl/2018/04/26/3

See also:

https://www.openwall.com/lists/musl/2017/06/12/9

@xaverdh
Copy link
Author

xaverdh commented Feb 28, 2019

Thanks for the quick reply! I will try that patch.
Any chance that this will get upstreamed?

@edolstra
Copy link
Member

edolstra commented Mar 1, 2019

@dtzWill Thanks, I've applied your patch.

@edolstra edolstra closed this as completed Mar 1, 2019
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