Bug 267693

Summary: After 'kdesu konsole' dbus-daemon takes up to 70% of CPU
Product: [Applications] kdesu Reporter: MahMahoritos <mahmahoritos>
Component: generalAssignee: kdesu bugs tracker <kdesu-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: ogoffart, retratserif, v01d3r, valentyn.pavliuchenko
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: strace of dbus-daemon

Description MahMahoritos 2011-03-05 12:03:17 UTC
Version:           unspecified (using KDE 4.6.0) 
OS:                Linux

After starting 'kdesu konsole' third copy of dbus-daemon process starts (belongs to root, over two belongs to my user and 'messagebus')

After using any command in root konsole dbus-daemon (root copy) takes 4% of CPU (before it was no digits at all). Common CPU usage becomes 70% (KSysGuard info) - before it was just 10%. I really don't know where over 60% comes to, because there is no processes with such CPU usage

After exiting root konsole 'dbus-daemon' is still running with 4% CPU. After killing it common CPU usage become normal, but of course normal work with CDs or flash-drives becomes impossible

I'm sorry if my English is not clear. I can give additional information if needed.

Reproducible: Always

Steps to Reproduce:
1. Start 'kdesu konsole'
2. Enter any command in terminal (exit is possible too)

If close opened konsole as a window before step 2, then everything works fine and CPU usage remains normal

Actual Results:  
High CPU usage, helps only reentering session

Expected Results:  
Normal CPU usage

Distro: Gentoo x86-64
Intel Core 2 Duo T6600 2.20GHz
4 GB RAM

Also I know that such bug has other guy with different distro and KDE version (Debian Squeeze, KDE-4.4.5, xorg-server-1.7.7). Here is his post in russian forum - http://www.linux.org.ru/jump-message.jsp?msgid=5972028&cid=5972519
Comment 1 Oswald Buddenhagen 2011-03-05 20:06:18 UTC
confirmed the behavior (though only once konsole exited, not when running commands in it): dbus-daemon eats some cpu, rest is burned in the kernel, probably playing message ping-pong with something.
i'm not confirming this as a kde bug yet - it may a bug in dbus-daemon (or even the kernel).
somebody with the inclination should attach strace to the amok running dbus-daemon and see where it loops. i can't reproduce that right now, as konsole now refuses to run from kdesu after i killed the offending process.
Comment 2 Andrew Trabo 2011-03-06 11:03:23 UTC
Reproduced this and have 3% CPU load on dbus-daemon's root copy process. 

Using KDE 4.6.1
Distro: ArchLinux
Core 2 Duo T5600 1.83Ghz
2GB RAM
Comment 3 Oswald Buddenhagen 2011-04-09 12:31:04 UTC
Created attachment 58739 [details]
strace of dbus-daemon

here's the strace from the dbus-daemon. i think it operates normally. the thing that goes wrong is knotify hammering it really hard. the unaccounted for cpu time comes from processes which are started and exit so fast that ps/top are not able to display them.
Comment 4 Pyroman 2011-05-13 20:52:12 UTC
*** This bug has been confirmed by popular vote. ***
Comment 5 Pyroman 2011-05-13 21:11:04 UTC
> After starting 'kdesu konsole' third copy of dbus-daemon process starts
> (belongs to root, over two belongs to my user and 'messagebus')

This happens with any KDE app, started with root privileges, for example kate.
Also this starts kded4 process with root privileges, which I have to kill because it doesn't exit when I close that program, launched by kdesudo.
But this happens once. If I launch kdesudo kate again after killing root kded4, new root kded4 process doesn't start anymore (need restart KDE session to happen it again).
Comment 6 Valentyn Pavliuchenko 2011-05-13 23:30:44 UTC
Have 5% CPU load by dbus-daemon after trying to reproduce the issue.

KDE 4.6.2, Debian unstable
Core2 Duo @ 3.2GHz
Comment 7 Jekyll Wu 2011-12-03 13:13:28 UTC
I failed to reproduce the reported problem using KDE SC 4.8 beta1. No High CPU usage is observed afterwards.
Comment 8 Justin Zobel 2021-03-09 23:42:36 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 9 Pyroman 2021-04-06 21:49:06 UTC
Tested command /usr/lib/x86_64-linux-gnu/libexec/kf5/kdesu krusader &
Looks OK.
Comment 10 Pyroman 2021-04-06 21:51:49 UTC
Upd:
System: Neon 20.04
Plasma version: 5.21.3
KDE Frameworks version: 5.80.0
Qt version: 5.12.2