From kde-bugs-dist Mon Sep 16 11:39:12 2013 From: Petter Reinholdtsen Date: Mon, 16 Sep 2013 11:39:12 +0000 To: kde-bugs-dist Subject: [Network Management] [Bug 324954] New: kded4 leak sockets when wifi connections fail Message-Id: X-MARC-Message: https://marc.info/?l=kde-bugs-dist&m=137933155706072 https://bugs.kde.org/show_bug.cgi?id=324954 Bug ID: 324954 Summary: kded4 leak sockets when wifi connections fail Classification: Unclassified Product: Network Management Version: 0.9 Platform: Debian stable OS: Linux Status: UNCONFIRMED Severity: crash Priority: NOR Component: Plasma Widget Assignee: lamarque@kde.org Reporter: pere@hungry.com CC: jgrulich@redhat.com, wstephenson@kde.org Package: plasma-widget-networkmanagement Version: 0.9.0.3-1 Severity: important Tags: upstream Dear Maintainer, My KDE desktop based on Debian Wheezy is unstable. After a few days, the KDE panel stop working properly, and I have to log out and in again to get back to work. Clicking on the K menu do not have any effect until 20-60 seconds later, and the icons like the battery and network status are unresposive, with similar delays from mouse clicks. I believe I tracked down the cause, which is that kded4 is running out of file descriptors because it is leaking sockets. When the problem happen, the process have above 1020 files open. With 23010 as the pid of kded4, I used this one-liner to to track the number of open files and the distribution across different types: ls -l /proc/23010/fd|wc -l ; ls -l /proc/23010/fd|rev|cut -d\[ -f2|awk '{print +$1}'|rev|sort|uniq -c It show that approximately 2.5 sockets are leaked per minute at the moment. With the good help of pinotree on #debian-kde, I was able to find the most likely part responsible, and it seem to be the "NetworkManager User Settings service" available in the System Settings->Startup and Shutdown->Service Manager menu. When I disable it (and run kdeinit4 to make sure the change take effect), the number of open sockets stopped increasing. When I enable it again, the number of open sockets start to increase. When I now had an idea about the affected system, I tried to disable wifi using the check box in the network-manager control panel, and the number of open sockets stayed stable again. Where I am at the moment, I use TP ethernet, and while there are several wifi networks around, non of them are really working for me. But I do notice network-manager try to connect over and over again to a few of them. This make me suspect that the plasma-widget-networkmanagement code fail to close some socket when connecting to a wifi network fail. This problem was also reported to Debian as http://bugs.debian.org/723092 . Reproducible: Always -- You are receiving this mail because: You are watching all bug changes.