As the title suggests, I'm seeing the above on multiple machine w/ completely different hardware and usage patterns. The only thing in common is KDE. (Can it be a KDE issue?) $ pstack 31820 Thread 2 (Thread 0x7f2901170700 (LWP 31821)): #0 0x00007f290165d083 in poll () from /lib64/libc.so.6 #1 0x00007f29021772f4 in ?? () from /lib64/libselinux.so.1 #2 0x00007f2902177708 in avc_netlink_loop () from /lib64/libselinux.so.1 #3 0x00007f2901b35d5b in start_thread () from /lib64/libpthread.so.0 #4 0x00007f2901666a7d in clone () from /lib64/libc.so.6 Thread 1 (Thread 0x7f290278a7e0 (LWP 31820)): #0 0x00007f290165d083 in poll () from /lib64/libc.so.6 #1 0x00007f2902805280 in ?? () #2 0x00007f29028056ad in ?? () #3 0x00007f29027eb719 in main () $ strace -p 31820 Process 31820 attached - interrupt to quit poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=9, events=POLLIN}, {fd=10, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=22, events=POLLIN}, {fd=19, events=POLLIN}, {fd=23, events=POLLIN}, {fd=24, events=POLLIN}, {fd=25, events=POLLIN}, {fd=26, events=POLLIN}, {fd=27, events=POLLIN}, {fd=28, events=POLLIN}, {fd=29, events=POLLIN}, {fd=30, events=POLLIN}, {fd=31, events=POLLIN}, {fd=32, events=POLLIN}, {fd=33, events=POLLIN}, {fd=34, events=POLLIN}, {fd=35, events=POLLIN}, {fd=36, events=POLLIN}, {fd=37, events=POLLIN}, {fd=38, events=POLLIN}, {fd=39, events=POLLIN}, {fd=40, events=POLLIN}, ...], 1017, -1) = 1 ([{fd=3, revents=POLLIN}]) accept4(3, 0x7fffac534600, [16], SOCK_CLOEXEC) = -1 EMFILE (Too many open files) fcntl(-1, F_GETFD) = -1 EBADF (Bad file descriptor) poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=9, events=POLLIN}, {fd=10, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=22, events=POLLIN}, {fd=19, events=POLLIN}, {fd=23, events=POLLIN}, {fd=24, events=POLLIN}, {fd=25, events=POLLIN}, {fd=26, events=POLLIN}, {fd=27, events=POLLIN}, {fd=28, events=POLLIN}, {fd=29, events=POLLIN}, {fd=30, events=POLLIN}, {fd=31, events=POLLIN}, {fd=32, events=POLLIN}, {fd=33, events=POLLIN}, {fd=34, events=POLLIN}, {fd=35, events=POLLIN}, {fd=36, events=POLLIN}, {fd=37, events=POLLIN}, {fd=38, events=POLLIN}, {fd=39, events=POLLIN}, {fd=40, events=POLLIN}, ...], 1017, -1) = 1 ([{fd=3, revents=POLLIN}]) accept4(3, 0x7fffac534600, [16], SOCK_CLOEXEC) = -1 EMFILE (Too many open files) * Repeat 100,000 times. $ ls /proc/31820/fd | wc -l 1024 - Gilboa
Looks like normal case of too many dbus clients, which indicates a buggy app or OS shell. Reassigning.
Rex, Report upstream? Both me and my colleges are hitting this on a weekly basis. - Gilboa
Colin, I'm almost certain that this is a upstream dbus question, but, shouldn't dbus handle lack-of-fd's in some graceful manner? (E.g. high/low water mark?) - instead of polling the CPU to death? - Gilboa
My best guess is that it's a particular app or widget that's the troublemaker here. (I have doubts that it's a general problem with the kde shell, else this would be very widespread, but who knows). Regardless, bugs.kde.org is one first step I guess.
I can confirm it. Fedora 14, kde 4.5.5, dbus 1.4.0. Seems like, however, that's a kde or dbus bug, see https://bugs.kde.org/show_bug.cgi?id=221231 and https://bugs.kde.org/show_bug.cgi?id=261180
Re comment #4 I'll try to find if there's some not-too-painful way to debug apps' dbus usage and fd's. Any help or advice would be much appreciated.
Reproduced here: Fedora 14 x64 kernel-2.6.35.10-74.fc14.x86_64 dbus-1.4.0-2.fc14.x86_64 kdebase-4.5.5-1.fc14.x86_64
OK, as an attempt to try to get a handle on trouble-makers, folks, please identify which plasmoids you use, and well as most-often used (kde or not) applications. Thanks.
I almost only run: konsole, Firefox, XEmacs, and Pidgin, all the current FC14-x64 versions, KDE exclusively. OpenOffice from time to time, and it's not required to exhibit dbus-daemon runaway. I'm pretty sure Firefox is the culprit in my case, but can't say absolutely for certain. I did see dbus-daemon drop back down to normal after closing Firefox one time, but that hasn't been 100% reproducible.
I'm running: konsole, opera, transmission-gtk, sometimes chromium on first screen and openbox, awn and smplayer on second. All the current FC14-x64 versions. Plasmoids: gmail-plasmoid, plasma_pyweather, plasma_applet_paste and smooth-tasks. (In reply to comment #9) Yep, I'm also sometimes can get dbus-daemon to return to normal, but after closing opera, transmission or awn in my case. But it returns to 100% load after 5-10 minutes anyway.
Applications: Multiple copies of gvim. Konsole. OpenOffice write / calc. Firefox. gkrellm. Widgets: Activity per virtual desktop. Each desktop with it's own set of Folder views. Each desktop has Analog clock and YaWP. On my coworker's machine he has: Applications: Konsole. Firefox. Qt-designer and/or eclipse. gkrellm. Widgets: Single activity for all virtual desktops. Multiple folder views, generic weather widget. Rex, Can I somehow force dbus to dump which applications use which FD's? - Gilboa
Ok, on fresh start i have around 70 fd's in dbus proc folder with all my software described above launched, which than got upped to 76 after yumupdatesd and package-kit update check. Strange thing is, when dbus-daemon near fd's limit (1023 fd's) every time i, for example, click a link in psi fd's upped to 1024 and dbus-daemon starts eating my cpu. But on fresh start (when fd's are just around 70) fd's not upped by clicking links. Also, the only common app i see is konsole, but i don't thing it can be troublemaker. So, can (k)packagekit be a culprit? Because dbus-daemon fd's doesn't come back down to value it was before launching updater.
I second the kpackagekit observation (not exactly kpackagekit, but kpackagekit-icon...). I suffered another dbus-attach yesterday and started searching for highest FD count in /proc and kpackagekit ate ~500 fds. $ cat /proc/4924/cmdline /usr/libexec/kde4/kpackagekitsmarticon $ ls -l /proc/4924/fd | wc -l 531 Should I changing component to kpackagekit/icon? - Gilboa
Yep, can confirm, thats kpackagekitsmart icon: # top -b -n 1 | grep dbus-daemon 1306 dbus 20 0 22932 2168 780 S 0.0 0.1 1:32.28 ? 1:32 dbus-daemon --system 29571 iSage 20 0 26400 4904 652 S 0.0 0.2 0:06.56 ? 0:06 /bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session # ls /proc/29571/fd | wc -l 208 # top -b -n 1 | grep kpackagekit 30515 iSage 20 0 451m 13m 5568 S 0.0 0.7 0:02.63 ? 0:02 /usr/libexec/kde4/kpackagekitsmarticon # kill 30515 # ls /proc/29571/fd | wc -l 72
And I can add that I've had kpackagekitsmarticon running when I've had the issue as well. Although I haven't had the issue lately and kpackagekit is still running as before.
Ivan and Sam, Can you test kpackagekitsmarticon instead of kpackagekit itself? (At least in my case kpackagekitsmarticon was the culprit) - Gilboa
Yes. I've already written above that it was kpackagekitsmarticon in my case too.
Me too. kpackagekitsmarticon was holding nearly 1000 FD's and killing it freed most of the FD's in dbus-daemon. kpackagekit-0.6.3.3-1.fc14.x86_64 Looks like it auto-respawns so I can cron a kill job as a workaround...
*** Bug 684027 has been marked as a duplicate of this bug. ***
Kevin / Rex, Should we open an upstream BZ? - Gilboa
Yes please.
> I'm almost certain that this is a upstream dbus question, but, shouldn't dbus > handle lack-of-fd's in some graceful manner? This is an upstream D-Bus bug (23194) already. Fixing it requires some restructuring, so I have three branches awaiting review, which are all needed (in this order) to fix it: * https://bugs.freedesktop.org/show_bug.cgi?id=33336 * https://bugs.freedesktop.org/show_bug.cgi?id=33342 * https://bugs.freedesktop.org/show_bug.cgi?id=23194
I am hitting this on F15 and killing kpackagekitsmarticon gets things working again. If I'm reading it correctly this upstream bug has an attachment which should fix this: https://bugs.kde.org/show_bug.cgi?id=261180
That looks like it to me, I'll see about doing a build including that patch for further testing.
updating summary, reassigning to kdelibs.
kde-l10n-4.6.4-1.fc14, kdeaccessibility-4.6.4-1.fc14, kdeadmin-4.6.4-1.fc14, kdeartwork-4.6.4-1.fc14, kdebase-runtime-4.6.4-1.fc14, kdebase-workspace-4.6.4-2.fc14, kdebindings-4.6.4-1.fc14, kdeedu-4.6.4-1.fc14, kdegames-4.6.4-1.fc14, kdemultimedia-4.6.4-1.fc14, kdenetwork-4.6.4-1.fc14, kdepimlibs-4.6.4-1.fc14, kdeplasma-addons-4.6.4-1.fc14, kdesdk-4.6.4-1.fc14, kdetoys-4.6.4-1.fc14, kdeutils-4.6.4-1.fc14, oxygen-icon-theme-4.6.4-2.fc14, kdelibs-4.6.4-2.fc14, kdebase-4.6.4-2.fc14, kdegraphics-4.6.4-2.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/kde-l10n-4.6.4-1.fc14,kdeaccessibility-4.6.4-1.fc14,kdeadmin-4.6.4-1.fc14,kdeartwork-4.6.4-1.fc14,kdebase-4.6.4-2.fc14,kdebase-runtime-4.6.4-1.fc14,kdebase-workspace-4.6.4-2.fc14,kdebindings-4.6.4-1.fc14,kdeedu-4.6.4-1.fc14,kdegames-4.6.4-1.fc14,kdegraphics-4.6.4-2.fc14,kdelibs-4.6.4-2.fc14,kdemultimedia-4.6.4-1.fc14,kdenetwork-4.6.4-1.fc14,kdepimlibs-4.6.4-1.fc14,kdeplasma-addons-4.6.4-1.fc14,kdesdk-4.6.4-1.fc14,kdetoys-4.6.4-1.fc14,kdeutils-4.6.4-1.fc14,oxygen-icon-theme-4.6.4-2.fc14
kde-l10n-4.6.4-1.fc15, kdeaccessibility-4.6.4-1.fc15, kdeadmin-4.6.4-1.fc15, kdeartwork-4.6.4-1.fc15, kdebase-runtime-4.6.4-1.fc15, kdebase-workspace-4.6.4-2.fc15, kdebindings-4.6.4-1.fc15, kdeedu-4.6.4-1.fc15, kdegames-4.6.4-1.fc15, kdemultimedia-4.6.4-1.fc15, kdenetwork-4.6.4-1.fc15, kdepimlibs-4.6.4-1.fc15, kdeplasma-addons-4.6.4-1.fc15, kdesdk-4.6.4-1.fc15, kdetoys-4.6.4-1.fc15, kdeutils-4.6.4-1.fc15, oxygen-icon-theme-4.6.4-2.fc15, kdelibs-4.6.4-2.fc15, kdebase-4.6.4-2.fc15, kdegraphics-4.6.4-2.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/kde-l10n-4.6.4-1.fc15,kdeaccessibility-4.6.4-1.fc15,kdeadmin-4.6.4-1.fc15,kdeartwork-4.6.4-1.fc15,kdebase-4.6.4-2.fc15,kdebase-runtime-4.6.4-1.fc15,kdebase-workspace-4.6.4-2.fc15,kdebindings-4.6.4-1.fc15,kdeedu-4.6.4-1.fc15,kdegames-4.6.4-1.fc15,kdegraphics-4.6.4-2.fc15,kdelibs-4.6.4-2.fc15,kdemultimedia-4.6.4-1.fc15,kdenetwork-4.6.4-1.fc15,kdepimlibs-4.6.4-1.fc15,kdeplasma-addons-4.6.4-1.fc15,kdesdk-4.6.4-1.fc15,kdetoys-4.6.4-1.fc15,kdeutils-4.6.4-1.fc15,oxygen-icon-theme-4.6.4-2.fc15
Package kdelibs-4.6.4-5.fc15, kdepimlibs-4.6.4-2.fc15, kde-l10n-4.6.4-1.fc15, kdeaccessibility-4.6.4-1.fc15, kdeadmin-4.6.4-1.fc15, kdeartwork-4.6.4-1.fc15, kdebase-runtime-4.6.4-1.fc15, kdebase-workspace-4.6.4-2.fc15, kdebindings-4.6.4-1.fc15, kdeedu-4.6.4-1.fc15, kdegames-4.6.4-1.fc15, kdemultimedia-4.6.4-1.fc15, kdenetwork-4.6.4-1.fc15, kdeplasma-addons-4.6.4-1.fc15, kdesdk-4.6.4-1.fc15, kdetoys-4.6.4-1.fc15, kdeutils-4.6.4-1.fc15, oxygen-icon-theme-4.6.4-2.fc15, kdebase-4.6.4-2.fc15, kdegraphics-4.6.4-2.fc15: * should fix your issue, * was pushed to the Fedora 15 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing kdelibs-4.6.4-5.fc15 kdepimlibs-4.6.4-2.fc15 kde-l10n-4.6.4-1.fc15 kdeaccessibility-4.6.4-1.fc15 kdeadmin-4.6.4-1.fc15 kdeartwork-4.6.4-1.fc15 kdebase-runtime-4.6.4-1.fc15 kdebase-workspace-4.6.4-2.fc15 kdebindings-4.6.4-1.fc15 kdeedu-4.6.4-1.fc15 kdegames-4.6.4-1.fc15 kdemultimedia-4.6.4-1.fc15 kdenetwork-4.6.4-1.fc15 kdeplasma-addons-4.6.4-1.fc15 kdesdk-4.6.4-1.fc15 kdetoys-4.6.4-1.fc15 kdeutils-4.6.4-1.fc15 oxygen-icon-theme-4.6.4-2.fc15 kdebase-4.6.4-2.fc15 kdegraphics-4.6.4-2.fc15' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/kde-l10n-4.6.4-1.fc15,kdeaccessibility-4.6.4-1.fc15,kdeadmin-4.6.4-1.fc15,kdeartwork-4.6.4-1.fc15,kdebase-4.6.4-2.fc15,kdebase-runtime-4.6.4-1.fc15,kdebase-workspace-4.6.4-2.fc15,kdebindings-4.6.4-1.fc15,kdeedu-4.6.4-1.fc15,kdegames-4.6.4-1.fc15,kdegraphics-4.6.4-2.fc15,kdelibs-4.6.4-5.fc15,kdemultimedia-4.6.4-1.fc15,kdenetwork-4.6.4-1.fc15,kdepimlibs-4.6.4-2.fc15,kdeplasma-addons-4.6.4-1.fc15,kdesdk-4.6.4-1.fc15,kdetoys-4.6.4-1.fc15,kdeutils-4.6.4-1.fc15,oxygen-icon-theme-4.6.4-2.fc15 then log in and leave karma (feedback).
Updated to latest kde testing updates & rebooted but the number of open sockets still appears to be growing over time. It looks like the patch proposed on the linked KDE bug and in the current testing package did not work as intended. If you look again at the KDE bug the final committed patch shows a different fix has been applied to the KDE tree.
kde-l10n-4.6.5-1.fc15,kdeaccessibility-4.6.5-1.fc15,kdeadmin-4.6.5-1.fc15,kdeartwork-4.6.5-1.fc15,kdebase-4.6.5-1.fc15,kdebase-runtime-4.6.5-1.fc15,kdebase-workspace-4.6.5-2.fc15,kdebindings-4.6.5-1.fc15,kdeedu-4.6.5-1.fc15,kdegames-4.6.5-1.fc15,kdegraphics-4.6.5-3.fc15,kdelibs-4.6.5-1.fc15,kdemultimedia-4.6.5-1.fc15,kdenetwork-4.6.5-1.fc15,kdepimlibs-4.6.5-1.fc15,kdeplasma-addons-4.6.5-1.fc15,kdesdk-4.6.5-1.fc15,kdetoys-4.6.5-1.fc15,kdeutils-4.6.5-2.fc15,oxygen-icon-theme-4.6.5-1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/kde-l10n-4.6.5-1.fc15,kdeaccessibility-4.6.5-1.fc15,kdeadmin-4.6.5-1.fc15,kdeartwork-4.6.5-1.fc15,kdebase-4.6.5-1.fc15,kdebase-runtime-4.6.5-1.fc15,kdebase-workspace-4.6.5-2.fc15,kdebindings-4.6.5-1.fc15,kdeedu-4.6.5-1.fc15,kdegames-4.6.5-1.fc15,kdegraphics-4.6.5-3.fc15,kdelibs-4.6.5-1.fc15,kdemultimedia-4.6.5-1.fc15,kdenetwork-4.6.5-1.fc15,kdepimlibs-4.6.5-1.fc15,kdeplasma-addons-4.6.5-1.fc15,kdesdk-4.6.5-1.fc15,kdetoys-4.6.5-1.fc15,kdeutils-4.6.5-2.fc15,oxygen-icon-theme-4.6.5-1.fc15
kde-l10n-4.6.5-1.fc14, kdeaccessibility-4.6.5-1.fc14, kdeadmin-4.6.5-1.fc14, kdeartwork-4.6.5-1.fc14, kdebase-4.6.5-1.fc14, kdebase-runtime-4.6.5-1.fc14, kdebase-workspace-4.6.5-2.fc14, kdebindings-4.6.5-1.fc14, kdeedu-4.6.5-1.fc14, kdegames-4.6.5-1.fc14, kdegraphics-4.6.5-3.fc14, kdelibs-4.6.5-1.fc14, kdemultimedia-4.6.5-1.fc14, kdenetwork-4.6.5-1.fc14, kdepimlibs-4.6.5-1.fc14, kdeplasma-addons-4.6.5-1.fc14, kdesdk-4.6.5-1.fc14, kdetoys-4.6.5-1.fc14, kdeutils-4.6.5-2.fc14, oxygen-icon-theme-4.6.5-1.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/kde-l10n-4.6.5-1.fc14,kdeaccessibility-4.6.5-1.fc14,kdeadmin-4.6.5-1.fc14,kdeartwork-4.6.5-1.fc14,kdebase-4.6.5-1.fc14,kdebase-runtime-4.6.5-1.fc14,kdebase-workspace-4.6.5-2.fc14,kdebindings-4.6.5-1.fc14,kdeedu-4.6.5-1.fc14,kdegames-4.6.5-1.fc14,kdegraphics-4.6.5-3.fc14,kdelibs-4.6.5-1.fc14,kdemultimedia-4.6.5-1.fc14,kdenetwork-4.6.5-1.fc14,kdepimlibs-4.6.5-1.fc14,kdeplasma-addons-4.6.5-1.fc14,kdesdk-4.6.5-1.fc14,kdetoys-4.6.5-1.fc14,kdeutils-4.6.5-2.fc14,oxygen-icon-theme-4.6.5-1.fc14
kde-l10n-4.6.5-1.fc15, kdeaccessibility-4.6.5-1.fc15, kdeadmin-4.6.5-1.fc15, kdeartwork-4.6.5-1.fc15, kdebase-4.6.5-1.fc15, kdebase-runtime-4.6.5-1.fc15, kdebase-workspace-4.6.5-2.fc15, kdebindings-4.6.5-1.fc15, kdeedu-4.6.5-1.fc15, kdegames-4.6.5-1.fc15, kdegraphics-4.6.5-3.fc15, kdelibs-4.6.5-1.fc15, kdenetwork-4.6.5-1.fc15, kdepimlibs-4.6.5-1.fc15, kdeplasma-addons-4.6.5-1.fc15, kdesdk-4.6.5-1.fc15, kdetoys-4.6.5-1.fc15, kdeutils-4.6.5-2.fc15, oxygen-icon-theme-4.6.5-1.fc15, kdemultimedia-4.6.5-2.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.
kdemultimedia-4.6.5-2.fc14, kde-l10n-4.6.5-1.fc14, kdeaccessibility-4.6.5-1.fc14, kdeadmin-4.6.5-1.fc14, kdeartwork-4.6.5-1.fc14, kdebase-4.6.5-1.fc14, kdebase-runtime-4.6.5-1.fc14, kdebase-workspace-4.6.5-2.fc14, kdebindings-4.6.5-1.fc14, kdeedu-4.6.5-1.fc14, kdegames-4.6.5-1.fc14, kdegraphics-4.6.5-3.fc14, kdelibs-4.6.5-1.fc14, kdenetwork-4.6.5-1.fc14, kdepimlibs-4.6.5-1.fc14, kdeplasma-addons-4.6.5-1.fc14, kdesdk-4.6.5-1.fc14, kdetoys-4.6.5-1.fc14, kdeutils-4.6.5-2.fc14, oxygen-icon-theme-4.6.5-1.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.