Re: Automounted NFS shares never timeout

2014-03-21 Thread Michael Schuerig
On Monday 17 March 2014 14:46:54 Michael Schuerig wrote:
 I have a single NFS share automounted by autofs. Once it is mounted,
 it is never (auto-)unmounted, even though I don't explicityl access
 it. Lsof does not show any open files below the mount point.

When I start plasma-desktop under strace, the main thread blocks in a 
call to lstat.

$ strace -f plasma-desktop

[pid  2189] lstat(/net, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
[pid  2189] lstat(/net/tardis, {st_mode=S_IFDIR|0555, st_size=0, ...}) 
= 0
[pid  2189] lstat(/net/tardis/srv, {st_mode=S_IFDIR|0555, st_size=0, 
...}) = 0
[pid  2189] lstat(/net/tardis/srv/test,  unfinished ...

I'd like to use gdb to generate a backtrace from there, but I don't know 
how to set a breakpoint on that specific lstat syscall.

Michael

-- 
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/


-- 
To UNSUBSCRIBE, email to debian-kde-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/4673131.IgTyrlqZzp@fuchsia



Re: Automounted NFS shares never timeout

2014-03-20 Thread Michael Schuerig
On Tuesday 18 March 2014 11:47:38 Michael Schuerig wrote:
[...]

I've reduced my setup to automount only a test share with very little 
content. This share gets (auto-)mounted at /net/tardis/srv/test. Autofs 
(/etc/auto.net) automatically creates the entire hierarchy including 
/net

$ inotifywait -m -r --format %T %w %e --timefmt %F %T /net
Setting up watches.  Beware: since -r was given, this may take a while!
Watches established.
2014-03-20 11:02:18 /net/ OPEN,ISDIR
2014-03-20 11:02:18 /net/ CLOSE_NOWRITE,CLOSE,ISDIR
2014-03-20 11:02:18 /net/ OPEN,ISDIR
2014-03-20 11:02:18 /net/tardis/ OPEN,ISDIR
2014-03-20 11:02:18 /net/ CLOSE_NOWRITE,CLOSE,ISDIR
2014-03-20 11:02:18 /net/tardis/ CLOSE_NOWRITE,CLOSE,ISDIR
2014-03-20 11:02:18 /net/tardis/ OPEN,ISDIR
2014-03-20 11:02:18 /net/tardis/srv/ OPEN,ISDIR
2014-03-20 11:02:18 /net/tardis/ CLOSE_NOWRITE,CLOSE,ISDIR
2014-03-20 11:02:18 /net/tardis/srv/ CLOSE_NOWRITE,CLOSE,ISDIR
2014-03-20 11:02:33 /net/ OPEN,ISDIR
2014-03-20 11:02:33 /net/ CLOSE_NOWRITE,CLOSE,ISDIR
2014-03-20 11:02:33 /net/ OPEN,ISDIR
2014-03-20 11:02:33 /net/tardis/ OPEN,ISDIR
2014-03-20 11:02:33 /net/ CLOSE_NOWRITE,CLOSE,ISDIR
2014-03-20 11:02:33 /net/tardis/ CLOSE_NOWRITE,CLOSE,ISDIR
2014-03-20 11:02:33 /net/tardis/ OPEN,ISDIR
2014-03-20 11:02:33 /net/tardis/srv/ OPEN,ISDIR
2014-03-20 11:02:33 /net/tardis/ CLOSE_NOWRITE,CLOSE,ISDIR
2014-03-20 11:02:33 /net/tardis/srv/ CLOSE_NOWRITE,CLOSE,ISDIR
...

These accesses repeat exactly every 15s. They go only as deep as 
/net/artis/srv and do not descend into /net/tardis/srv/test. They only 
occur when plasma-desktop is running.

I'm afraid that I may have to dismantle my panels to find the cause, 
however, I'm reluctant to do so as setting them up the way I want them 
takes quite some time. Is there a way to save/restore the configuration 
of one or more panels?

Michael

-- 
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/


-- 
To UNSUBSCRIBE, email to debian-kde-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1488964.zZ6z2C2drv@fuchsia



Re: Automounted NFS shares never timeout

2014-03-20 Thread Libor Klepáč
Hello,
i tried it too, in my case, it's 75seconds
2014-03-20 14:21:00 /mnt/smb4/backup/ OPEN,ISDIR
2014-03-20 14:21:00 /mnt/smb4/backup/ 
CLOSE_NOWRITE,CLOSE,ISDIR
2014-03-20 14:22:15 /mnt/smb4/backup/ OPEN,ISDIR
2014-03-20 14:22:15 /mnt/smb4/backup/ 
CLOSE_NOWRITE,CLOSE,ISDIR
2014-03-20 14:23:30 /mnt/smb4/backup/ OPEN,ISDIR
2014-03-20 14:23:30 /mnt/smb4/backup/ 
CLOSE_NOWRITE,CLOSE,ISDIR
2014-03-20 14:24:45 /mnt/smb4/backup/ OPEN,ISDIR
2014-03-20 14:24:45 /mnt/smb4/backup/ 
CLOSE_NOWRITE,CLOSE,ISDIR

Libor

On Thursday 20 March 2014 11:43:06 Michael Schuerig wrote:
 On Tuesday 18 March 2014 11:47:38 Michael Schuerig wrote:
 [...]
 
 I've reduced my setup to automount only a test share with very little
 content. This share gets (auto-)mounted at /net/tardis/srv/test. Autofs
 (/etc/auto.net) automatically creates the entire hierarchy including
 /net
 
 $ inotifywait -m -r --format %T %w %e --timefmt %F %T /net
 Setting up watches.  Beware: since -r was given, this may take a 
while!
 Watches established.
 2014-03-20 11:02:18 /net/ OPEN,ISDIR
 2014-03-20 11:02:18 /net/ CLOSE_NOWRITE,CLOSE,ISDIR
 2014-03-20 11:02:18 /net/ OPEN,ISDIR
 2014-03-20 11:02:18 /net/tardis/ OPEN,ISDIR
 2014-03-20 11:02:18 /net/ CLOSE_NOWRITE,CLOSE,ISDIR
 2014-03-20 11:02:18 /net/tardis/ CLOSE_NOWRITE,CLOSE,ISDIR
 2014-03-20 11:02:18 /net/tardis/ OPEN,ISDIR
 2014-03-20 11:02:18 /net/tardis/srv/ OPEN,ISDIR
 2014-03-20 11:02:18 /net/tardis/ CLOSE_NOWRITE,CLOSE,ISDIR
 2014-03-20 11:02:18 /net/tardis/srv/ CLOSE_NOWRITE,CLOSE,ISDIR
 2014-03-20 11:02:33 /net/ OPEN,ISDIR
 2014-03-20 11:02:33 /net/ CLOSE_NOWRITE,CLOSE,ISDIR
 2014-03-20 11:02:33 /net/ OPEN,ISDIR
 2014-03-20 11:02:33 /net/tardis/ OPEN,ISDIR
 2014-03-20 11:02:33 /net/ CLOSE_NOWRITE,CLOSE,ISDIR
 2014-03-20 11:02:33 /net/tardis/ CLOSE_NOWRITE,CLOSE,ISDIR
 2014-03-20 11:02:33 /net/tardis/ OPEN,ISDIR
 2014-03-20 11:02:33 /net/tardis/srv/ OPEN,ISDIR
 2014-03-20 11:02:33 /net/tardis/ CLOSE_NOWRITE,CLOSE,ISDIR
 2014-03-20 11:02:33 /net/tardis/srv/ CLOSE_NOWRITE,CLOSE,ISDIR
 ...
 
 These accesses repeat exactly every 15s. They go only as deep as
 /net/artis/srv and do not descend into /net/tardis/srv/test. They only
 occur when plasma-desktop is running.
 
 I'm afraid that I may have to dismantle my panels to find the cause,
 however, I'm reluctant to do so as setting them up the way I want them
 takes quite some time. Is there a way to save/restore the configuration
 of one or more panels?
 
 Michael


Re: Automounted NFS shares never timeout

2014-03-20 Thread Libor Klepáč
Now, i have tried

# kill -STOP {PID}
for ksysguardd, plasma-desktop, krunner, 
kded4 processes.
Only one stopped at a time.
Event always occurs.

Libor




Re: Automounted NFS shares never timeout

2014-03-18 Thread Carsten Pfeiffer
On Tuesday 18 March 2014 02:36:36 Michael Schuerig wrote:

 Anyway, there are no discernable accesses by any KDE component. The
 fault is probably elsewhere.

Then what happens if you test this with
- plain console
- a very simple session (fvwm + xterm)?

Cheers
Carsten

signature.asc
Description: This is a digitally signed message part.


Re: Automounted NFS shares never timeout

2014-03-18 Thread Michael Schuerig
On Tuesday 18 March 2014 10:02:43 Carsten Pfeiffer wrote:
 On Tuesday 18 March 2014 02:36:36 Michael Schuerig wrote:
  Anyway, there are no discernable accesses by any KDE component. The
  fault is probably elsewhere.
 
 Then what happens if you test this with
 - plain console
 - a very simple session (fvwm + xterm)?

On the console and in a KDE session for a freshly created user, the NFS 
is automatically unmounted when the timeout expires. In my usual KDE 
session, if I kill plasma-desktop, the timeout works, too. Restarting 
plasma-desktop causes the share to be automounted again, ie, without any 
explicit access to it.

Here's what the pstree output for plasma-desktop looks like:

plasma-desktop
  ├─ksysguardd
  ├─{KCupsConnection}
  ├─{QInotifyFileSys}
  ├─{QProcessManager}
  └─{plasma-desktop}

I've also tried strace'ing plasma-desktop (with -e trace=open and with 
grepping for relevant paths), but didn't see any accesses to the share 
there.

As I wrote in another reply, I was hoping to get some insight from 
autofs. Presumably it needs to know about which accesses and processes 
keep a mounted share from timing out. Unfortunately, even at debug 
level, no such information is in the log.

Michael

-- 
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/


signature.asc
Description: This is a digitally signed message part.


Re: Automounted NFS shares never timeout

2014-03-18 Thread Libor Klepáč
Hello,
i have simillar problem, but with autofs+cifs.

I run commands
umount -l /mnt/smb4/*/*
/etc/init.d/autofs stop
before leaving home and suspending my notebook.

When i forget to run those commands, plasma-desktop and krunner 
get stuck after resume.
lsof is also stuck.

Ussually, killing desktop and krunner helps.
I was investigating this several times, without success.
One time, i thought, it was caused by ksysguardd.

Libor


On Monday 17 March 2014 14:46:54 Michael Schuerig wrote:
 I have a single NFS share automounted by autofs. Once it is 
mounted, it
 is never (auto-)unmounted, even though I don't explicityl access it.
 Lsof does not show any open files below the mount point.
 
 My hypothesis is that some process periodically accesses the share,
 unfortunately, I can't find any such process. I'd have to catch it red-
 handed exactly when it accesses the share. I was suspecting the
 Removable Device Automounter (kded_device_automounter) and 
disabled
 it, but that didn't change anything.
 
 Any suggestion what (if any!) part of KDE might be causing this? Any
 general suggestion for finding the culprit?
 
 Michael


Re: Automounted NFS shares never timeout

2014-03-18 Thread Michael Schuerig
On Tuesday 18 March 2014 13:18:20 Libor Klepáč wrote:
 Hello,
 i have simillar problem, but with autofs+cifs.
 
 I run commands
 umount -l /mnt/smb4/*/*
 /etc/init.d/autofs stop
 before leaving home and suspending my notebook.

Somewhere in the autofs docs I read a warning against manually 
unmounting (or mounting) automounted shares. I don't remember the 
details.

 When i forget to run those commands, plasma-desktop and krunner
 get stuck after resume.
 lsof is also stuck.

Have a look at this bug report

  https://bugs.kde.org/show_bug.cgi?id=184062

Michael

-- 
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/


--
To UNSUBSCRIBE, email to debian-kde-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1576154.pYFETzoV60@fuchsia



Re: Automounted NFS shares never timeout

2014-03-18 Thread Johannes Zarl
On Tuesday 18 March 2014 01:40:53 Michael Schuerig wrote:
 A notable difference between NFS and sshfs is that in Dolphin the NFS
 share is shown in the places panel under Devices, whereas the sshfs
 share is not.

That doesn't have to mean anything. I've got four NFS shares on the same 
server, with all of them having identical entries in fstab (except for the 
path). 3 of them show up in dolphin, the fourth does not. God knows how the 
one share is different from the others to dolphin. So I guess that this little 
bug in dolphin is probably unrelated...

My next advice would have been to try inotify, but I saw you already did that…

Cheers,
  Johannes


--
To UNSUBSCRIBE, email to debian-kde-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1697694.rkcjiJvamT@mani



Re: Automounted NFS shares never timeout

2014-03-17 Thread Carsten Pfeiffer
On Monday 17 March 2014 14:46:54 Michael Schuerig wrote:
 I have a single NFS share automounted by autofs. Once it is mounted, it
 is never (auto-)unmounted, even though I don't explicityl access it.
 Lsof does not show any open files below the mount point.
 
 My hypothesis is that some process periodically accesses the share,
 unfortunately, I can't find any such process. 

Could it be a file indexer? Updatedb? Nepomuk?

I'd have to catch it red-

 Any suggestion what (if any!) part of KDE might be causing this? Any
 general suggestion for finding the culprit?

Maybe replace mount.nfs with a script that logs the output of pstree to a file?

Good luck,
Carsten

signature.asc
Description: This is a digitally signed message part.


Re: Automounted NFS shares never timeout

2014-03-17 Thread Michael Schuerig
On Monday 17 March 2014 22:37:35 Carsten Pfeiffer wrote:
 On Monday 17 March 2014 14:46:54 Michael Schuerig wrote:
  I have a single NFS share automounted by autofs. Once it is mounted,
  it is never (auto-)unmounted, even though I don't explicityl access
  it. Lsof does not show any open files below the mount point.
  
  My hypothesis is that some process periodically accesses the share,
  unfortunately, I can't find any such process.
 
 Could it be a file indexer? Updatedb? Nepomuk?

I don't think so. I've disabled nepomuk indexing and updatedb only runs 
once a day.

 I'd have to catch it red-
 
  Any suggestion what (if any!) part of KDE might be causing this? Any
  general suggestion for finding the culprit?
 
 Maybe replace mount.nfs with a script that logs the output of pstree
 to a file?

That wouldn't help. If the share is never mounted by an explicit access 
everything is fine. However, once it is mounted, it is never 
automatically unmounted even though it should. As far as I can tell, 
something is keeping the automount alive. I've set the autofs timeout to 
60s, but that didn't change anything.

I suspect it is in some way related to 

https://bugs.kde.org/show_bug.cgi?id=184062

ie, the desktop hangs if a mounted share disappears. IOW, something 
related to plasma apparently keeps looking at those shares. As far as I 
can tell, I have hidden the share in question everywhere it might be 
shown in plasma or dolphin.

Michael

-- 
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/


signature.asc
Description: This is a digitally signed message part.


Re: Automounted NFS shares never timeout

2014-03-17 Thread Carsten Pfeiffer
On Monday 17 March 2014 23:04:47 Michael Schuerig wrote:

 That wouldn't help. If the share is never mounted by an explicit access
 everything is fine. However, once it is mounted, it is never
 automatically unmounted even though it should. As far as I can tell,
 something is keeping the automount alive. I've set the autofs timeout to
 60s, but that didn't change anything.

I see.

 I suspect it is in some way related to
 
 https://bugs.kde.org/show_bug.cgi?id=184062
 
 ie, the desktop hangs if a mounted share disappears. IOW, something
 related to plasma apparently keeps looking at those shares. As far as I
 can tell, I have hidden the share in question everywhere it might be
 shown in plasma or dolphin.

You can try running kdebugdialog and enable various sections (e.g. kdirwatch, 
kdirlister, kfile, maybe solid) and have a look at .xsession-errors.

Maybe inotifywatch (https://github.com/rvoicilas/inotify-tools) helps in 
finding what happens at all.

Cheers
Carsten

signature.asc
Description: This is a digitally signed message part.


Re: Automounted NFS shares never timeout

2014-03-17 Thread Diederik de Haas
On Monday 17 March 2014 23:04:47 Michael Schuerig wrote:
 IOW, something 
 related to plasma apparently keeps looking at those shares.

Have you looked at the KRunner plugins?

-- 
GPG: 0x138E41915C7EFED6

signature.asc
Description: This is a digitally signed message part.


Re: Automounted NFS shares never timeout

2014-03-17 Thread Johannes Zarl
On Monday 17 March 2014 14:46:54 Michael Schuerig wrote:
 Any suggestion what (if any!) part of KDE might be causing this? Any
 general suggestion for finding the culprit?

You could try out whether lsof finds any open file on the nfs share:
lsof /media/YOUR_NFS_MOUNT

If that doesn't find anything, you can let it repeat every second for a while:

lsof -r1 /media/YOUR_NFS_MOUNT

Cheers,
  Johannes


-- 
To UNSUBSCRIBE, email to debian-kde-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/2307030.CodYrcH5qx@mani



Re: Automounted NFS shares never timeout

2014-03-17 Thread Michael Schuerig
On Tuesday 18 March 2014 00:15:07 Diederik de Haas wrote:
 On Monday 17 March 2014 23:04:47 Michael Schuerig wrote:
  IOW, something
  related to plasma apparently keeps looking at those shares.
 
 Have you looked at the KRunner plugins?

Anything in particular? What would I be looking for?

Michael

-- 
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/


signature.asc
Description: This is a digitally signed message part.


Re: Automounted NFS shares never timeout

2014-03-17 Thread Diederik de Haas
On Tuesday 18 March 2014 00:39:58 Michael Schuerig wrote:
  Have you looked at the KRunner plugins?
 
 Anything in particular? What would I be looking for?

Devices, Locations, Places and Recent Documents are the first I'd check for.
You could also try disabling them all and see if that fixes the issue. If it 
does, you can start enabling them one by one to find the culprit.
-- 
GPG: 0x138E41915C7EFED6

signature.asc
Description: This is a digitally signed message part.


Re: Automounted NFS shares never timeout

2014-03-17 Thread Michael Schuerig
On Tuesday 18 March 2014 00:22:43 Johannes Zarl wrote:
 On Monday 17 March 2014 14:46:54 Michael Schuerig wrote:
  Any suggestion what (if any!) part of KDE might be causing this? Any
  general suggestion for finding the culprit?
 
 You could try out whether lsof finds any open file on the nfs share:
 lsof /media/YOUR_NFS_MOUNT
 
 If that doesn't find anything, you can let it repeat every second for
 a while:
 
 lsof -r1 /media/YOUR_NFS_MOUNT

I had already tried single shot lsof, without finding anything. Now 
with

$ lsof -r2 -x +D /net/tardis/

I dont't get anything either. I thought that maybe autofs was at fault, 
but it works perfectly for another sshfs share. That one really gets 
unmounted when it isn't explicitly accessed during its timeout interval. 

A notable difference between NFS and sshfs is that in Dolphin the NFS 
share is shown in the places panel under Devices, whereas the sshfs 
share is not. Killing all dolphin processes doesn't change anything, 
though.

Michael

-- 
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/


-- 
To UNSUBSCRIBE, email to debian-kde-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/2400037.GRgC81f7cY@fuchsia



Re: Automounted NFS shares never timeout

2014-03-17 Thread Michael Schuerig
On Tuesday 18 March 2014 00:03:26 Carsten Pfeiffer wrote:
 On Monday 17 March 2014 23:04:47 Michael Schuerig wrote:
[...]
 You can try running kdebugdialog and enable various sections (e.g.
 kdirwatch, kdirlister, kfile, maybe solid) and have a look at
 .xsession-errors.
 
 Maybe inotifywatch (https://github.com/rvoicilas/inotify-tools) helps
 in finding what happens at all.

I tried inotifywait -r (BTW, inotify-tools are available as a package at 
least in sid), lsof +x +D, watched .xsession-errors -- nothing. Also, I 
set autofs logging to debug, generating a lot of messages, including

Mar 18 01:45:01 fuchsia automount[28054]: 1 remaining in /net

Anyway, there are no discernable accesses by any KDE component. The 
fault is probably elsewhere.

Thanks for replying.

Michael

-- 
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/


-- 
To UNSUBSCRIBE, email to debian-kde-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/3777623.3J8dOsJvfk@fuchsia