Bug 124909 - [patch] konqueror mounts autofs controlled mountpoints by accessing them unneccessarily
Summary: [patch] konqueror mounts autofs controlled mountpoints by accessing them unne...
Status: CONFIRMED
Alias: None
Product: konqueror
Classification: Applications
Component: general (other bugs)
Version First Reported In: 4.8.3
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Bugs
URL:
Keywords:
: 157907 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-04 15:12 UTC by Tim Kelley
Modified: 2025-07-13 18:27 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Prevent kfoldermimetype from searching for .directory files in autofs ghost mounts (2.37 KB, patch)
2009-01-13 03:29 UTC, Travers Carter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Kelley 2006-04-04 15:12:41 UTC
Version:           3.5.0-1.2.el4.kde (using KDE 3.5.0-5.0.el4.kde, CentOS release 4.2 (Final))
Compiler:          gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)
OS:                Linux (i686) release 2.6.9-22.0.2.ELsmp

Even with file previews turned off and "icons reflect folder contents" off, konqueror attempts to mount every single directory in an autofs controlled mount point when the parent is accessed.  For e.g., if /home contains home directories for 1000 users, konqueror will mount all 1000 of them upon accessing /home.  This behavior, while perhaps acceptable in a small environment, is entirely unsuitable for a large UNIX environment with many autofs controlled mount points.  When konqueror attempts to mount, say, 1000 NFS shares, it hangs for so long that it may as well be considered a crash. A more suitable behavior would be for konqueror to not mount remote NFS shares at all, by default, unless they are actually accessed.
Comment 1 Tim Kelley 2006-04-04 16:07:19 UTC
I forgot to mention something important - this of course only happens when the --ghost argument is passed to automount, causing the directories to appear although they are not actually mounted.  Konqueror will mount everything under an autofs controlled /home, for instance, upon typing "/home" in the location bar.
Comment 2 Thiago Macieira 2006-04-06 23:47:53 UTC
Are you using icon view or list view in Konqueror?
Comment 3 Tim Kelley 2006-04-07 00:34:14 UTC
icon view, have not tried in list view; come to think of it I never use list view at all ...
Comment 4 Thiago Macieira 2006-04-07 09:19:28 UTC
If you're using icon view, turn off all thumbnail and file previews if you go to /home constantly. The reason for that is that Konqueror assigns an icon for folder ("Folder icon reflects contents") and, for that, it has to scan what's inside the folder.
Comment 5 Tim Kelley 2006-05-03 18:50:15 UTC
I'm sorry, konqueror still does this even with previews turned completely off.  That was the point of the bug report - unless there's a place besides Konqueror -> Settings -> Configure Konqueror -> Previews and Meta-Data to turn it off ...
Comment 6 Tim Kelley 2006-05-17 16:04:38 UTC
Since this issue is not resolved, and konq exhibits this behavior with all previews turned off, and additionally in views other than "Icon View" and "MultiColumn View", this should be considered a bug.
Comment 7 Ritesh Khadgaray 2007-07-19 13:07:15 UTC
This issue is reproducible with kde 3.5
Comment 8 Ritesh Khadgaray 2007-07-19 13:10:52 UTC
ability to turn off .directory file would be helpful .
Comment 9 Tim Kelley 2007-07-19 13:29:12 UTC
all previews are turned off. /opt is an automount point. these filke access attemtps cause the automounter to mount all the directories. This is a major, major bug. Please address this.


Proof: 

wombat [tim]% strace -f konqueror /opt 2>&1 | grep opt
execve("/usr/bin/konqueror", ["konqueror", "/opt"], [/* 47 vars */]) = 0
read(3, "strace\0-f\0konqueror\0/opt\0", 1024) = 25
access("/opt/bin/konqueror", F_OK)      = -1 ENOENT (No such file or directory)
getsockopt(10, SOL_SOCKET, SO_PEERCRED, "\225f\0\0\350\3\0\0\350\3\0\0", [12]) = 0
access("/opt", F_OK)                    = 0
stat64("/opt", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
access("/opt", R_OK)                    = 0
stat64("/opt", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
access("/opt", R_OK)                    = 0
open("/opt/.directory", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/opt", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
access("/opt", R_OK)                    = 0
access("/opt/.directory", R_OK)         = -1 ENOENT (No such file or directory)
access("/opt/.directory", F_OK)         = -1 ENOENT (No such file or directory)
stat64("/opt", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
lstat64("/opt", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
access("/opt", W_OK)                    = -1 EACCES (Permission denied)
setsockopt(15, SOL_IPV6, IPV6_V6ONLY, [0], 4) = -1 EOPNOTSUPP (Operation not supported)
access("/opt", R_OK)                    = 0
access("/opt/sbin", R_OK)               = 0
access("/opt/man", R_OK)                = 0
access("/opt/etc", R_OK)                = 0
access("/opt/share", R_OK)              = 0
access("/opt/lib", R_OK)                = 0
access("/opt/games", R_OK)              = 0
access("/opt/include", R_OK)            = 0
access("/opt/src", R_OK)                = 0
access("/opt/bin", R_OK)                = 0
access("/opt/sbin/.directory", R_OK)    = -1 ENOENT (No such file or directory)
access("/opt/sbin/.directory", R_OK)    = -1 ENOENT (No such file or directory)
access("/opt/man/.directory", R_OK)     = -1 ENOENT (No such file or directory)
access("/opt/man/.directory", R_OK)     = -1 ENOENT (No such file or directory)
access("/opt/etc/.directory", R_OK)     = -1 ENOENT (No such file or directory)
access("/opt/etc/.directory", R_OK)     = -1 ENOENT (No such file or directory)
access("/opt/share/.directory", R_OK)   = -1 ENOENT (No such file or directory)
access("/opt/share/.directory", R_OK)   = -1 ENOENT (No such file or directory)
access("/opt/lib/.directory", R_OK)     = -1 ENOENT (No such file or directory)
access("/opt/lib/.directory", R_OK)     = -1 ENOENT (No such file or directory)
access("/opt/games/.directory", R_OK)   = -1 ENOENT (No such file or directory)
access("/opt/games/.directory", R_OK)   = -1 ENOENT (No such file or directory)
access("/opt/include/.directory", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/include/.directory", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/src/.directory", R_OK)     = -1 ENOENT (No such file or directory)
access("/opt/src/.directory", R_OK)     = -1 ENOENT (No such file or directory)
access("/opt/bin/.directory", R_OK)     = -1 ENOENT (No such file or directory)
access("/opt/bin/.directory", R_OK)     = -1 ENOENT (No such file or directory)
open("/opt/sbin/.directory", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
access("/opt/sbin/.directory", R_OK)    = -1 ENOENT (No such file or directory)
Comment 10 Ritesh Khadgaray 2007-07-24 22:11:53 UTC
is there a way to turn off .desktop file "scan" ?
Comment 11 Tommi Tervo 2008-02-16 10:09:15 UTC
*** Bug 157907 has been marked as a duplicate of this bug. ***
Comment 12 Aaron Williams 2008-02-19 22:17:01 UTC
One solution to this problem might be to run the scan as a low priority background thread. I like having the icon preview support. Another alternative is if previewing folders turns out to be slow to automatically disable it or background it.

I find it really annoying when just trying to type a directory into the location bar.
Comment 13 Colin.Simpson 2008-03-05 14:01:38 UTC
Is there a work around that anyone has found? This is hitting us really hard, as some of our automounts are over high latency links.

Comment 14 Travers Carter 2009-01-13 03:25:43 UTC
I have been having the same problem with KDE triggering all autofs ghost mounts in a directory to be mounted, especially in the file chooser.

The problem appears to be a kdelibs issue in kdecore/services/kfoldermimetype.cpp where KDE always looks for a .directory entry, which triggers the mount, with around 100 ghost mounts this can be quite slow.

I have patched kfoldermimetype.cpp (against v4.1.3) to first use statfs() to check whether a directory is an autofs mountpoint before checking for .directory, which resolves the problem for me.  I guess this will add some overhead, but it provides a significant performance improvement when using autofs with ghost mounts.

Comment 15 Travers Carter 2009-01-13 03:29:20 UTC
Created attachment 30205 [details]
Prevent kfoldermimetype from searching for .directory files in autofs ghost mounts
Comment 16 David Faure 2009-01-15 03:01:51 UTC
Interesting patch.
For performance reasons, and code reuse, this belongs to KMountPoint though.
Added to my TODO list.
Comment 17 Dawit Alemayehu 2012-01-07 17:00:01 UTC
@David: Is this still on your TODO list or is it already done ?
Comment 18 Janek Bevendorff 2012-06-18 19:34:38 UTC
There hasn't been any activity on this issue for some time. Please check if this issue is still valid for Konqueror 4.8.4 or later.
Comment 19 Colin.Simpson 2012-06-21 14:51:36 UTC
The latest I have access to is 4.8.3 in Fedora 17. But it's still broken in that version.

I doubt this is purely a konqueror problem. Any KDE file dialog that you hit an autofs directory with ghosting/browsing turned on causes all autofs points to be mounted. These dialogs seems to stat all dirs which makes autofs mount them.
Comment 20 Jekyll Wu 2012-06-22 02:51:30 UTC
Thanks for your feedback
Comment 21 Florian Hubold 2014-08-13 18:17:43 UTC
Seems the bug I've reported some months ago could be the same issue:
https://bugs.kde.org/show_bug.cgi?id=328772
Maybe I can try with an adapted patch from Comment #15 applied ...

@David: Could you please have a look again? As this bug is only the first issue, in my bug this is actually multiplied by the fact that kfile seems to try to scan each shortcut you have in places panel (which happen to be multiple links all pointing to network shares) and there seems no way to prevent that.

I'd already be glad and a happy bunny when there would be some way to turn of this background scanning by some config option in ~/.kde/share/config or whatever.
Comment 22 Andrew Crouthamel 2018-11-12 02:57:17 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 23 Colin.Simpson 2018-11-13 11:36:07 UTC
It still happens on Konqueror 5.0.97. If you go to the top of an automount point it will try to graphically display each subfolder even though these that are NFS points ghost mounts. So mounts all NFS points. 

Maybe should be a preference do descend into NFS subdirs for the graphic display?
Comment 24 Andrew Crouthamel 2018-11-21 04:39:59 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!
Comment 25 Colin.Simpson 2018-11-21 12:22:22 UTC
Was my comment not enough for this to stay as an open bug even though I'm not the original reporter?

(In reply to Andrew Crouthamel from comment #24)
> Dear Bug Submitter,
> 
> This is a reminder that this bug has been stagnant for a long time. Could
> you help us out and re-test if the bug is valid in the latest version? This
> bug will be moved back to REPORTED Status for manual review later, which may
> take a while. If you are able to, please lend us a hand.
> 
> Thank you for helping us make KDE software even better for everyone!
Comment 26 Andrew Crouthamel 2018-11-21 19:02:28 UTC
(In reply to Colin.Simpson from comment #25)
> Was my comment not enough for this to stay as an open bug even though I'm
> not the original reporter?
> 
> (In reply to Andrew Crouthamel from comment #24)
> > Dear Bug Submitter,
> > 
> > This is a reminder that this bug has been stagnant for a long time. Could
> > you help us out and re-test if the bug is valid in the latest version? This
> > bug will be moved back to REPORTED Status for manual review later, which may
> > take a while. If you are able to, please lend us a hand.
> > 
> > Thank you for helping us make KDE software even better for everyone!

It doesn't appear you changed status to Reported when you replied, so it was caught in the search I had. Thanks for the update!