securefs icon indicating copy to clipboard operation
securefs copied to clipboard

Version 2.0.0 does not delete .securefs.lock when unmounting

Open mhogomchungu opened this issue 3 months ago • 5 comments

I have a securefs volume created with an older version of securefs and it uses the old ".securefs.json" config file.

When this volume is mounted, the ".securefs.lock" file is created normally but it is not deleted when unmounting.

Logs also has a mistleading entry since it thinks the previous instance crashed

securefs::full_format::RepoLocker::open_lock_stream_checked():698]    Lock file $PATH/.securefs.lock exists but the process holding it has exited. The previous securefs probably exited abnormally.

mhogomchungu avatar Oct 03 '25 22:10 mhogomchungu

How did you perform the unmounting?

netheril96 avatar Oct 04 '25 01:10 netheril96

All below ways leads to the same result

securefs unmount $MOUNT_PATH
fusermount3 -u $MOUNT_PATH
fusermount -u $MOUNT_PATH

mhogomchungu avatar Oct 04 '25 03:10 mhogomchungu

I cannot reproduce your findings locally with an old repository. You need to give me more details:

  • Operating system and version
  • Trace logs
  • Do you build securefs 2.0 from source or download a prebuilt binary?
  • Does it happen with a brand new repository too?

netheril96 avatar Oct 04 '25 04:10 netheril96

I am using Linux with version 2.0.0 prebuild binary.

When i mount a volume with SiriKali, unmounting it later on leaves the lock file regardless of what method i use to unmount. When i mount with SiriKali and using --log argument, the lock file gets deleted as expected!

When i mount a volume from the terminal, the lock file is deleted on unmounting regardless of what method i use to unmount.

SiriKali log file that shows mounting and unmounting is below

*************************************
Command: "/home/ink/.local/share/SiriKali/bin/securefs" "mount" "-b" "--fsname" "Securefs@/home/ink/Securefs" "--fssubtype" "Securefs" "--config" "/home/ink/Securefs/.securefs.json" "/home/ink/Securefs" "/home/ink/.SiriKali/Securefs" "-o" "rw"
*************************************
The attempt to unlock the volume took 3.45 seconds
*************************************
-------
Exit Code: 0
Exit Status: 0
-------
StdOut:
-------
StdError:
[Info] [0x7fa28cb196c0] [2025-10-06 08:44:25.269737910 UTC] [securefs::FuseHighLevelOpsBase::build_ops(const securefs::FuseHighLevelOpsBase*)::<lambda(fuse_conn_info*)>:424]    Fuse operations initialized
*************************************
Command: "/home/ink/.local/share/SiriKali/bin/securefs" "unmount" "/home/ink/.SiriKali/Securefs"
-------
Exit Code: 0
Exit Status: 0
-------
StdOut:
-------
StdError:
*************************************

mhogomchungu avatar Oct 06 '25 10:10 mhogomchungu

When you mount with SirKail without --log, can you try redirecting stdout and stderr to /dev/null and see what happens?

netheril96 avatar Oct 06 '25 10:10 netheril96