No mount cleanup after kill -9 and restart
Opened this issue · 2 comments
After killing ouisync with kill -9
due to issue #171 and then re-starting ouisync with ouisync start
the ~/ouisync
directory still contains what appears to be both a normal empty directory for one repo (locally created repo) and one hung mountpoint in a weird state for a repo created by another peer and synced to this peer:
$ ls -l ~/ouisync/
ls: cannot access '/home/<user>/ouisync/eq test 1': Transport endpoint is not connected
total 0
d????????? ? ? ? ? ? 'eq test 1'
dr-xr-xr-x 1 root root 193 Dec 31 1969 phone
Stopping ouisync with ctrl-c (which worked this time), then manually unmounting /home/<user>/ouisync/eq test 1
and re-starting ouisync fixed the issue.
ouisync should probably recover better from an unclean exit by e.g. detecting stale ouisync mounts and unmounting them
I should add that after a kill -9
I can't unmount repos at all without sudo, which is interesting since at no point did I use sudo to install or run ouisync:
$ umount ~/ouisync/phone
umount: /home/<user>/ouisync/phone: Transport endpoint is not connected
I can't unmount repos at all without sudo
From my experience this is how FUSE works, one has to use fusermount -u <MOUNTED_DIR>
to unmount without sudo.
This issue has already been worked around by invoking the above command in the develop
branch in this commit.
Note also this comment in that commit, which suggests that there might be some flags that can be passed to FUSE to auto unmount on app exit, but I couldn't get it to work (more info in that comment).