Bug 1404808 - gamin not set to poll nfs mounts
Summary: gamin not set to poll nfs mounts
Keywords:
Status: CLOSED DUPLICATE of bug 917848
Alias: None
Product: Fedora
Classification: Fedora
Component: kf5-kcoreaddons
Version: 24
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Daniel Vrátil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-14 17:15 UTC by Tom Shield
Modified: 2017-01-17 21:53 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-17 21:53:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tom Shield 2016-12-14 17:15:42 UTC
Description of problem:

kwrite hangs when opening a file on an NFS mount (either on the command line or when clicking open when current directory is on NFS).  Here is the backtrace from gdb when it is hung (sigint is when I did ctrl-c in gdb terminal)

Thread 1 "kwrite" received signal SIGINT, Interrupt.
0x00007ffff29bc9fd in nanosleep () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff29bc9fd in nanosleep () from /lib64/libc.so.6
#1  0x00007ffff369fdfd in qt_nanosleep(timespec) ()
   from /lib64/libQt5Core.so.5
#2  0x00007ffff3602db8 in QThread::msleep(unsigned long) ()
   from /lib64/libQt5Core.so.5
#3  0x00007ffff4614957 in KDirWatchPrivate::useFAM(KDirWatchPrivate::Entry*)
    () from /lib64/libKF5CoreAddons.so.5
#4  0x00007ffff4614cfb in KDirWatchPrivate::addWatch(KDirWatchPrivate::Entry*) () from /lib64/libKF5CoreAddons.so.5
#5  0x00007ffff4615892 in KDirWatchPrivate::addEntry(KDirWatch*, QString const&, KDirWatchPrivate::Entry*, bool, QFlags<KDirWatch::WatchMode>) ()
   from /lib64/libKF5CoreAddons.so.5
#6  0x00007ffff46167f3 in KDirWatch::addFile(QString const&) ()
   from /lib64/libKF5CoreAddons.so.5
#7  0x00007ffff783939c in KTextEditor::DocumentPrivate::activateDirWatch(QString const&) () from /lib64/libKF5TextEditor.so.5
#8  0x00007ffff7852493 in KTextEditor::DocumentPrivate::openFile() ()
   from /lib64/libKF5TextEditor.so.5
#9  0x00007ffff70b8891 in KParts::ReadOnlyPartPrivate::openLocalFile() ()
   from /lib64/libKF5Parts.so.5
#10 0x00007ffff70b9724 in KParts::ReadOnlyPart::openUrl(QUrl const&) ()
   from /lib64/libKF5Parts.so.5
#11 0x00007ffff783ceee in KTextEditor::DocumentPrivate::openUrl(QUrl const&)
    () from /lib64/libKF5TextEditor.so.5
#12 0x000055555556253a in KWrite::loadURL(QUrl const&) ()
#13 0x0000555555560d30 in main ()

here is how my home directory is mounted

enet-hs11.enet.umn.edu:/export/homes/home01/shield on /h/shield type nfs4 (rw,nosuid,nodev,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=128.101.143.42,local_lock=none,addr=192.168.20.23)

opening a file in /tmp works fine.

Version-Release number of selected component (if applicable):

gamin-0.1.10-22.fc24.x86_64


How reproducible:

every time


Steps to Reproduce:
1. cd to an nfs mounted directory
2. run kwrite
3. click open and application hangs

Actual results:

hangs 

Expected results:

file opened or open file dialog appears


Additional info:

adding 

fsset nfs poll 10 

to /etc/gamin/gaminrc (which does not exist in the rpm)

solves this problem (after sending gam_server a SIGHUP).

I suggest this configuration be included in the rpm.  See the file

/usr/share/doc/gamin/config.html

for more information.

Comment 1 Tom Shield 2016-12-14 18:39:47 UTC
I just noticed that this also fixed the problem I was having with the KDE screen locker program.  I was getting my session locked but no lockscreen window displayed (I could still see the open windows, but my mouse had no effect on them) and was having to use loginctl to unlock my session.  

I think both of these problems showed up when I updated to F24 and KDE 5.  Under F22/KDE4 it did not have these problems with my NFS home directory.

Comment 2 Ondrej Holy 2016-12-15 08:08:57 UTC
Polling should be enabled for nfs by default, see gam_fs_init:
https://git.gnome.org/browse/gamin/tree/server/gam_fs.c?id=b92b17ecced6df463da73d6de566740cf5cd00d4#n170

It is hardcoded, so configuration file doesn't have to be part of the rpm file.

There is no development in gamin, see:
https://git.gnome.org/browse/gamin/

So I suppose it has to be caused by some changes in KDE, tentatively reassigning to kf5-kcoreaddons...

Comment 3 Tom Shield 2016-12-15 16:17:54 UTC
Ok, I thought the other choice was that it was a kf5/qt problem, but was not sure where to report it to.  

I tried the following: moving the gaminrc file I added to gaminrc.off and HUPing gam_server.  Kwrite still opens a file in my home directory ok.  So adding the gaminrc file was not the solution.  So perhaps it was the HUP sent to gam_server that did it, which might mean there is an order problem with gam_server startup and the rest of the kf5 stuff and HUPing gam_server corrected it. 

Another bit of info along those lines:  Kate from the F24 rpm would not start either, but the kate executable from the Kate web site of the same version (16.08) works.  I've reverted to the executable from the rpm and it now works, I assume it's calling the same code as kwrite to open files.  But this indicates it might be some type of build option that is different.

Comment 4 Rex Dieter 2016-12-15 16:38:25 UTC
gamin has some semi well-known deadlocks when it comes to polling nfs.

See bug #917848

If signalling or killing gamin resolves it, it's likely something similar.

Comment 5 Rex Dieter 2016-12-15 16:41:45 UTC
And as far as gaminrc goes, support for that was added recently,

%changelog
* Fri Sep 23 2016 Rex Dieter <rdieter> - 0.1.10-24
- ship sample /etc/gamin/gaminrc, /etc/gamin/mandatory_gaminrc
...

(though not included in any f24/f25 updates yet, it was largely cosmetic)

Comment 6 Tom Shield 2017-01-17 21:53:41 UTC
There is something flaky going on here, but I can no longer reproduce anything repeatably after some updates for KDE components were applied.  As bug #917848 is in the system, might as well just close this one out.

*** This bug has been marked as a duplicate of bug 917848 ***


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