Mac: kbuildsycoca5 and kded5 deadloop *somewhere* after upgrading to Qt 5.7.1

René J.V. Bertin rjvbertin at gmail.com
Fri Dec 30 18:29:35 UTC 2016


On Friday December 30 2016 18:49:46 David Faure wrote:

> > Edit: it doesn't.
> 
> What's it and what is it that it doesn't?

Sorry, yes.

> Can you reproduce the problem on Linux or not?

No. kbuildsycoca5 finishes without issues there. It may run a bit slower but that could just as well be my imagination.

> Anyhow, please post backtraces. Anything else is just guessing.

OK, attaching lldb after letting kbuildsycoca5 --noincremental run for about 15min. while I made a fresh cuppa:

* thread #1: tid = 0x21d12b0, 0x00007fff8ca0c0aa libsystem_kernel.dylib`__getattrlist + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x00007fff8ca0c0aa libsystem_kernel.dylib`__getattrlist + 10
    frame #1: 0x00007fff8f949da7 CoreServicesInternal`corePropertyProviderPrepareValues(__CFURL const*, __FileCache*, __CFString const* const*, void const**, long, void const*, __CFError**) + 484
    frame #2: 0x00007fff8f93ffbb CoreServicesInternal`prepareValuesForBitmap(__CFURL const*, __FileCache*, _FilePropertyBitmap*, __CFError**) + 227
    frame #3: 0x00007fff8f93dca7 CoreServicesInternal`_FSURLCopyResourcePropertyForKeyInternal(__CFURL const*, __CFString const*, void*, void*, __CFError**, unsigned char) + 213
    frame #4: 0x00007fff8f93dbcd CoreServicesInternal`_FSURLCopyResourcePropertyForKey + 15
    frame #5: 0x00007fff866a02bb CoreFoundation`CFURLCopyResourcePropertyForKey + 123
    frame #6: 0x0000000106e5bf5c QtCore`hasResourcePropertyFlag(data=<unavailable>, entry=<unavailable>, key=<unavailable>) + 172 at qfilesystemengine_unix.cpp:86
    frame #7: 0x0000000106e5a549 QtCore`QFileSystemEngine::fillMetaData(entry=0x00007f80a96ae078, data=0x00007f80a96ae090, what=<unavailable>) + 649 at qfilesystemengine_unix.cpp:529
    frame #8: 0x0000000106dff291 QtCore`QFileInfo::isHidden(this=<unavailable>) const + 81 at qfileinfo.cpp:970
    frame #9: 0x0000000106df7343 QtCore`QDirIteratorPrivate::matchesFilters(this=0x00007f80a96ade70, fileName=<unavailable>, fi=0x00007fff591e4ae0) const + 387 at qdiriterator.cpp:358
    frame #10: 0x0000000106df6c45 QtCore`QDirIteratorPrivate::advance(this=0x00007f80a96ade70) + 1045 at qdiriterator.cpp:255
    frame #11: 0x0000000106df61c6 QtCore`QDirIteratorPrivate::QDirIteratorPrivate(this=<unavailable>, entry=<unavailable>, nameFilters=<unavailable>, resolveEngine=<unavailable>, filters=<unavailable>, flags=<unavailable>) + 1206 at qdiriterator.cpp:175
    frame #12: 0x0000000106df7aa6 QtCore`QDirIterator::QDirIterator(this=0x00007fff591e4d28, path=<unavailable>, nameFilters=<unavailable>, filters=<unavailable>, flags=<unavailable>) + 86 at qdiriterator.cpp:465
    frame #13: 0x0000000106ded253 QtCore`QDir::entryInfoList(this=<unavailable>, nameFilters=<unavailable>, filters=<unavailable>, sort=<unavailable>) const + 275 at qdir.cpp:1371
    frame #14: 0x0000000106ded12c QtCore`QDir::entryInfoList(this=<unavailable>, filters=<unavailable>, sort=<unavailable>) const + 28 at qdir.cpp:1294
    frame #15: 0x0000000106a6f77a libKF5Service.5.dylib`bool KSycocaUtilsPrivate::visitResourceDirectoryHelper<KBuildSycoca::build(dirname=<unavailable>, visitor=<unavailable>)::$_4>(QString const&, KBuildSycoca::build()::$_4) + 58 at ksycocautils_p.h:39
    frame #16: 0x0000000106a6f89c libKF5Service.5.dylib`bool KSycocaUtilsPrivate::visitResourceDirectoryHelper<KBuildSycoca::build(dirname=<unavailable>, visitor=<unavailable>)::$_4>(QString const&, KBuildSycoca::build()::$_4) + 348 at ksycocautils_p.h:47
    frame #17: 0x0000000106a6f89c libKF5Service.5.dylib`bool KSycocaUtilsPrivate::visitResourceDirectoryHelper<KBuildSycoca::build(dirname=<unavailable>, visitor=<unavailable>)::$_4>(QString const&, KBuildSycoca::build()::$_4) + 348 at ksycocautils_p.h:47
<snip>

https://paste.kde.org/ptnxccplk/upymg1/raw

Frame #7 gives me the file being handled: /Applications/Multimedia/Video/iDVD.app/Contents/Frameworks/DVDBase.framework/Versions/A/Frameworks/DVDBase.framework/Versions/A/Frameworks/DVDBase.framework/Versions/A/Frameworks/DVDBase.framework/Versions/A/Frameworks/DVDBase.framework/Versions/A/Framew...

Indeed, "/Applications/Multimedia/Video/iDVD.app/Contents/Frameworks/DVDBase.framework/Versions/A/Frameworks" was a symlink to "../../../". Not a circular link, but something like it (is there a name for this kind of situation?).

After removing that link the process terminated, eventually.

A subsequent regular run took "only" 2:13 minutes at 40% CPU. A few well-placed qDebug() statements confirm that most of that time is spent trawling through /Applications (including all of Xcode's 5+Gb).

I think we'll have to consider skipping known Mac locations that are highly unlikely to contain anything sycoca relevant. Or maybe any generic locations that aren't user-specific and are not under the install prefix. At least as a MacPorts-specific patch.
Do you have suggestions where and how to filter out at least /Applications?

R.



More information about the Kde-frameworks-devel mailing list