High CPU usage when large document open

Bug #1825513 reported by Tim Hamilton on 2019-04-19
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LibreOffice
Won't Fix
Medium
libreoffice (Ubuntu)
Undecided
Unassigned

Bug Description

Description:
CPU usage spikes to 110-130% (across 4 cores) when a large document (~260 pages, mainly text) is opened.

Steps to reproduce:
Open large document
Observe CPU spike and fan spin up
Close file
Observe CPU drop and fan spin down

Expected result:
Small spike in CPU usage while opening, overall slight increase in CPU usage, total to remain >10%

Reproducible:
Always

User Profile Reset: No.

Bug also filed against Libreoffice 6.2.2 installed on Ubuntu 18.10 via PPA. See: https://bugs.documentfoundation.org/show_bug.cgi?id=124346

ProblemType: Bug
DistroRelease: Ubuntu 19.04
Package: libreoffice-writer 1:6.2.2-0ubuntu2
ProcVersionSignature: Ubuntu 5.0.0-13.14-generic 5.0.6
Uname: Linux 5.0.0-13-generic x86_64
ApportVersion: 2.20.10-0ubuntu27
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Fri Apr 19 22:04:37 2019
InstallationDate: Installed on 2019-02-04 (74 days ago)
InstallationMedia: Ubuntu 18.10 "Cosmic Cuttlefish" - Release amd64 (20181017.3)
SourcePackage: libreoffice
UpgradeStatus: Upgraded to disco on 2019-04-19 (0 days ago)

Description:
CPU usage spikes to 110-130% (across 4 cores) when a large document (~260 pages, mainly text) is opened.

Steps to reproduce:
Open large document
Observe CPU spike and fan spin up
Close file
Observe CPU drop and fan spin down

Expected result:
Small spike in CPU usage while opening, overall slight increase in CPU usage, total to remain >10%

Reproducible:
Always

User Profile Reset:
No, relatively new install upgraded from 6.1.x.

Operating System
Ubuntu 18.10

Install method
Ubuntu LibreOffice PPA
https://launchpad.net/~libreoffice

Additional Info:
Version: 6.2.2.2
Build ID: 1:6.2.2-0ubuntu0.18.10.1~lo1
CPU threads: 4; OS: Linux 4.18; UI render: default; VCL: gtk3;
Locale: en-AU (en_AU.UTF-8); UI-Language: en-US
Calc: threaded

Created attachment 150347
20 pages of lorem ipsum

20 pages of lorem ipsum will cause a spike in CPU usage.

Tim Hamilton (pseudomorph) wrote :
  • Lorem.odt Edit (348.4 KiB, application/vnd.oasis.opendocument.text)

Hi Tim, I'm battling to reproduce this issue on Build ID: 1:6.2.2-0ubuntu2.

I'm using the attached 300 page lorem ipsum document. Could you please try this document yourself and let me know if the same problem occurs.

If not, could you provide another that definitely causes the issue.

Thank you!

Changed in libreoffice (Ubuntu):
status: New → Incomplete
Changed in df-libreoffice:
importance: Unknown → Medium
status: Unknown → New
Tim Hamilton (pseudomorph) wrote :

Hi Marcus, thanks for taking the time to look into this.

You're right, it doesn't seem like the lorem file I generated consistently generates the bug, at least on Ubuntu 19.04 (the initial bug was reported under 18.10). I'm away from home and don't have access to 18.10 to test right now.

I do have another file that consistently spikes CPU that I can share for testing purposes, though I'd rather not post on a public bug tracker. Is there any way I can forward a copy to you?

Sure. You can mail me at marcus.tomlinson AT canonical.com

Tim Hamilton (pseudomorph) wrote :

Further testing has revealed the issue to lie with a LibreOffice grammar extension called LanguageTool.

This is a known issue in LanguageTool and removing the extension resolved the issue.

See this bug in the LangugeTool bug tracker: https://github.com/languagetool-org/languagetool/issues/1217?_pjax=%23js-repo-pjax-container

Further testing has revealed the issue to lie with a LibreOffice grammar extension called LanguageTool.

This is a known issue in LanguageTool and removing the extension resolved the issue.

See this bug in the LangugeTool bug tracker: https://github.com/languagetool-org/languagetool/issues/1217?_pjax=%23js-repo-pjax-container

Hmmm, after some digging into this issue with Tim, we may have uncovered the culprit. It looks like the 'LanguageTool' LibreOffice extension is causing the high CPU load, not LibreOffice itself.

When installed, opening a large document will send LibreOffice's CPU usage skyrocketing. After a few minutes (depending on the size of the document), the usage does eventually drop back down below 5% again.

When uninstalled, opening a large document inhibits a short spike in CPU usage, but quickly drops off.

LangugeTool bug report: https://github.com/languagetool-org/languagetool/issues/1217?_pjax=%23js-repo-pjax-container

Changed in libreoffice (Ubuntu):
status: Incomplete → Won't Fix
Changed in df-libreoffice:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.