-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
cargo update hangs forever #2615
Comments
Cargo should in theory print out what it's about to wait for before it does so, could you gist the full output of Cargo? Also, do you have a project I could reproduce this against? |
I can reproduce it even with a new project with no dependencies, e.g.:
Running with debug does not give much more:
Is there some other way to get more debug output? |
Hm this seems pretty worrisome... The
However Could you gist the full |
Might be some file system issue on my sytem. FWIW, it's an NFS mount. I will re-run it on a local partition and come back with the result. |
I cannot reproduce the issue when using a local partition so most likely it's an issue with the NFS mount I am using. The strange thing is that I can create and update files on that NFS partition. Here is the strace gist when running |
This is... interesting! It appears that Do you know if your NFS setup is "weird" in any way? e.g. using somewhat nonstandard software or anything like that? If not, what's your setup look like? Perhaps I can search around to see if there are open bugs or workarounds on this elsewhere? |
I checked my server and it's using NFSv3 which does not support locking. From the NFS docs:
I found a similar issue reported on rubygems: rubygems/rubygems#806 If I understand correctly, rubygems stopped using flock when an NFS file system is detected. |
Yeah that workaround seems reasonable, but it looks like it may not work in this case? It seems that in Ruby the I wonder though if this is related to the |
I will try to find some time tomorrow. I will be back :) |
I tried omitting the
|
What about using Something like this: #include <sys/statfs.h>
#include <stdio.h>
int main()
{
struct statfs my_file;
statfs ("Cargo.lock", &my_file);
if (my_file.f_type == 0x6969) {
printf("NFS file system\n");
}
} |
That'd do it! I'd be totally game for that. |
Completely skip file locking when we detect an NFS mount via `statfs`. Closes rust-lang#2615
Don't use flock on NFS mounts Completely skip file locking when we detect an NFS mount via `statfs`. Closes #2615
Thanks for the fix @alexcrichton |
Were you running rpc.lockd? NFSv3 doesn't implement locking within the NFS protocol itself, but most installations use rpc.lockd alongside NFS. With that running, flock should work fine. |
I update to latest nightly and I have issues building my project. It seems
cargo update
hangs when updatingCargo.lock
. Here is the output of strace after I manually removed the existingCargo.lock
:In hangs forever after the
flock
call.Versions:
Details about the system where I am trying this:
The text was updated successfully, but these errors were encountered: