Summary: | KConfig fails to sync on VFAT, CIFS, and EncFS (on top of Ext4) file systems | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kdelibs | Reporter: | Pietro <pietro110> |
Component: | kdecore | Assignee: | David Faure <faure> |
Status: | CLOSED FIXED | ||
Severity: | normal | CC: | bernhard, b_jacquemin, dennis.wouters, drorata, faure, kdelibs-bugs, kp, marcus.moeller, michel.ludwig, phillip.sky, rainer.merz, rakuco, rdieter, sm, subscriptions, thomas.braun |
Priority: | NOR | ||
Version: | SVN | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.7.1 |
Description
Pietro
2009-08-12 12:20:32 UTC
I discovered that the bug is there if and only if I save the project on FAT32 filesystems. If I move them to the home (ext4) I can manage project files. I tried with three different FAT32 systems and the bug is there. What kile version do you have? The full rpm package name might be best. What QT Version? Which mount options do you use for the FAT32 filesystems? So you have no problems at all on ext4? I used kile version: kile-2.1-0.924057.3mdv2009.1.i586 (MDV 2009.1 official), I tried also to update to kile-2.1-0.b1.1mdv2009.1 (testing version) but it's the same. QT: libqtcore4-4.5.2-1.3mdv2009.1 and for one of the FAT32 filesystem the options are: /dev/sda5 /mnt/data vfat umask=000,iocharset=utf8 0 0 the other is mounted by truecrypt and the output of `mount` is: truecrypt on /tmp/.truecrypt_aux_mnt1 type fuse.truecrypt (rw,nosuid,nodev,allow_other) /dev/mapper/truecrypt1 on /mnt/crypto type vfat (rw,uid=500,gid=500,umask=077) I do not have any problem on ext4 and reiserfs. Thanks. This seems to a bug in KConfig::sync. The locking of the file seems to fail as it prints "couldn't lock local file" and returns from the 'sync' method. *** Bug 217173 has been marked as a duplicate of this bug. *** *** Bug 216717 has been marked as a duplicate of this bug. *** the bug is actually in KLockFile which does hardlinking tricks in an attempt at being NFS2-safe. of course this must utterly fail on fat. a solution would be falling back to regular posix file locks. in fact, one might ditch this nfs2-safety at all ... who still uses this crap nowadays? An easy workaround is to store project files on the home ext3 file system. (trivial, I know, but sometimes the trivial is hard to see :) I already wrote that in second comment, but this is not a solution since I wanted to share project files with other operating system (such as Win) so a FAT must be used. OK, now also NTFS can be used but I didn't try what happens on that filesystem. However, kile was used to handle files in FAT and should do the same now. If the problem is in the backend it should be solved since I think other applications use that backend. *** Bug 239045 has been marked as a duplicate of this bug. *** Thanks, Oswald, for managing Bug 239045. As described KDE config isn't saved in a encrypted (encfs) home directory. @Ian: I did a similar workaround as you proposed. But in the .kde directory are personal data I don't want to be stored unencrypted on my harddisk. Sadly I'm not familiar with C++ and KDE programming so I'm not able to submit a patch. I can confirm this issue. I tried moving the .kliper to my home dir, but then KILE couldn't open the files in the project since they were still stored on the FAT32 partition. I think I can reproduce the same on Fedora 13 with a mounted CIFS user-home (without posix extensions). With kile, I get the "can't lock local file" messages (hundreds of them) and kile's configuration isn't kept at all. Is anyone actually working on a fix for this issue? *** Bug 267466 has been marked as a duplicate of this bug. *** It's definitly related to the way links are created: 15319 13:46:44.680463 write(10, "15319\n", 6) = 6 <0.001848> 15319 13:46:44.682429 write(10, "systemsettings\n", 15) = 15 <0.001075> 15319 13:46:44.683647 write(10, "moellema.ethz.ch\n", 17) = 17 <0.001376> 15319 13:46:44.685182 link("/home/moellema/.kde/share/config/kdebugrc.lock.T15319", "/home/moellema/.kde/share/config/kdebugrc.lock") = -1 EOPNOTSUPP (Operation not supported) <0.001892> 15319 13:46:44.687389 _llseek(10, 0, [0], SEEK_SET) = 0 <0.000048> 15319 13:46:44.687555 close(10) = 0 <0.002003> From the above output, link is used to create a hardlink which is not supported on that kind of shares. A solution could be to use soft links instead. I'm looking into a O_EXCL implementation on non-nfs filesystems. Git commit 3f0ce125052b9ef9c1f02733871ca88b64a68d90 by David Faure. Committed on 03/06/2011 at 10:41. Pushed by dfaure into branch 'master'. Implement locking on non-NFS systems using O_EXCL Fixes locking on VFAT and CIFS etc. BUG: 203554 M +227 -69 kdecore/io/klockfile_unix.cpp M +2 -0 kdecore/io/kmountpoint.cpp M +1 -0 kdecore/tests/CMakeLists.txt A +44 -0 kdecore/tests/klockfile_testlock.cpp [License: LGPL (v2+)] M +26 -5 kdecore/tests/klockfiletest.cpp http://commits.kde.org/kdelibs/3f0ce125052b9ef9c1f02733871ca88b64a68d90 Git commit 12484b1abfe57abfe45df4d9d0a5f652e4d6ec02 by David Faure. Committed on 03/06/2011 at 16:19. Pushed by dfaure into branch 'master'. Revert "Implement locking on non-NFS systems using O_EXCL" This reverts commit 3f0ce125052b9ef9c1f02733871ca88b64a68d90. I didn't mean to commit it yet (it needs cleanups, at least), and it breaks compilation for someone. CCBUG: 203554 M +69 -227 kdecore/io/klockfile_unix.cpp M +0 -2 kdecore/io/kmountpoint.cpp M +0 -1 kdecore/tests/CMakeLists.txt D +0 -44 kdecore/tests/klockfile_testlock.cpp M +5 -26 kdecore/tests/klockfiletest.cpp http://commits.kde.org/kdelibs/12484b1abfe57abfe45df4d9d0a5f652e4d6ec02 *** Bug 275189 has been marked as a duplicate of this bug. *** Can confirm that the patchset doesn't compile on Fedora 15 x86_64: /usr/bin/cmake -E cmake_progress_report /builddir/build/BUILD/kdelibs-4.6.4/x86_64-redhat-linux-gnu/CMakeFiles [ 17%] Building CXX object kdecore/CMakeFiles/kdecore.dir/io/klockfile_unix.o cd /builddir/build/BUILD/kdelibs-4.6.4/x86_64-redhat-linux-gnu/kdecore && /usr/lib64/ccache/c++ -DMAKE_KDECORE_LIB -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS - DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=21 -DQT_NO_CAST_FROM_ASCII -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-alig n -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common -Werror=return-type -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden - O2 -DNDEBUG -DQT_NO_DEBUG -fPIC -I/builddir/build/BUILD/kdelibs-4.6.4/x86_64-redhat-linux-gnu/kdecore -I/builddir/build/BUILD/kdelibs-4.6.4/kdecore -I/builddir/build/BUILD/kdelibs-4.6.4 -I/builddir/build/BUILD/kdelibs-4.6.4/x86_64-redhat-l inux-gnu -I/builddir/build/BUILD/kdelibs-4.6.4/interfaces -I/builddir/build/BUILD/kdelibs-4.6.4/x86_64-redhat-linux-gnu/kdecore/network -I/builddir/build/BUILD/kdelibs-4.6.4/kdecore/sonnet -I/builddir/build/BUILD/kdelibs-4.6.4/kdecore/auth -I/builddir/build/BUILD/kdelibs-4.6.4/kjs -I/builddir/build/BUILD/kdelibs-4.6.4/x86_64-redhat-linux-gnu/kjs -I/builddir/build/BUILD/kdelibs-4.6.4/kdecore/compression -I/builddir/build/BUILD/kdelibs-4.6.4/kdecore/config -I/builddir/build/B UILD/kdelibs-4.6.4/kdecore/date -I/builddir/build/BUILD/kdelibs-4.6.4/kdecore/io -I/builddir/build/BUILD/kdelibs-4.6.4/kdecore/jobs -I/builddir/build/BUILD/kdelibs-4.6.4/kdecore/kernel -I/builddir/build/BUILD/kdelibs-4.6.4/kdecore/network -I/builddir/build/BUILD/kdelibs-4.6.4/kdecore/services -I/builddir/build/BUILD/kdelibs-4.6.4/kdecore/localization -I/builddir/build/BUILD/kdelibs-4.6.4/kdecore/sycoca -I/builddir/build/BUILD/kdelibs-4.6.4/kdecore/text -I/builddir/build/BUI LD/kdelibs-4.6.4/kdecore/util -I/usr/include/QtCrypto -I/usr/include/polkit-qt-1 -I/usr/include/phonon -I/usr/include/QtXmlPatterns -I/usr/include/QtXml -I/usr/include/QtWebKit -I/usr/include/QtUiTools -I/usr/include/QtTest -I/usr/include/ QtSvg -I/usr/include/QtSql -I/usr/include/QtScriptTools -I/usr/include/QtScript -I/usr/include/QtOpenGL -I/usr/include/QtNetwork -I/usr/include/QtMultimedia -I/usr/include/QtHelp -I/usr/include/QtDesigner -I/usr/include/QtDeclarative -I/us r/include/QtDBus -I/usr/include/Qt3Support -I/usr/include/QtGui -I/usr/include/QtCore -I/usr/include/Qt -I/usr/lib64/qt4/mkspecs/default -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -o CMakeFiles/kdecore.dir/io/klockfile_unix.o -c /builddir/build /BUILD/kdelibs-4.6.4/kdecore/io/klockfile_unix.cpp In file included from /usr/include/fcntl.h:267:0, from /builddir/build/BUILD/kdelibs-4.6.4/kdecore/util/kde_file.h:33, from /builddir/build/BUILD/kdelibs-4.6.4/kdecore/io/klockfile_unix.cpp:46: In function 'int open(const char*, int, ...)', inlined from 'KLockFile::LockResult KLockFile::Private::lockFileOExcl(stat&)' at /builddir/build/BUILD/kdelibs-4.6.4/kdecore/io/klockfile_unix.cpp:284:63: /usr/include/bits/fcntl2.h:51:26: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments make[2]: *** [kdecore/CMakeFiles/kdecore.dir/io/klockfile_unix.o] Error 1 make[2]: Leaving directory `/builddir/build/BUILD/kdelibs-4.6.4/x86_64-redhat-linux-gnu' make[1]: *** [kdecore/CMakeFiles/kdecore.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... Is there a new patchset available to test? I think dfaure forgot to reopen the bug after reverting his commit (comment #17). Doing that now. Git commit 10ca4ddc8cca49103c2d605a64468788605f3010 by David Faure. Committed on 06/08/2011 at 14:53. Pushed by dfaure into branch 'KDE/4.7'. Implement locking on non-NFS systems using O_EXCL Fixes locking on VFAT and CIFS etc. The unit-test only tests local files automatically, but explains how to set up test environments to test it on a FAT filesystem and on a NFS mount. BUG: 203554 M +182 -72 kdecore/io/klockfile_unix.cpp M +1 -0 kdecore/tests/CMakeLists.txt M +39 -5 kdecore/tests/klockfiletest.cpp http://commits.kde.org/kdelibs/10ca4ddc8cca49103c2d605a64468788605f3010 Git commit 63b8ad8b7c6cc9845f11e5fbacf1a8cc9c977859 by David Faure. Committed on 06/08/2011 at 14:53. Pushed by dfaure into branch 'frameworks'. Implement locking on non-NFS systems using O_EXCL Fixes locking on VFAT and CIFS etc. The unit-test only tests local files automatically, but explains how to set up test environments to test it on a FAT filesystem and on a NFS mount. BUG: 203554 (cherry picked from commit 10ca4ddc8cca49103c2d605a64468788605f3010) M +182 -72 kdecore/io/klockfile_unix.cpp M +1 -0 kdecore/tests/CMakeLists.txt M +39 -5 kdecore/tests/klockfiletest.cpp http://commits.kde.org/kdelibs/63b8ad8b7c6cc9845f11e5fbacf1a8cc9c977859 Still get: couldn't lock local file on CIFS mounted share (whithout unix extensions, but mfsymlink support). Greets Marcus Hmm, seems that the patch did not apply correctly. CMake Error at cmake/modules/KDE4Macros.cmake:984 (add_executable): Cannot find source file: klockfile_testlock.cpp I am now trying to build without the tests Only builds if you additionally cherry pick klockfile_testlock.cpp from the commit in comment #17. Missing test file added in commit f529824 in 4.7 branch, sorry. Should all be ok now ;) Okay, we still need verification for CIFIS. Works with CIFS user homes. Login to KDE desktop, changing system settings, open applications and change their settings all worked. Settings were still there after closing apps, logout-login, rebooting or on other systems with the same mounted home. Tested with KDE 4.6.5 on Fedora 15 x86_64. This defect was fixed by KDAB and Intevation and the fix was funded by the IT Services of ETH Zurich. |