Bug 371712 - Plasmashell polling on zero timeout
Summary: Plasmashell polling on zero timeout
Status: RESOLVED NOT A BUG
Alias: None
Product: plasmashell
Classification: Plasma
Component: DataEngines (show other bugs)
Version: master
Platform: Kubuntu Linux
: NOR major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-26 13:57 UTC by Optional
Modified: 2017-08-29 07:13 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
sudo health-check -p plasmashell (7.76 KB, text/plain)
2016-10-26 13:57 UTC, Optional
Details
perf (54.48 KB, application/octet-stream)
2016-10-26 18:51 UTC, Optional
Details
perf.data.old (17.55 KB, application/x-trash)
2016-10-26 18:55 UTC, Optional
Details
perf.data file from "sudo perf record -F 100 -g --pid 3571" command (3.20 MB, application/octet-stream)
2016-10-31 09:35 UTC, Optional
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Optional 2016-10-26 13:57:09 UTC
Created attachment 101798 [details]
sudo health-check -p plasmashell

Very likely due to plasmashell, the OS hangs/responds very slowly in between while typing or switching tasks or while doing any work. During this hang/slow behaviour, I notice the fan revving in high speed, delay in typing, network disconnection and  stuck digital clock seconds counter which restores to normal after the lag subsides but occurs every 10 seconds or so lasting for about 3-4 seconds.

Sysinfo for 'TuxStick': Running inside KDE Plasma 5.7.5 on Ubuntu 16.10 (Yakkety Yak) powered by Linux 4.8.0-26-generic, CPU: Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz at 2099/2700 MHz, RAM: 7443/7902 MB, Storage: 26/57 GB, 283 procs, 65.76h up

health-check output attached
Comment 1 David Edmundson 2016-10-26 15:08:28 UTC
A poll which timesout immediately isn't necessarily a problem, that just means we're trying to wait for a file which has data ready; 

The above attachment doesn't really tell me anything, if it is using CPU somewhere, I don't have a clue where.

Can you try something like:

perf record -F 100 -g plasmashell

and reproduce the issue.

also make sure to quit plasma properly with kquitapp5 plasmashell to flush recordings.
Comment 2 Optional 2016-10-26 18:49:46 UTC
Hey, thanks for your reply.

All I know is that my operating system is lagging very often. It hangs every 10 seconds for 3-4 seconds which is annoying. And whenever there is a lag, the digital clock's second counter stops, laptop's fan revs to high speed, there is network disconnection and I often don't see what I type. All of this restores to normal after the lag subsides but this, as I said, happens very often on a regular basis.

I tried to narrow down the issue with cpustat, fnotifystat, forkstat and health-check tools and found plasmashell as the offender, as also evident from poll lines. Plasmashell is very busy and spinning on zero timeout.

Regrading what you asked, I closed plasma with the said command and restarted it by inputting just plasmashell and then ran your command. If I understand correctly your perf command is to collect stats when the issue reproduces but I cannot reproduce the issue by myself, it happens by itself. And a new problem appeared after running your command. A pop-up with title kdeconnectd stating following error:
"Unable to save bookmarks in /home/sanguine/.local/share/user-places.xbel. Reported error was: Existing file /home/sanguine/.local/share/user-places.xbel is not writable. This error message will only be shown once. The cause of the error needs to be fixed as quickly as possible, which is most likely a full hard drive."
Following this error I'm unable to open Dolphin file browser and hence unable to attach perf.data file
Comment 3 Optional 2016-10-26 18:51:29 UTC
Created attachment 101806 [details]
perf

perf
Comment 4 Optional 2016-10-26 18:55:37 UTC
Created attachment 101807 [details]
perf.data.old

perf.data.old
Comment 5 David Edmundson 2016-10-28 10:21:17 UTC
thanks
Comment 6 David Edmundson 2016-10-30 21:27:46 UTC
Current perf recordings have no debug symbols. 
Marking as needs info till we get the new set.

(ping me on IRC again sometime, hopefully I'll be around)
Comment 7 Optional 2016-10-31 07:47:35 UTC
Debug symbols installed, recording perf data. Will be uploaded shortly
Comment 8 Optional 2016-10-31 09:35:30 UTC
Created attachment 101914 [details]
perf.data file from "sudo perf record -F 100 -g --pid 3571" command

sudo perf record -F 100 -g --pid 3571
Comment 9 Optional 2016-10-31 09:37:52 UTC
Data uploaded
Comment 10 Marco Martin 2016-10-31 14:23:43 UTC
(In reply to Optional from comment #2)
> kdeconnectd stating following error:
> "Unable to save bookmarks in /home/sanguine/.local/share/user-places.xbel.
> Reported error was: Existing file
> /home/sanguine/.local/share/user-places.xbel is not writable. This error

most likely you tried to launch dolphin (or any app in which you used the file open dialog) as root, which is unconnected with this issue, and explicitly not supported
Comment 11 Marco Martin 2016-10-31 15:26:33 UTC
to me perf report complains this trace doesn't have samples
Comment 12 Optional 2016-11-01 05:07:37 UTC
@Marco I don't launch any app with root. Launching Dolphin gave that error which is unrelated to bug reported and was later solved by quitting and relaunching plasmashell
Comment 13 Optional 2016-11-01 05:10:26 UTC
@Marco I ran following commands to fetch data:

kquitapp5 plasmashell
plasmashell
sudo perf record -F 100 -g --pid "pid of plasmashell"

Still if there is no traces then maybe the commands suggested are wrong. I did what I was asked to do
Comment 14 David Edmundson 2016-11-01 11:23:29 UTC
Does running "perf report -g plasmashell" work on your system?

If not, it definitely won't here.

When running I get:

WARNING: The perf.data file's data size field is 0 which is unexpected.
Was the 'perf record' command properly terminated?
Comment 15 Alexander Mentyu 2017-08-29 06:37:40 UTC
Is this bug still relevant? Can you reproduce it currently?
Comment 16 David Edmundson 2017-08-29 07:13:06 UTC
Nothing useful in the bug report.
Hopefully has been fixed with other changes in the meantime