Description of problem: kbuildsyscoca may crash during startup, seemingly because is opens, but does not close, too many desktop files. strace shows, on my system, kbuildsyscoca opening seemingly all .desktop files in the common locations, but does not recycle file descriptors. Therefore, they rapidly run out and kbuildsyscoca crashes. I haven't seen this problem on other fresh installs of F7 (i386). Version-Release number of selected component (if applicable): My install of F7 is basically default + KDE. Problem has been apparent since initial install. kde-libs version 3.5.7-0.1.fc7. How reproducible: 100% (on my install). Set file descriptors to 1024, run kbuildsycoca, observe crash. Steps to Reproduce: 1. Set file desriptor count to default (1024) 2. Launch KDE (login via xdm), or 3. start kbuildsyscoca from within a shell 4. observe KDE crash handler Actual results: kbuildsyscoca fails to rebuild system configuration cache. Expected results: kbuildsyscoca should run to completion and rebuild system configuration cache. Additional info: GDB full backtrace (with debug symbols): (gdb) bt full #0 0x051022a9 in operator== () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 No symbol table info available. #1 0x001b36a1 in VFolderMenu::processMenu (this=0x8ca9d80, docElem=@0xbfeb791c, pass=1) at vfolder_menu.cpp:1266 menu = (VFolderMenu::SubMenu *) 0x8dd9850 parentMenu = (VFolderMenu::SubMenu *) 0x8d17740 oldDirectoryDirsCount = 3 name = {static null = { static null = <same as static member of an already seen type>, d = 0x892b0c0, static shared_null = 0x892b0c0}, d = 0x8cceb88, static shared_null = 0x892b0c0} directoryFile = {static null = { static null = <same as static member of an already seen type>, d = 0x892b0c0, static shared_null = 0x892b0c0}, d = 0x8cd3020, static shared_null = 0x892b0c0} onlyUnallocated = false isDeleted = false kdeLegacyDirsDone = <value optimized out> defaultLayoutNode = <incomplete type> layoutNode = <incomplete type> query = <incomplete type> n = <incomplete type> #2 0x001b3816 in VFolderMenu::processMenu (this=0x8ca9d80, docElem=@0xbfeb7b8c, pass=1) at vfolder_menu.cpp:1410 e = <incomplete type> parentMenu = (VFolderMenu::SubMenu *) 0x8ce8d68 oldDirectoryDirsCount = 2 name = {static null = { static null = <same as static member of an already seen type>, d = 0x892b0c0, static shared_null = 0x892b0c0}, d = 0x8cb1f10, static shared_null = 0x892b0c0} directoryFile = {static null = { static null = <same as static member of an already seen type>, d = 0x892b0c0, static shared_null = 0x892b0c0}, d = 0x8cb10b0, static shared_null = 0x892b0c0} onlyUnallocated = false isDeleted = false kdeLegacyDirsDone = 191 defaultLayoutNode = <incomplete type> layoutNode = <incomplete type> query = <incomplete type> n = <incomplete type> #3 0x001b3816 in VFolderMenu::processMenu (this=0x8ca9d80, docElem=@0xbfeb7dfc, pass=1) at vfolder_menu.cpp:1410 e = <incomplete type> parentMenu = (VFolderMenu::SubMenu *) 0x8cd7d40 oldDirectoryDirsCount = 1 name = {static null = { ---Type <return> to continue, or q <return> to quit--- static null = <same as static member of an already seen type>, d = 0x892b0c0, static shared_null = 0x892b0c0}, d = 0x8c69488, static shared_null = 0x892b0c0} directoryFile = {static null = { static null = <same as static member of an already seen type>, d = 0x892b0c0, static shared_null = 0x892b0c0}, d = 0x8caee38, static shared_null = 0x892b0c0} onlyUnallocated = false isDeleted = false kdeLegacyDirsDone = false defaultLayoutNode = <incomplete type> layoutNode = <incomplete type> query = <incomplete type> n = <incomplete type> #4 0x001b3816 in VFolderMenu::processMenu (this=0x8ca9d80, docElem=@0xbfeb7fa0, pass=1) at vfolder_menu.cpp:1410 e = <incomplete type> parentMenu = (VFolderMenu::SubMenu *) 0x0 oldDirectoryDirsCount = 0 name = {static null = { static null = <same as static member of an already seen type>, d = 0x892b0c0, static shared_null = 0x892b0c0}, d = 0x8c4f960, static shared_null = 0x892b0c0} directoryFile = {static null = { static null = <same as static member of an already seen type>, d = 0x892b0c0, static shared_null = 0x892b0c0}, d = 0x8c553e0, static shared_null = 0x892b0c0} onlyUnallocated = false isDeleted = false kdeLegacyDirsDone = false defaultLayoutNode = <incomplete type> layoutNode = <incomplete type> query = <incomplete type> n = <incomplete type> #5 0x001bc255 in VFolderMenu::parseMenu (this=0x8ca9d80, file=@0xbfeb8090, forceLegacyLoad=true) at vfolder_menu.cpp:1646 pass = 1 dirs = {<QValueList<QString>> = {sh = 0x8ca7360}, <No data fields>} docElem = <incomplete type> #6 0x001bd930 in KBuildSycoca::build (this=0x89439e0) at kbuildsycoca.cpp:382 kdeMenu = <value optimized out> entry = <value optimized out> serviceEntryDict = (KBSEntryDict *) 0x8c74478 i = 143899784 allResources = {<QValueList<QString>> = { sh = 0x8c75630}, <No data fields>} uptodate = true result = true ---Type <return> to continue, or q <return> to quit--- #7 0x001bde12 in KBuildSycoca::recreate (this=0x89439e0) at kbuildsycoca.cpp:500 path = {static null = { static null = <same as static member of an already seen type>, d = 0x892b0c0, static shared_null = 0x892b0c0}, d = 0x893da28, static shared_null = 0x892b0c0} #8 0x001be7a4 in kdemain (argc=1, argv=0xbfeb8564) at kbuildsycoca.cpp:905 qSycocaPath = <incomplete type> sycoca = (KBuildSycoca *) 0x89439e0 d = {mAppName = 0x1c4fdf "kbuildsycoca", mProgramName = 0x1c4300 "KBuildSycoca", mVersion = 0x1c4fec "1.1", mShortDescription = 0x1c4bb4 "Rebuilds the system configuration cache.", mLicenseKey = 1, mCopyrightStatement = 0x1c4883 "(c) 1999-2002 KDE Developers", mOtherText = 0x0, mHomepageAddress = 0x0, mBugEmailAddress = 0x1c486f "submit.org", mAuthorList = { sh = 0x8931290}, mCreditList = {sh = 0x89312c0}, mLicenseText = 0x0, d = 0x89312f0} args = (KCmdLineArgs *) 0x8932420 k = {<> = {<No data fields>}, <KInstance> = { _vptr.KInstance = 0x438b24, _dirs = 0x8935c00, _config = 0x8935a70, _iconLoader = 0x0, _name = <incomplete type>, _aboutData = 0xbfeb8254, d = 0x8937380}, static metaObj = 0x893b610, display = 0x0, kipcCommAtom = 3219883112, kipcEventMask = 479, static KApp = 0xbfeb83cc, pArgc = -1208942592, pSessionConfig = 0x0, static s_DCOPClient = 0x893b978, static s_dcopClientNeedsPostInit = false, aCaption = {static null = { static null = <same as static member of an already seen type>, d = 0x892b0c0, static shared_null = 0x892b0c0}, d = 0x892b0c0, static shared_null = 0x892b0c0}, bSessionManagement = false, aIconPixmap = {pm = {icon = 0x0, miniIcon = 0x0}, unused = "\000\000\000\000\000\000\000\000\220\204��º�\000\b��\000\000\000\000\000\001\000\000\000\001\000\000\000\000\000\000\000\223\227\004\b\000\000\000\000D\227\004\b"}, aIconName = {static null = { static null = <same as static member of an already seen type>, d = 0x892b0c0, static shared_null = 0x892b0c0}, d = 0x892b0c0, static shared_null = 0x892b0c0}, aMiniIconName = {static null = { static null = <same as static member of an already seen type>, d = 0x892b0c0, static shared_null = 0x892b0c0}, d = 0x892b0c0, static shared_null = 0x892b0c0}, useStyles = false, smw = 0x0, static loadedByKdeinit = false, captionLayout = -1075084088, d = 0x8937500} dcopClient = (class DCOPClient *) 0x8940338 checkfiles = true incremental = true checkstamps = false filestamp = 0 oldresourcedirs = {<QValueList<QString>> = { sh = 0x893bbd0}, <No data fields>} #9 0x080484b2 in main (argc=Cannot access memory at address 0x1 ) at kbuildsycoca.la.cpp:2 ---Type <return> to continue, or q <return> to quit--- No locals. #10 0x00a92f70 in __libc_start_main () from /lib/libc.so.6 No symbol table info available. #11 0x080483d1 in _start () No symbol table info available. (gdb) Quick workaround is to increase the default minimum file descriptors. This can be done by adding the following to /etc/security/limits.conf: * soft nofile 8192 * hard nofile 16384
Created attachment 159714 [details] strace of executing kbuildsyscoca
I cannot reproduce this (maybe I don't have enough .desktop files on my systems). This would be a excellent issue to file with upstream kde @ bugs.kde.org.
Please resolve invalid. My bug report is way off track. It isn't an issue of running out of file handles, they are being reused as they should. The problem actually seems to be related to menu items which may be invalid. The problem description here is wrong and a new bug should be raised.
Thanks for clarification and update.