Summary: | kded4 crashes because it runs out of file descriptors | ||
---|---|---|---|
Product: | [Unmaintained] kdelibs | Reporter: | walker <erojoaquin> |
Component: | kded | Assignee: | Unassigned bugs mailing-list <unassigned-bugs> |
Status: | RESOLVED DOWNSTREAM | ||
Severity: | crash | CC: | adaptee, alex, arne.henningsen, b7.10110111, cfeck, dick.saarloos, dima, djebari.eric, ggg_mail, keiffee, ken20001, L.Bonnaud, magicmyth, mkorena, pfodea, rjvbertin, sellesf, seventh_evan, smkozasa, vince-wilson, yaroslavkishchenko |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
walker
2012-09-17 02:55:25 UTC
This may be caused by a downstream kded module, such as the package update notifier. If this is reproducible, please check which kded module causes the crash by disabling them. For more information, see http://kdepepo.wordpress.com/2011/05/11/troubleshooting-kded4-bugs/ *** Bug 307262 has been marked as a duplicate of this bug. *** *** Bug 294682 has been marked as a duplicate of this bug. *** *** Bug 304301 has been marked as a duplicate of this bug. *** If you can provide the information requested in comment #1, please add it. *** Bug 299471 has been marked as a duplicate of this bug. *** *** Bug 307829 has been marked as a duplicate of this bug. *** *** Bug 308466 has been marked as a duplicate of this bug. *** *** Bug 308481 has been marked as a duplicate of this bug. *** *** Bug 308960 has been marked as a duplicate of this bug. *** *** Bug 309128 has been marked as a duplicate of this bug. *** *** Bug 309295 has been marked as a duplicate of this bug. *** *** Bug 309348 has been marked as a duplicate of this bug. *** *** Bug 309355 has been marked as a duplicate of this bug. *** *** Bug 310392 has been marked as a duplicate of this bug. *** *** Bug 311040 has been marked as a duplicate of this bug. *** *** Bug 311748 has been marked as a duplicate of this bug. *** *** Bug 311772 has been marked as a duplicate of this bug. *** *** Bug 313361 has been marked as a duplicate of this bug. *** We still lack the information requested in comment #1. Since no KDE developer can reproduce the issue, it is believed to be caused by a third-party kded module. Please report this bug to the bugtracker of your distribution, or add the information we need. I only noticed that bug #314031 had been marked duplicate after I posted a response there (at Milian Wolff's request). I posted output from my terminal in my comment #8. It seems it only confirms what you have discovered here though. I'm in the process of turning off some kded4 modules in Service Manager. Its still crashing for me but I got something a little different at the end of my console output this time that I thought I'd pass on: --Terminal output QFile::remove: Empty or null file name QFile::remove: Empty or null file name (process:1291): GLib-ERROR **: Creating pipes for GWakeup: Too many open files --End terminal output Quick question. When you stop services in Service Manager and click apply does that restart kded4? I disabled all my Service Manager listed modules. Killed kded4 and restarted it with "kdeinit4 kded4" (but I did not do a kbuildsycoca4. Missed that part). Kdevelop still crashed as soon as the session had loaded. Next I removed usr/share/kde4/services/kded/ and restarted my system. I've since been able to load several large KDevelop sessions without a single crash. I'm going to try and work using it with the desktop in this crippled mode for a bit to see if it occurs a bit latter. If not I'll put the kded4 service folder back and see if I can start isolating the culprit. *** Bug 315194 has been marked as a duplicate of this bug. *** *** Bug 318669 has been marked as a duplicate of this bug. *** *** Bug 318896 has been marked as a duplicate of this bug. *** Adam, any success finding the kded module that leaks file descriptors? This should ideally be solved before the Ubuntu distribution switches to Qt 4.8.5, where leaked file descriptors are silently ignored, causing much more obscure behavior with all other modules. Unfortunately (kind of :-/) I can no longer produce this bug. I am still using KDevelop heavily but it has been rock solid for a while now. Note that I am using the update and backport PPAs for Kubuntu. I was not sure if a work around had been released or not. I've not changed any of my plugins so I doubt it was anything I did except run updates. I know it was mentioned (maybe by yourself) that KDevelop is leaking file descriptors (a Qt bug from what I read). So I don't know if this is technically fixed or not? Plus I see similar reports are still coming in. I'm still on Quantal (with Qt 4.8.3) and won't be moving to Raring for a couple weeks so I'll do my best to keep an eye out for the bug but it does seem gone for me. Adam, the KDevelop issue is fixed already, what I am interested in is kded4. Sorry I did not read your post well enough Christoph. I was unable to find a specific Kded module that caused problems for me. I tried various combinations. My problems went away with the KDevelop updates (#314031). I don't know if there was a module that leaked file descriptors or whether having kded off just left me with so many free file descriptors it allowed KDevelop to function at the time but I did (eventually) still get a crash in KDevelop at the time related to the file descriptor issue there even with Kded disabled. So I'm not sure if I was ever truly effected by this specific bug. *** Bug 322782 has been marked as a duplicate of this bug. *** *** Bug 323711 has been marked as a duplicate of this bug. *** *** Bug 323830 has been marked as a duplicate of this bug. *** *** Bug 327574 has been marked as a duplicate of this bug. *** *** This bug has been confirmed by popular vote. *** I cannot reproduce the bug (KDE Daemon crash after resume from suspend-to-RAM) but it occurs (seemingly randomly) from time to time. I read in http://kdepepo.wordpress.com/2011/05/11/troubleshooting-kded4-bugs/ that "for crashes, the offending module can often be found in the complete backtrace." Can the offending module be found in the backtrace that I attached to bug 327574? No, unfortunately not. The issue here is that one of the kded modules forgets to close a file handle. Over the time, the process runs out of them. The crash occurs because QProcess tries to get a new file descriptor, but did not handle the failure. This does not really make it a Qt bug, though. Since Qt 4.8.5, QProcess does no longer crash, but this will make the situation only worse: Failures to allocating file handles will now be silently ignored, causing other bugs at all modules. That's why it would be crucial to find the offending module before Ubuntu updates to Qt 4.8.5. To debug this more efficiently, one would somehow need to change the limit of available file descriptors for the kded4 process, so that it runs out of them earlier. Or maybe there are ways to monitor the number of allocated handles over time. Then finding the offending kded module by disabling it should become simpler. Try starting with package update notifiers modules, or any other distribution-supplied modules, because with a stock KDE, we never had this issue. To do as Christoph says, limiting number of available FDs, one can make a wrapper script for kded4, like this one: #!/bin/bash ulimit -n MaxFDs # place some small value instead of MaxFDs (default on Ubuntu is 1024) kded4.real "$@" , which would be put in place of original kded4, and original one would be renamed to kded4.real. I'll chime in to confirm that it seems quite hard to debug this issue with Qt 4.8.5 . I'm running KDE 4.12.4 from MacPorts on OS X 10.6, and when I launch kded4 it starts complaining about too many open files almost immediately. From playing with the content in /opt/local/share/applications/kde4 and /opt/local/share/kde4/services/kded it would appear that there is no particular culprit, but that it's the number of entries in those (and a handful other?) directories that determine how many files kded4 opens. For giggles: on my OS X machine, kded4 has over 2600 files open before it's even completely initialised; on a Linux box running the same KDE version with a session open since a couple of days, it is just over 300 files (which is still a lot IMHO). |