Summary: | KDEvelop 4.7 crash because too many open files during CMake import | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | RJVB <rjvbertin> |
Component: | general | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED WORKSFORME | ||
Severity: | crash | CC: | aleixpol, deadmaxfr, simonandric5 |
Priority: | NOR | Keywords: | drkonqi |
Version: | 4.7.1 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | macOS | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
RJVB
2014-12-04 17:11:59 UTC
Yep. That's a serious problem we need to fix. With this in place, it's impossible to parse larger code bases such as LLVM, or the Linux Kernel. Aleix: This is still a issue in KF5, too, right? I keep running into this issue, and I don't really understand what happens. It would seem that the crash occurs in the statement CMakeFolderItem* folder = dynamic_cast<CMakeFolderItem*>(f); which makes it about impossible to debug (it doesn't help that I'm using LTO nowadays and that makes clang strip debug info, apparently). Looking at the ctors invoked by CMakeFolderItem::CMakeFolderItem I don't see any dependence on the result of QFileSystemWatcher::addPaths() (QKqueueFileSystemWatcherEngine::addPaths() on OS X as on Linux). Those functions themselves are supposed to handle the file limit situation by simply not adding any new paths, sadly without signalling the error other than tracking errno; Is there a way to rewrite that dynamic_cast making it a bit easier to figure out what's going on? Oh, and somehow errno is being set (to 24) *before* the open() call in QKqueueFileSystemWatcherEngine::addPaths() returns an error (and the function calls perror() to print it). So resetting errno before the addPaths() call and catching a change results in an overzealous handling of the situation, which causes the project load to stall indefinitely. The following modification seems to prevent the crash, but doesn't of course prevent the other artefacts of having too many open files (including surprising errors like "2015-09-09 17:41:17.867 kdevelop[42536:507] Critical failure: the LastResort font is unavailable." in the OS X system log. ``` ProjectFolderItem* f = m_parentItem; errno = 0; m_manager->addWatcher(m_project, m_path.toLocalFile()); int addWatcherErrNo = errno; if(!m_projectDataAdded) { reloadFiles(); return; } CMakeFolderItem* folder = NULL; if (addWatcherErrNo) { if (f) { folder = new CMakeFolderItem( f->project(), f->path(), f->path().lastPathSegment(), NULL); } } else { folder = dynamic_cast<CMakeFolderItem*>(f); } ``` Thank you for the crash report. As it has been a while since this was reported, can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved. I have set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved/worksforme" when you respond, thank you. Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone! |