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

Hangs when using with autofs #22

Open
lev-kuznetsov opened this issue Mar 8, 2017 · 5 comments
Open

Hangs when using with autofs #22

lev-kuznetsov opened this issue Mar 8, 2017 · 5 comments

Comments

@lev-kuznetsov
Copy link

I'm having trouble mounting on demand with autofs, it hangs when trying to mount such as when trying to list the mount folder contents. I'm doing this with gcsfuse google buckets implementation, I have a docker container set up with a test, just add service account details and your bucket name:

$ cat Dockerfile 
FROM levkuznetsov/gcsfuse-docker

ADD service-account.json /etc/gcloud/service-account.json
ADD auto.gcsfuse /etc/autofs/auto.gcsfuse

$ cat auto.gcsfuse 
dfci-mev-def-12345-678	-fstype=gcsfuse,rw,key_file=/etc/gcloud/service-account.json	:dfci-mev-def-12345-678

Where dfci-mev-def-12345-678 is my bucket and the Google service account is in service-account.json. Running in privileged mode and the autofs4 module loaded on the host. Output from gcsfuse is:

attempting to mount entry /mnt/dfci-mev-def-12345-678
>> Calling gcsfuse with arguments: -o rw --key-file /etc/gcloud/service-account.json dfci-mev-def-12345-678 /mnt/dfci-mev-def-12345-678
>> Using mount point: /mnt/dfci-mev-def-12345-678
>> Opening GCS connection...
>> Opening bucket...
>> Mounting file system...

and then it just hangs forever. I believe it's blocking in mount.go#Mount but I have no idea why. I'm able to mount the bucket normally within the container

@jacobsa
Copy link
Owner

jacobsa commented Mar 8, 2017

Unfortunately I'm unlikely to be able to help you figure out what's going on here. If you root cause this let me know, and I'm happy to discuss how to work around or fix it. You may find GoogleCloudPlatform/gcsfuse#189 interesting.

@lev-kuznetsov
Copy link
Author

So far I've been able to trace it down that it is indeed happening in mount.go#Mount, I haven't been able to get any logging statements to work past that, I have never worked with Go before

@jacobsa
Copy link
Owner

jacobsa commented Mar 12, 2017

It seems unlikely (but not impossible) that the problem is in the Go code itself. You might try looking at the kernel stacks (/proc/<pid>/stack) for the various threads of the Go program to see what syscall it's hanging in, if any. You might also try getting a Go-level traceback by killing with SIGQUIT.

@FossPrime
Copy link

FossPrime commented Dec 16, 2020

It seems unlikely (but not impossible) that the problem is in the Go code itself. You might try looking at the kernel stacks (/proc/<pid>/stack) for the various threads of the Go program to see what syscall it's hanging in, if any. You might also try getting a Go-level traceback by killing with SIGQUIT.

Turned out to be an oversight...
GoogleCloudPlatform/gcsfuse@e2cd3dc#r18826869

Can we replace it with a comment instead of a full io block?? this also breaks Mac OS Auto FS

@vitalif
Copy link
Contributor

vitalif commented Nov 18, 2022

I just checked the same thing with geesefs based on jacobsa/fuse with that os.Stat commented out with systemd .automount unit... It hangs even without that os.Stat() :)

I.e. when I try to do ls /path/to/mountpoint it just hangs even though GeeseFS reports that it mounted the FS successfully.

Moreover, usual C libfuse also has the same stat() call. So if it was the cause then no FUSE filesystems would work with automounters... But I don't know. Maybe all of them really don't work :)

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

4 participants