Bug 343346 - kbuildsycoca5 crash in VFolderMenu::excludeItems() with custom applications.menu file
Summary: kbuildsycoca5 crash in VFolderMenu::excludeItems() with custom applications.m...
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-kservice
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: David Faure
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2015-01-26 18:49 UTC by thepouar
Modified: 2018-10-31 17:48 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
~/.config/menus/applications.menu (12.23 KB, text/plain)
2015-05-17 23:05 UTC, thepouar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description thepouar 2015-01-26 18:49:51 UTC
Application: kbuildsycoca5 (5.6.0)
KDE Platform Version: 4.14.4
Qt Version: 4.8.6
Operating System: Linux 3.18.2-2-ARCH x86_64
Distribution: "Arch Linux"

-- Information about the crash:
- Unusual behavior I noticed:
kbuildsycoca5 tried to open desktop files in ~/Downloads ~/.PlayOnLinux ~/W101 which had an infinite loop of symlinks in them so I had to chmod those directories to 000 to avoid them recursing into them and filing up all 32GB of RAM, It would be nice if there was an option to tell kbuildsycoca5 what directories not to search.

The crash can be reproduced every time.

-- Backtrace:
Application: KBuildSycoca (kbuildsycoca5), signal: Segmentation fault
Using host libthread_db library "/lib/libthread_db.so.1".
[KCrash Handler]
#5  ref (this=<optimized out>) at /usr/include/qt/QtCore/qrefcount.h:54
#6  QHash (other=..., this=0x7fff93e9e320) at /usr/include/qt/QtCore/qhash.h:301
#7  QForeachContainer (t=..., this=0x7fff93e9e320) at /usr/include/qt/QtCore/qglobal.h:869
#8  VFolderMenu::excludeItems (this=this@entry=0x2763b10, items1=..., items2=...) at /home/pouar/Downloads/ABS/kservice/src/kservice-5.6.0/src/kbuildsycoca/vfolder_menu.cpp:135
#9  0x000000000042ece8 in VFolderMenu::mergeMenu (this=this@entry=0x2763b10, menu1=0x2796fd0, menu2=0x2cb1890, reversePriority=reversePriority@entry=false) at /home/pouar/Downloads/ABS/kservice/src/kservice-5.6.0/src/kbuildsycoca/vfolder_menu.cpp:178
#10 0x00000000004326cf in VFolderMenu::processMenu (this=this@entry=0x2763b10, docElem=..., pass=pass@entry=0) at /home/pouar/Downloads/ABS/kservice/src/kservice-5.6.0/src/kbuildsycoca/vfolder_menu.cpp:1193
#11 0x0000000000435130 in VFolderMenu::parseMenu (this=0x2763b10, file=...) at /home/pouar/Downloads/ABS/kservice/src/kservice-5.6.0/src/kbuildsycoca/vfolder_menu.cpp:1397
#12 0x000000000041799c in KBuildSycoca::build (this=this@entry=0x25e6370) at /home/pouar/Downloads/ABS/kservice/src/kservice-5.6.0/src/kbuildsycoca/kbuildsycoca.cpp:310
#13 0x0000000000418527 in KBuildSycoca::recreate (this=this@entry=0x25e6370) at /home/pouar/Downloads/ABS/kservice/src/kservice-5.6.0/src/kbuildsycoca/kbuildsycoca.cpp:418
#14 0x000000000041013d in main (argc=1, argv=<optimized out>) at /home/pouar/Downloads/ABS/kservice/src/kservice-5.6.0/src/kbuildsycoca/kbuildsycoca.cpp:788

Possible duplicates by query: bug 245749.

Reported using DrKonqi
Comment 1 thepouar 2015-01-31 18:26:57 UTC
found this in stdout right before the segfault


ASSERT: "ctime != 0" in file /home/pouar/Downloads/ABS/kservice/src/kservice-5.6.0/src/kbuildsycoca/kctimefactory.cpp, line 39
Comment 2 thepouar 2015-01-31 19:52:34 UTC
(In reply to thepouar from comment #1)
> found this in stdout right before the segfault
> 
> 
> ASSERT: "ctime != 0" in file
> /home/pouar/Downloads/ABS/kservice/src/kservice-5.6.0/src/kbuildsycoca/
> kctimefactory.cpp, line 39

this was with CMAKE_BUILD_TYPE set to Debug instead of Release

here's the back trace with CMAKE_BUILD_TYPE set to Debug over Release, laos
#0  0x00007ffff63b2c14 in raise () from /lib/libc.so.6
#1  0x00007ffff63b3e53 in abort () from /lib/libc.so.6
#2  0x00007ffff6cc797f in QMessageLogger::fatal(char const*, ...) const () from /lib/libQt5Core.so.5
#3  0x00007ffff6cc2c8e in qt_assert(char const*, char const*, int) () from /lib/libQt5Core.so.5
#4  0x000000000045e557 in KCTimeDict::addCTime (this=0x6f5758, path=..., resource=..., ctime=0)
    at /home/pouar/Downloads/ABS/kservice/src/kservice-5.6.0/src/kbuildsycoca/kctimefactory.cpp:39
#5  0x000000000042f37a in KBuildSycoca::createEntry (this=0x6f72e0, file=..., addToFactory=false)
    at /home/pouar/Downloads/ABS/kservice/src/kservice-5.6.0/src/kbuildsycoca/kbuildsycoca.cpp:150
#6  0x000000000042f618 in KBuildSycoca::createService (this=0x6f72e0, path=...)
    at /home/pouar/Downloads/ABS/kservice/src/kservice-5.6.0/src/kbuildsycoca/kbuildsycoca.cpp:168
#7  0x000000000046d828 in VFolderMenu::loadApplications (this=0x858940, dir=..., prefix=...)
    at /home/pouar/Downloads/ABS/kservice/src/kservice-5.6.0/src/kbuildsycoca/vfolder_menu.cpp:942
#8  0x000000000046f8b2 in VFolderMenu::processMenu (this=0x858940, docElem=..., pass=0)
    at /home/pouar/Downloads/ABS/kservice/src/kservice-5.6.0/src/kbuildsycoca/vfolder_menu.cpp:1102
#9  0x0000000000473ce8 in VFolderMenu::parseMenu (this=0x858940, file=...)
    at /home/pouar/Downloads/ABS/kservice/src/kservice-5.6.0/src/kbuildsycoca/vfolder_menu.cpp:1397
#10 0x0000000000430fa4 in KBuildSycoca::build (this=0x6f72e0)
    at /home/pouar/Downloads/ABS/kservice/src/kservice-5.6.0/src/kbuildsycoca/kbuildsycoca.cpp:310
#11 0x0000000000432ae2 in KBuildSycoca::recreate (this=0x6f72e0)
    at /home/pouar/Downloads/ABS/kservice/src/kservice-5.6.0/src/kbuildsycoca/kbuildsycoca.cpp:418
#12 0x000000000043869b in main (argc=1, argv=0x7fffffffdc68)
    at /home/pouar/Downloads/ABS/kservice/src/kservice-5.6.0/src/kbuildsycoca/kbuildsycoca.cpp:788
Comment 3 thepouar 2015-05-17 23:05:44 UTC
Created attachment 92676 [details]
~/.config/menus/applications.menu

ok, after some digging in the source I figured out that it crashed when it was trying to read the 2 LegacyDir tags in this file. when I got rid of one, it froze, when I got rid of both it worked. I deleted the 2 as neither of the 2 directories exists on my system
Comment 4 Andrew Crouthamel 2018-10-31 04:11:33 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 5 thepouar 2018-10-31 14:50:12 UTC
Seems to be no longer crashing, thanks
Comment 6 Andrew Crouthamel 2018-10-31 17:48:48 UTC
Thanks for the update!