Bug 115845 - CPU usage increases randomly while writer is minimized after it has been open for several hours
Summary: CPU usage increases randomly while writer is minimized after it has been open...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: x86-64 (AMD64) All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace, notBibisectable, regression
Depends on:
Blocks: Performance
  Show dependency treegraph
 
Reported: 2018-02-19 10:05 UTC by Alexandre Bibeau
Modified: 2024-09-22 03:19 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
verysleepy profile during high CPU usage (13.81 KB, application/zip)
2018-03-17 05:22 UTC, Alexandre Bibeau
Details
longer verysleepy capture of offending thread in version 6.0.2 (37.49 KB, application/zip)
2018-03-21 07:36 UTC, Alexandre Bibeau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Bibeau 2018-02-19 10:05:43 UTC
Description:
If I leave writer open on some documents I'm working on (usually .docx, unreleased documents I'm not at liberty to share, unfortunately), CPU usage will start increasing (from 0% to around 20% of my cpu) at random times, even though it's minimized and I haven't touched it in hours. The usage is sufficient to drive up the fan speed on my laptop and to interfere with CPU demanding processes I may be running and that forces me to close writer. The documents are small in size and contain nothing complex, and certainly nothing that needs a significant amount of computation. I never had this problem working with the same files on my Libreoffice 5 installation on linux.

Steps to Reproduce:
1.Leave reasonable .docx open
2.Work a bit, add comments, etc.
3.Minimize, leave it alone for several hours

Actual Results:  
CPU usage increases unreasonably

Expected Results:
CPU usage should stay around 0%


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 6.0.1.1 (x64)
Build ID: 60bfb1526849283ce2491346ed2aa51c465abfe6
CPU threads: 8; OS: Windows 10.0; UI render: default; 
Locale: en-CA (en_CA); Calc: group


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
Comment 1 Imai 2018-02-20 09:24:41 UTC
Issue not reproduced.
I tried 3hours,but not around 20%.
---
OS X EL Capitan
Ver:10.11.3

version: 6.0.1.1
Build ID: 60bfb1526849283ce2491346ed2aa51c465abfe6
CPU threads: 4; OS:Mac OS X 10.11.3; UI render: default; 
local: ja-JP (ja.UTF-8); Calc: group
Comment 2 Alexandre Bibeau 2018-02-21 10:46:15 UTC
(In reply to Imai from comment #1)
> Issue not reproduced.
> I tried 3hours,but not around 20%.
> ---
> OS X EL Capitan
> Ver:10.11.3
> 
> version: 6.0.1.1
> Build ID: 60bfb1526849283ce2491346ed2aa51c465abfe6
> CPU threads: 4; OS:Mac OS X 10.11.3; UI render: default; 
> local: ja-JP (ja.UTF-8); Calc: group

Sometimes is takes almost a day before it occurs. I have no idea what triggers it.
Comment 3 Tim 2018-03-06 10:16:55 UTC
I can confirm I also suffer from this, or a similar, bug.

In my case after a document has been left open for multiple hours or days Writer begins using 100% of a single CPU core.

I am using .odt documents of around 15k words, though the documents are mainly text.

This issue is new in Libreoffice 6.x and wasn't apparent in 4.x or 5.x.

Steps to reproduce
1. Open .odt file, 
2. Write, edit, add comments, etc.
3. Leave document open in background for hours / days. This will usually include suspending laptop on a number of occasions.

Result
CPU increases to ~100% of single core, fan spins up.

Expected result
CPU usage ~1%

Workaround
Close Writer

Version: 6.0.2.1
Build ID: 1:6.0.2~rc1-0ubuntu0.16.04.1~lo1 (Libre Office Fresh PPA)
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk3; 
Locale: en-AU (en_AU.UTF-8); Calc: group

OS: Ubuntu 16.04 LTS
Comment 4 Alexandre Bibeau 2018-03-09 17:50:51 UTC
I have also been able to replicate the bug with .odt documents. Again, they contain nothing special, just text and comments.
Comment 5 Buovjaga 2018-03-11 14:30:38 UTC
Ok, I guess we have to set to NEW, but it's darn hard to reproduce and investigate.
Comment 6 Alexandre Bibeau 2018-03-11 16:10:53 UTC Comment hidden (obsolete)
Comment 7 Buovjaga 2018-03-11 16:12:49 UTC Comment hidden (obsolete)
Comment 8 Telesto 2018-03-12 14:47:53 UTC
(In reply to Buovjaga from comment #7)
> (In reply to Alexandre Bibeau from comment #6)
> > (In reply to Buovjaga from comment #5)
> > > Ok, I guess we have to set to NEW, but it's darn hard to reproduce and
> > > investigate.
> > 
> > Is there some sort of diagnostics tool I can run? It happens fairly
> > consistently on my system.
> 
> Hmh, well there are debuggers, profilers and such, but I am not able to
> advise on their use. Especially in this sort of long running thing.

VerySleepy (Windows) is a very basic profiler, which could give some insight.. (no guarantees) 
http://www.codersnotes.com/sleepy/

1. Launch it when LibreOffice is using 100%
2. Select soffice.bin as process to profile
3. Select the top thread (probably the post active one)
4. Set profile for time set. And configure it to, say 30 seconds
5. Profile selected, wait until done
6. Select File -> Save As. and attach it
Comment 9 Alexandre Bibeau 2018-03-17 05:22:16 UTC
Created attachment 140667 [details]
verysleepy profile during high CPU usage

While soffice.bin was using about 65% of a core while minimized, here is what verysleepy recorded.
Comment 10 Alexandre Bibeau 2018-03-21 07:36:06 UTC
Created attachment 140765 [details]
longer verysleepy capture of offending thread in version 6.0.2

Another verysleepy capture, one thread was responsible for all the unwarranted cpu usage, I acquired samples for that thread during 60s.
Comment 11 Alexandre Bibeau 2018-03-21 07:39:00 UTC
Comment on attachment 140765 [details]
longer verysleepy capture of offending thread in version 6.0.2

The new verysleepy capture is from the libreoffice 6.0.2.1 release.
Comment 12 Telesto 2018-03-21 09:43:00 UTC
(In reply to Alexandre Bibeau from comment #11)
> Comment on attachment 140765 [details]
> longer verysleepy capture of offending thread in version 6.0.2
> 
> The new verysleepy capture is from the libreoffice 6.0.2.1 release.

Thanks for the effort! I can't really interpret it, sadly.. Hopefully someone else can.
Thinking about it, a Procdump dump might be helpful to.. 

@Timur
Is this a scenario where ProcDump could be useful? And if so, which type of command?
Comment 13 Timur 2018-03-21 11:40:44 UTC
I find procdump useful in Windows when:
- WinDBG doesn't give result for any reason
- there's a dump but not a crash
- you need a simpler tool for end user compared to WinDBG that needs to be set

CPU may not be related to dump but it's worth trying. 
Usage is simple, without installation: 
- get Sysinternals free suite 
- run Cmd (Command Prompt)
- run LO (single version that you need)
- run procdump: path-to\SYSINTERNALSSUITE\procdump.exe soffice.bin -option path-to\soffice.bin.dmp

"-option" is generally "-h" to write dump if process has a hung window and that's what I use regularly 
But "-p" could be tried here, I didn't use it before. 
I guess we should have a wiki on this, which tool to use when. 

Dump is than analyzed in WinDBG via File-Open crash dump.

Missing in this bug is an example of document that gives consistent high CPU.
Comment 14 Alexandre Bibeau 2018-04-13 21:31:36 UTC Comment hidden (obsolete)
Comment 15 Buovjaga 2018-04-14 17:16:34 UTC Comment hidden (obsolete)
Comment 16 Alexandre Bibeau 2018-04-18 03:45:11 UTC
(In reply to Buovjaga from comment #15)
> (In reply to Alexandre Bibeau from comment #14)
> > In the meantime, what do I do with that 1GB dump?
> 
> How small does it get, if you compress it using .tar.xz?

It brings it down to about 125MB, still too big for bugzilla, but I could upload it somewhere else.
Comment 17 QA Administrators 2019-04-19 03:01:05 UTC Comment hidden (obsolete)
Comment 18 Alexandre Bibeau 2019-04-23 11:35:11 UTC
On my machine, this bug is still present in the latest version.

Here's the exact build:

Version: 6.2.2.2 (x64)
Build ID: 2b840030fec2aae0fd2658d8d4f9548af4e3518d
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: en-CA (en_CA); UI-Language: en-GB
Calc: CL

I don't know if other users are affected the same way, but the bug seems to happen even more frequently in this version.
Comment 19 QA Administrators 2022-09-22 03:54:46 UTC Comment hidden (obsolete)
Comment 20 QA Administrators 2024-09-22 03:19:10 UTC
Dear Alexandre Bibeau,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug