Bug 188719 - 100% cpu reading from a non-existing unix socket
Summary: 100% cpu reading from a non-existing unix socket
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-03 10:20 UTC by Costin Grigoras
Modified: 2009-09-15 21:29 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Costin Grigoras 2009-04-03 10:20:32 UTC
Version:            (using KDE 4.2.2)
OS:                Linux
Installed from:    Ubuntu Packages

Infinite loop doing this:

$ ps auwx | grep plasma
costing   6469 92.3  2.2 291696 47276 ?        Rl   10:08   8:20 /usr/bin/plasma

$ strace -p 6469
............
read(3, 0x998e474, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN}, {fd=10, events=POLLIN}, {fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=11, events=POLLIN}, {fd=13, events=POLLIN}, {fd=20, events=POLLIN}, {fd=24,events=POLLIN}, {fd=26, events=POLLIN}], 9, 0) = 0
read(3, 0x998e474, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
clock_gettime(CLOCK_MONOTONIC, {568, 412999033}) = 0
clock_gettime(CLOCK_MONOTONIC, {568, 413097499}) = 0
clock_gettime(CLOCK_MONOTONIC, {568, 413169090}) = 0
read(3, 0x998e474, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN}, {fd=10, events=POLLIN}, {fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=11, events=POLLIN}, {fd=13, events=POLLIN}, {fd=20, events=POLLIN}, {fd=24,events=POLLIN}, {fd=26, events=POLLIN}], 9, 0) = 0
read(3, 0x998e474, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
clock_gettime(CLOCK_MONOTONIC, {568, 413602419}) = 0
clock_gettime(CLOCK_MONOTONIC, {568, 413715409}) = 0
clock_gettime(CLOCK_MONOTONIC, {568, 413805033}) = 0
read(3, "\34\353l:\2\0\340\2\31\1\0\0]\254\10\0\0\330\202\277\312"..., 4096) = 32
read(3, 0x998e474, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
..............

This is the socket:
 ls -l /proc/6469/fd/3
lrwx------ 1 costing costing 64 2009-04-03 10:18 /proc/6469/fd/3 -> socket:[19319]

However I cannot find the number in any way:
$ sudo netstat -apn | grep 19319
unix  3      [ ]         STREAM     CONNECTED     19319    6469/plasma

$ sudo lsof | grep 19319
plasma    6469     costing    3u     unix 0xf55a5200                19319 socket

$ sudo lsof | grep 0xf55a5200
plasma    6469     costing    3u     unix 0xf55a5200                19319 socket
Comment 1 Costin Grigoras 2009-04-03 10:30:40 UTC
It seems to be caused by the "Calendar" widget. Without it the CPU usage is normal, but enabling it makes plasma go to 100% CPU. It's very easy to reproduce, happens every time you enable/disable it.
Comment 2 Dominik Tritscher 2009-04-05 23:34:03 UTC
This seems to be related to Bug 187699.
What exactly do you mean with enabling/disabling? Do you place a calendar widget on the desktop or do you click on a clock widget to bring up the calendar?
Comment 3 Costin Grigoras 2009-04-06 10:19:40 UTC
Adding and removing the calendar from the desktop causes the high cpu usage. Just opening it by clicking on the clock doesn't produce any extra load.
Comment 4 Mihaly Zachar 2009-04-09 02:28:33 UTC
I can confirm that plasma consumes a whole CPU and it just disappears if I remove the calendar widget.
Comment 5 Alexander Simon 2009-04-09 11:53:54 UTC
I have the same behaviour with one exception:
I can add the calendar to my desktop an nothing happens. Only if i MOVE it, CPU goes high. So try, as a temporary workaround, placing this plasmoid at the right place when adding it.
Comment 6 Patrick 2009-04-14 09:06:05 UTC
Confirmed (4.2.2 on Gentoo Linux ~x86). I could also reproduce the behaviour Alexander describes in Comment #5.
Comment 7 Christoph 2009-04-16 10:56:46 UTC
I have the same behavior as described by Alexander (with 4.2.2 on Gentoo amd64), but locking the widgets has the same affect as moving the calendar widget.
Comment 8 Satya 2009-05-18 09:03:50 UTC
Installed Kubuntu 9.04 - facing the same issue when calendar plasmoid  is used.
Please change the status to CONFIRMED.
Comment 9 Aaron J. Seigo 2009-06-22 23:48:48 UTC
so, nobody actually answered Dominik's question: 

are you dragging the calendar from the clock to the desktop, or are you adding the Calendar widget directly from the Add Widgets dialog?
Comment 10 Costin Grigoras 2009-06-23 09:22:16 UTC
Adding the widget to the desktop directly, not dragging the clock. But I guess this should be fairly easy to reproduce, 30 seconds flat for both cases :)
Comment 11 Aaron J. Seigo 2009-06-23 23:02:35 UTC
is anyone using 4.2.3, 4.2.4 or 4.3beta? this bug should have been fixed in 4.2.3 .. if you can upgrade and confirm, then this is a (fixed) duplicate of bug #187699
Comment 12 Dominik Tritscher 2009-06-24 00:01:05 UTC
I have 4.3beta2 running and there is no high cpu load when having a calendar widget on the desktop.
Comment 13 Patrick 2009-09-03 10:30:19 UTC
I think this can be closed, it has been fixed.
Comment 14 Duckworth Lewis 2009-09-15 21:29:12 UTC
I installed 4.3.1 today from ubuntu's launchpad-ppa http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu.  I have high CPU load from plasma - cause unknown, no work-around, except for renice 20 -p `pidof plasma`  I removed every single item from the plasma bar so that it is just a blank bar, and I am still in vacuum cleaner mode.  Plasma is doing select, writev(3,...), select(), read(3,...) thre times, a total of 387616 bytes, and then read returns EAGAIN.  I'll bet there is nothing wrong with the plugins -- there is something wrong with the handling of EAGAIN -- when you get EAGAIN, you're not supposed to repeat your request, but simply wait a little bit, and then read again.