Bug 849812 - Can't unmount sshfs after playing a file with vlc
Can't unmount sshfs after playing a file with vlc
Product: Fedora
Classification: Fedora
Component: xdg-utils (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Rex Dieter
Fedora Extras Quality Assurance
: FutureFeature, Patch
Depends On:
  Show dependency treegraph
Reported: 2012-08-20 21:20 EDT by Konstantin Svist
Modified: 2013-12-21 12:48 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Konstantin Svist 2012-08-20 21:20:32 EDT
When I use VLC to play back a video file mounted via sshfs, I often run into the problem of unmounting the path after playback is finished (and VLC is closed)

VLC is set up to prevent screensaver from showing during playback, but the script that locks this (/usr/bin/xdg-screensaver) only checks for unlock every 50 seconds (using "sleep 50").
In this setup, some sshfs-mounted files remain open and sshfs refuses to unmount since the files are in use.

My temporary workaround is to modify xdg-screensaver to set "sleep 5" -- but this only works because I unmount by hand (5 seconds lag between closing vlc and running the command is acceptable to me). This may not work well if someone sets up a script, for example, to sshfs-mount, play a clip, and instantly unmount when playback is finished.
Comment 1 Konstantin Svist 2013-01-22 14:52:59 EST
Bug still present in Fedora 18
Comment 2 Konstantin Svist 2013-09-12 13:28:38 EDT
It's been over a year since this was originally reported and I even gave you the exact cause and source file (do you want the line number??).
It's trivial to add a workaround (even if full/proper solution would take long to implement)
So what's the holdup?
Comment 3 Konstantin Svist 2013-10-31 13:31:33 EDT
Looks like there are no files that are actually locked by xdg-screensaver -- the only reason it refuses to quit is because its current directory is a remote one

So the proper fix is:

--- bak/usr/bin/xdg-screensaver	2013-10-31 10:30:28.512078590 -0700
+++ /usr/bin/xdg-screensaver	2013-10-31 10:30:38.503124792 -0700
@@ -876,6 +876,7 @@
   test "${TMPDIR+set}" = set || TMPDIR=/tmp
+  cd $TMPDIR
   tmpfile=`mktemp $TMPDIR/tmp.XXXXXXXXXX`
   # Filter stale entries from the xdg-screensaver status file
   cat "$screensaver_file" 2> /dev/null | (
Comment 4 Rex Dieter 2013-10-31 13:36:44 EDT
Ah, sorry for not followup to the prior comment, didn't recall ever getting email about it.

This latter fix/workaround does indeed seem reasonable.
Comment 5 Fedora End Of Life 2013-12-21 10:04:40 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 6 Konstantin Svist 2013-12-21 12:17:38 EST
was the fix/workaround applied?
Comment 7 Rex Dieter 2013-12-21 12:48:07 EST
No, I hadn't had a chance to test for side-effects yet.

Note You need to log in before you can comment on or make changes to this bug.