Bug 257915

Summary: kmix eats system rescources mainly CPU
Product: [Applications] kmix Reporter: Micko <micko>
Component: generalAssignee: Christian Esken <esken>
Status: RESOLVED DUPLICATE    
Severity: normal CC: jgetsoian
Priority: NOR    
Version: 3.7   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: top screendump
ldd /usr/bin/kmix
strace and gdb output from kmix eating CPU and mem

Description Micko 2010-11-25 21:47:08 UTC
Created attachment 53738 [details]
top screendump

Version:           3.7 (using KDE 4.5.3) 
OS:                Linux

kmix hogs my CPU but dosen't hang. It also eats a lot of memory. It seams to happen always when I run spotify in wine which uses the wine-alsa package to have working sound. 

Reproducible: Always

Steps to Reproduce:
Run spotify music client.  

Actual Results:  
After awhile kmix uses up to 90% of the CPU 

PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
2062 lena      20   0  678m 360m 6428 R 69.4 36.0  55:06.40 kmix 


[root@localhost ~]# ldd /usr/lib/wine/winealsa.drv.so
	linux-gate.so.1 =>  (0x00dbe000)
	libasound.so.2 => /lib/libasound.so.2 (0x00adf000)
	libwine.so.1 => /usr/lib/libwine.so.1 (0x00110000)
	libm.so.6 => /lib/libm.so.6 (0x00780000)
	libc.so.6 => /lib/libc.so.6 (0x00bde000)
	libdl.so.2 => /lib/libdl.so.2 (0x009ec000)
	libpthread.so.0 => /lib/libpthread.so.0 (0x00aa6000)
	librt.so.1 => /lib/librt.so.1 (0x006aa000)
	/lib/ld-linux.so.2 (0x00386000)
Comment 1 Micko 2010-11-25 21:49:21 UTC
Created attachment 53739 [details]
ldd /usr/bin/kmix
Comment 2 Micko 2010-11-27 17:32:52 UTC
I've been trying to get tyhis happen again but now I fail. Might be better to close this one.
Comment 3 Micko 2010-11-27 18:58:52 UTC
Well, it happens again now but I dont know whats trigger kmix to go overboard. Please give some hint how to search for the cause.
Comment 4 Christian Esken 2010-12-04 10:53:48 UTC
The easiest way to get an idea what is going on to run kmix from a console after enabling kmix logging.

1) Start kdebugdialog
2) Search for kmix and enable all (3) entries
3) Press OK
4) Open a console window and run kmix there

Probably you will now see somehting, like a hotplug event (plug/unplug).


Another way might be to run "strace" on the running kmix. From a console, you can call:

# strace -p 2062  # Replace 2062 with the actual PID

This might lead to insight, but must not.
Another way would be to retrieve a stacktrace  from a debugger:

# gdb -p 2062 # Replace 2062 with the actual PID
[...]
(gdb) bt

Again. This might lead to insight, but must not.

From here on you can only do debugging (step through debugger, add more debug output to sourcecode).
Comment 5 John Getsoian 2010-12-11 20:44:59 UTC
Did you ever resolve this?

I recently began seeing this behavior in KMix 3.7 (KDE 4.5.3/FC14_64). Up to 25% of CPU cycles and 2.5gb of memory use. Ran the debug output and noted it was complaining about 'profiles' at /home/%USER/.kde/share/apps/kmix/profile/

deleted all the 'profile' files there and kmix when back to normal behavior ~7 mb mem and no cpu.
Comment 6 Micko 2010-12-16 17:31:17 UTC
After some time with no bad behavior kmix started today to eat to much CPU (in my view) and memory. Maybe its connected with flash? It triggered when surfing using chrome with flash content. (But not always) Changing browser to firefox made CPU usage go close to zero again. High mem consumtion remaind tough. I'll add an attachment this time from strace and gdb together with top screen shot after switching to firefox. I'm afraid though it dosen't help that much. 

Also, there was no files present in .kde/share/apps/kmix/profile/
Comment 7 Micko 2010-12-16 17:34:36 UTC
Created attachment 54829 [details]
strace and gdb output from kmix eating CPU and mem 

strace and gdb output. top screen shot
Comment 8 Micko 2011-01-06 23:55:20 UTC
Just a small notice. After leaving the maching on for 5 ½ days kmix now consume 240MB RES memory (out of a total 1000MB) I don't know if this only happens on my specific system? CPU usage is normal/low.
Comment 9 Micko 2011-01-07 16:01:24 UTC
6 days and 5h uptime. Now kmix is at 301MB RES mem and increasing. I haven't seen any CPU-hogs just memory leakage. I guess the derivate of that would be 3.5 MB/h.

Also I found Bug https://bugs.kde.org/show_bug.cgi?id=237239 I suspect this is a dublicate of that bug. Shall I mark as dublicate? Please advise.
Comment 10 Micko 2011-01-11 16:02:19 UTC

*** This bug has been marked as a duplicate of bug 237239 ***