Bug 75554 - VIEWING: Caused Xorg 100% CPU and the whole GUI hanged
Summary: VIEWING: Caused Xorg 100% CPU and the whole GUI hanged
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.6.2 release
Hardware: Other Linux (All)
: high major
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords: notBibisectable, regression
Depends on:
Blocks: Performance CPU-AT-100%
  Show dependency treegraph
 
Reported: 2014-02-27 02:36 UTC by Ryan Duan
Modified: 2024-04-25 06:39 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
doc with text, headings, graphics, OLE objs, hyperlinks, indexes and page breaks (1.76 MB, application/msword)
2014-02-27 02:36 UTC, Ryan Duan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Duan 2014-02-27 02:36:40 UTC
Created attachment 94795 [details]
doc with text, headings, graphics, OLE objs, hyperlinks, indexes and page breaks

Problem description:

When browsing the attached file, at some point (pages), Writer hanged, and the whole GUI system hanged, so I had to switch to the console TTY1 to do something.

In program 'top', it showed that 'Xorg' occupied 100% CPU.  After killing Writer, the whole system returned to the normal state.

----
I tested it in MS Windows XP, LO will hang itself in certain pages, but won't hang the whole system.  The hang pages differs from that on GNU/Linux.
----

Apache OpenOffice 4.0.1 doesn't have this problem; we can browse the file very smoothly wih OO.

With this problem, no one dare adopt LO as normal office tool in serious business, because the attached file is a normal file created with MS Word without any trick.

--------
TEST CASE 1 (browsing)
--------
Steps to reproduce:
1. Open the attached file, and page down to browse it.
2. For LO 4.2.1.1, it hangs in page 8.  For previous versions of LO (I tested 4.1.4 and 4.0.6), it hangs in page 4.

Current behavior:
LO causes Xorg to run at 100% of CPU and the whole GNOME hangs.

Expected behavior:
LO should view the file smoothly without hang the whole GNOME GUI.

--------
TEST CASE 2 (save as ODT)
--------
Steps to reproduce:
1. Open the attached file, "Save as..." as ODT format.

Current behavior:
LO causes Xorg to run at 100% of CPU and the whole GNOME hangs.
But it seems that the odt file can be saved completely.

Expected behavior:
LO should not hang the whole GNOME GUI.

--------
TEST CASE 3 (good behavior for exporting to PDF)
--------
Open the attached file, and export it to PDF format.  It behaves correctly.
Operating System: Debian
Version: 4.2.1.1 release
Comment 1 Joel Madero 2014-02-27 02:40:53 UTC
Updating version to oldest known version - 4.0.6 - as Ryan has pointed out that he had hangs (although at a different point) in the older release.
Comment 2 Ryan Duan 2014-02-27 02:46:32 UTC
My main test environment
------------------------

ryan@rd:~$ soffice --version
LibreOffice 4.1.4.2 410m0(Build:2)

ryan@rd:~$ ./soffice --version
LibreOffice 4.2.1.1 d7dbbd7842e6a58b0f521599204e827654e1fb8b

ryan@rd:~$ LibreOffice_4.0.6.2_Linux_x86_deb/DEBS/install/opt/libreoffice4.0/program/soffice --version
LibreOffice 4.0.6.2

ryan@rd:~$ lsb_release --all
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 7.2 (wheezy)
Release:	7.2
Codename:	wheezy

ryan@rd:~$ lscpu
Architecture:          i686
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                2
On-line CPU(s) list:   0,1
Thread(s) per core:    1
Core(s) per socket:    2
Socket(s):             1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 15
Stepping:              13
CPU MHz:               1861.848
BogoMIPS:              3723.94
L1d cache:             32K
L1i cache:             32K
L2 cache:              512K

ryan@rd:~$ locale
LANG=en_US.utf8
LANGUAGE=
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=
Comment 3 Joel Madero 2014-02-27 02:57:38 UTC
Confirmed:
Ubuntu 13.10
GNOME
LibreOffice 4.1.5.3 & LibreOffive 4.3 built just last night.

My guess this is a duplicate of one of the other image bugs we have - we know the code is a mess but it's a huge huge job to fix it requiring a ton of time from a very skilled developer.

In order to confirmation I am asking Michael - also is there anything else QA can do to help narrow down the issue? 

@Michael - apologies for private ping but I know we've discussed this image problem some times in the past and thought your insight would be good.

@Ryan - do you know if this ever worked in LibreOffice - if so, do you know a version? I may be able to bibisect if it worked at some point
Comment 4 Ryan Duan 2014-02-27 03:39:58 UTC
(In reply to comment #3)
> Confirmed:
> Ubuntu 13.10
> GNOME
> LibreOffice 4.1.5.3 & LibreOffive 4.3 built just last night.
> ...
> @Ryan - do you know if this ever worked in LibreOffice - if so, do you know
> a version? I may be able to bibisect if it worked at some point

It worked correctly in version 3.5.4.2 Build ID: 350m1 (Build:2) which is installed from Debian Wheezy repository.
Comment 5 Joel Madero 2014-02-27 04:06:24 UTC
Thanks for that - very cool - might be bibisectable then. I'll try as soon as I redownload the bibisect package
Comment 6 Michael Meeks 2014-02-27 09:08:37 UTC
So - it is not abnormal that certain documents happen to trigger obscure corner-cases that cause problems; all software has this issue - though the corner-cases often differ.

Things that would help here (apart from bibisecting which would be cool) would be to chop down the document to a minimal document that reproduces the same problem: ie. as few pages as possible, and as few text frames / OLE objects etc. That helps us build a nice regression test case for this too for the future as well as making it much easier to diagnose the problem.

It is unusual though that X hangs; it would be great to get a stack trace (with debugging symbols) of LibreOffice while that is going on, I guess we're stuck rendering something at some length; it'd be good to find out what that is. To get that - its good to ssh in from a remote host, run gdb and 'attach <pid>' where <pid> is $ pidof soffice.bin

Thanks ! =)
Comment 7 Joel Madero 2015-04-12 16:29:42 UTC
Sorry for the horrible delay - unfortunately this bug is not bibisectable as a ton of ranges spit out this error:

terminate called after throwing an instance of 'std::length_error'
  what():  vector::reserve


Going to try to chop down the document to see if I can get a simpler version now.

But it is a confirmed regression (earlier ranges in bibisect work just fine)
Comment 8 m_a_riosv 2015-04-12 22:30:21 UTC
I can't reproduce the issue commented in #1 with windows:
Win7x64Ultimate
Version: 4.4.2.2 Build ID: c4c7d32d0d49397cad38d62472b0bc8acff48dd6

Memory options for Graphics cache: 256Mb; 1Mb; 01:00; 256 Objects. 
with
Memory options for Graphics cache: 32Mb; 1Mb; 01:00; 16 Objects.
near to inappreciable difference.

Report it's a bit old and it uses Asian text, some bugs like https://bugs.documentfoundation.org/show_bug.cgi?id=78479 have been solved.
Comment 9 Joel Madero 2015-04-12 22:38:44 UTC
Ah sorry I should have been clearer - I can reproduce 100% of the time in ubuntu 14.10 using LibreOffice 4.4.2 and I have confirmed that it is in fact a regression.
Comment 10 Jean-Baptiste Faure 2015-04-17 07:29:24 UTC
No problem for me with Version: 5.0.0.0.alpha0+
Build ID: 6ffecab0cfa0168ae2a98dc961de663855d41648
built at home under Ubuntu 14.10 x86-64.
Opening and formatting the document is rather long but it is probably because the used font (Chinese) is not installed on my PC. No freeze at all.

Idem (no problem) with LibreOffice 4.4.4.0.0+ also built at home under Ubuntu 14.10 x86-64.

Best regards. JBF
Comment 11 Robinson Tryon (qubit) 2015-12-10 01:28:48 UTC Comment hidden (obsolete)
Comment 12 QA Administrators 2017-01-03 19:41:52 UTC Comment hidden (obsolete)
Comment 13 Jean-Baptiste Faure 2017-02-04 12:14:21 UTC
Still not reproducible for me with LO 5.3.1.0.0+ built at home under Ubuntu (Unity) 16.04 x86-64.

Best regards. JBF
Comment 14 QA Administrators 2018-02-05 03:27:54 UTC Comment hidden (obsolete)
Comment 15 Telesto 2020-05-24 10:15:01 UTC
No issue with
Version: 7.0.0.0.alpha1+ (x64)
Build ID: b587de60d4e6aa96238766272d94f1499b22f696
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win; 
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL