Bug#879901: kded5 mem ballooning consumes over 6520.81MB of RAM!

2017-12-14 Thread Maximiliano Curia

Control: severity -1 important

kded acts as a proxy to the background kde services, most likely the leak is 
in one of them, not in kded per se. I'm degrading the severity as I can't 
reproduce it.


¡Hola Nicholas!

El 2017-11-29 a las 05:14 -0500, Nicholas D Steeves escribió:
Please let me know what I can do to help debug this further, because 
I'd like to help solve this asap.


It would be helpful to know which threads kded is executing, in order to do 
that please run the following command: pstree -tp | less, and look for the kded 
processes.


Also it would be interesting to know which services are being managed by kded, 
to find that out you can use the system settings' "Startup and Shutdown" 
"Background services", you can see which services are currently running in you 
session, you can attach your ~/.config/kded5rc that stores this information.


A known culprit on wasting resources is the baloo file indexer (which should 
be disabled by default), I don't remember seeing a leak in kded related to 
baloo, but I haven't paid much attention to it since we disabled it. You can 
check if your file indexer is disabled in: "System Settings" "Search" "File 
Search" "Enable File Search"


Happy hacking,
--
"Any change looks terrible at first." -- Principle of Design Inertia
Saludos /\/\ /\ >< `/


signature.asc
Description: PGP signature


Bug#879901: kded5 mem ballooning consumes over 6520.81MB of RAM!

2017-11-29 Thread Nicholas D Steeves
Package: kded5
Version: 5.28.0-1
Followup-For: Bug #879901
Control: severity -1 grave

Raising severity because 6520.81MB is enough to make the OOM killer
kill a browser on a laptop with less than 8GB of RAM, when the user is
running without swap (possibly also with zswap) because he/she is
using an SSD, or to make the system swap so hard that it becomes
unusable.  Please see #879898 for Simon McVittie's analysis about how
this issue also causes the user's session's dbus-daemon memory to also
balloon.

Please let me know what I can do to help debug this further, because
I'd like to help solve this asap.  This time I triggered the issue on
my desktop.  Please note that while my desktop is running a custom
kernel, my laptop is running linux-4.9 shipped in Debian Stretch.  I'm
sticking with 4.4 on my Desktop, because linux-4.9 has a couple of
btrfs regressions that haven't yet been patched...I don't take risks
with my primary system.

Relevant output from top:
19242 sten  20   0 6916852 5.320g956 S   0.0 36.5   6:12.07 kded5
 2673 sten  20   0 2029908 1.584g264 S   0.0 10.9   4:38.57 dbus-daemon

Full backtrace is attached, created with:
file /usr/bin/kded5
thread apply all backtrace no-filters full


Sincerely,
Nicholas

-- System Information:
Debian Release: 9.1
  APT prefers stable-debug
  APT policy: (500, 'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.102.20171125 (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_CA:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages kded5 depends on:
ii  libc6  2.24-11+deb9u1
ii  libkf5configcore5  5.28.0-2
ii  libkf5coreaddons5  5.28.0-2
ii  libkf5crash5   5.28.0-1
ii  libkf5dbusaddons5  5.28.0-1
ii  libkf5service-bin  5.28.0-1
ii  libkf5service5 5.28.0-1
ii  libqt5core5a   5.7.1+dfsg-3+b1
ii  libqt5dbus55.7.1+dfsg-3+b1
ii  libqt5gui5 5.7.1+dfsg-3+b1
ii  libqt5widgets5 5.7.1+dfsg-3+b1
ii  libstdc++6 6.3.0-18

kded5 recommends no packages.

kded5 suggests no packages.

-- no debconf information

Reading symbols from /usr/bin/kded5...Reading symbols from 
/usr/lib/debug/.build-id/dc/e41958ff786e956693484065979e08e08734c2.debug...done.
done.
Attaching to program: /usr/bin/kded5, process 19242
[New LWP 19243]
[New LWP 19244]
[New LWP 19249]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
38  ../sysdeps/unix/sysv/linux/x86_64/syscall.S: No such file or directory.

Thread 4 (Thread 0x7f7fde833700 (LWP 19249)):
#0  0x7f8000f827d7 in bind () at ../sysdeps/unix/syscall-template.S:84
No locals.
#1  0x7f8000f9b7bf in __netlink_open (h=h@entry=0x7f7fde831cc0)
at ../sysdeps/unix/sysv/linux/ifaddrs.c:264
nladdr = {nl_family = 16, nl_pad = 0, nl_pid = 0, nl_groups = 0}
addr_len = 3733134480
#2  0x7f8000f9b867 in getifaddrs_internal (ifap=ifap@entry=0x7f7fde831d88)
at ../sysdeps/unix/sysv/linux/ifaddrs.c:332
nh = {fd = 14, pid = 0, seq = 0, nlm_list = 0x0, end_ptr = 0x0}
nlp = 
ifas = 
i = 
newlink = 
newaddr = 
newaddr_idx = 
map_newlink_data = 
ifa_data_size = 0
ifa_data_ptr = 
result = 0
__PRETTY_FUNCTION__ = "getifaddrs_internal"
#3  0x7f8000f9c510 in __getifaddrs (ifap=0x7f7fde831d88) at 
../sysdeps/unix/sysv/linux/ifaddrs.c:831
res = 0
#4  0x7f7ff0d158bb in ?? () from 
/usr/lib/x86_64-linux-gnu/libQt5Network.so.5
No symbol table info available.
#5  0x7f7ff0d10975 in ?? () from 
/usr/lib/x86_64-linux-gnu/libQt5Network.so.5
No symbol table info available.
#6  0x7f7ff0d11445 in QNetworkInterface::allInterfaces() ()
   from /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
No symbol table info available.
#7  0x7f800148e9a6 in ?? () from 
/usr/lib/x86_64-linux-gnu/qt5/plugins/bearer/libqgenericbearer.so
No symbol table info available.
#8  0x7f7fff4ffb2e in QMetaMethod::invoke (this=this@entry=0x7f7fde832398, 
object=object@entry=
0x55bd466827b0, connectionType=Qt::DirectConnection, 
connectionType@entry=3733136416, 
returnValue=..., val0=..., val1=..., val2=..., val3=..., val4=..., 
val5=..., val6=..., val7=..., 
val8=..., val9=...) at kernel/qmetaobject.cpp:
typeNames = {0x0 }
paramCount = 
currentThread = 0x55bd466706a0
objectThread = 0x55bd466706a0
param = {0x0 }
idx_offset = 10
callFunction = 0x7f8001499a60
#9  0x7f7fff50558a in QMetaObject::invokeMethod (obj=0x55bd466827b0, 
member=0x7f7ff0d77d71 "requestUpdate", type=3733136416, ret=..., val0=..., 
val1=..., val2=..., 
val3=..., val4=..., val5=..., val6=..., val7=..., val8=..., val9=...) at