-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Cargo cannot update crates.io index on NFS #6652
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
Comments
Thanks for the report! This looks like it's likely coming from libgit2 so it may not be trivial to fix. What's probably happening is that some syscall libgit2 is expecting to work doesn't work on NFS. Can you try running |
Here's the strace: https://gist.github.com/ebetica/1b77fdf65432ae894fc758a7e9ca1f43 I'm not sure how to get the stack trace. I think the problem is in ftruncate, no? It appears to me that the git pack files are created with only read permissions, where ftruncate expect it to be opened with write permissions? |
Ah ok! Looks like this may be the same as #1578? I thought there was a flag for strace to print stacks but I may also be remembering incorrectly... |
I have found a workaround for this issue: Adding,
to |
Have run into the same issue with a rust corssbuild docker container on a windows machine, which earlier worked fine. FWIW, I use the default
File permissions
|
Adds a cargo configuration file to docker to fix `failed to truncate pack file`. See rust-lang/cargo#6652
The workaround from @felipellrocha seems to work inside the container, but any pointers on how to debug this? |
I cannot use Cargo when my home directory is located on a networked file system (NFS)
Here is the error I get:
Instead, if I do
CARGO_HOME=/tmp/.cargo cargo install rg
, everything seems to work out fine.Steps
CARGO_HOME=/path/to/nfs/.cargo cargo install rg
, probably any package will cause this errorNotes
The text was updated successfully, but these errors were encountered: