-
Notifications
You must be signed in to change notification settings - Fork 313
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
Issues when unmounting on linux/ darwin #512
Comments
I also found a need on darwin to use /sbin/umount instead of libc_unmount_trampoline, as my filesystem doesn't get unmounted otherwise, would a PR that tries umount in the case the syscall unmount fails be welcomed for darwin? I am aware that it should be two separate issues, but for the darwin question, I felt it's ok to ask here, as it might be related to why I have the need of lazy unmount on linux. |
this is a bug in go-fuse. I will have a look tomorrow. |
can you confirm that using the race detector to run your file system doesn´t turn up warnings? |
I was not aware of the race detector. Thank you for pointing out. I have 4 race warnings in the beginning of my program that are not related to the filesystem. I will fix them and re-try the unmount to see if they affected it somehow. (Edit: They have to do with context handling - cancelling - inside some unrelated parts of my program) My program perform a few operations, and after the filesystem gets mounted without any race warnings until I perform the unmount and the above panic happens. Edit: Running the file system with the race detector doesn't turn up any warnings. |
is it possible that you call |
No, I double checked, and I am confident I don't call it twice. |
Curious. is there a way I could get my hands on a reproducer? Also, the trace you posted is a smoking gun, but the complete goroutine stacks may be useful too. |
wait, this code
does not exist in go-fuse. Can you reproduce this problem with the latest go-fuse (without local changes?) |
Yes, the -uz does not exist in go-fuse, the command called from go-fuse without my change is:
This one works without any issue; go-fuse has no panics as long as the unmount is not attempted in lazy mode.
The trace I posted is all I got from my program. I will try to make a minimum reproducible example. But for example the following scenario also breaks: I run the go-fuse filesystem without any change in the library; then on a different terminal I call:
The exact same panic happens - this is the full stacktrace my program prints.
|
Edit: I edited the example. Here is a full reproducible example (I had modified the example for the loopback):
calling
|
In the provided example, the panic happens also without the lazy unmount flag (just ctrl+c from the terminal that launched it) |
This is quite odd. Somehow the infinite loop is causing this to happen. Trimmed down code:
|
It's not the loop. Adding a sleep at the bottom also shows the panic. My guess now is that it always panics on unmount, but most of the time the process exists before the panic is printed.
|
This is calling Serve() twice. Once implicitely via fs.Mount(), once explicitely via server.Serve(). |
Calling Serve() multiple times leads to a panic on unmount and fun debugging sessions ( #512 ). Catch it early. Change-Id: I3c490448fa3b8407a6db1bd8ad94b8a4e1a93828
Hi,
On linux I found the need to call fusermount -uz mountpoint, in the unmount command;
I get the following panic:
These are my mount options:
I need the lazy unmount as I observed that without lazy, the mount points remain with ????? attribute and can't be removed.
The text was updated successfully, but these errors were encountered: