Bug 100253 - Complex draw diagram fails to open after 25 hours on 5.0.3.2 Linux, opens fine on 4.3.5.2 Windows
Summary: Complex draw diagram fails to open after 25 hours on 5.0.3.2 Linux, opens fin...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
5.0.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace, perf
Depends on:
Blocks:
 
Reported: 2016-06-07 08:44 UTC by Gessel
Modified: 2019-03-28 10:00 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
This is a demo document with a lot of objects on an A0 page that is very slow. (947.79 KB, application/vnd.oasis.opendocument.graphics)
2017-05-26 15:56 UTC, Gessel
Details
Callgrind output from 5.5 master (5.54 MB, application/x-xz)
2017-05-26 18:24 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gessel 2016-06-07 08:44:23 UTC
I have a complex "A0" size document (total size 1.8MiB) that now refuses to open under draw.  I left it opening over night, it used 25 hours of CPU time (pegging one of 8 cores at 100% for the whole time) and ultimately XFCE crashed.

The initial view of the document comes up in a normal amount of time time, but it never renders the thumbnails of additional pages, no Libre Office component is responsive and while the window decorations redraw, menus don't open, etc.; the LibreOffice suite is completely non-responsive.  Clicking on the close window eventually triggers the unresponsive application warning and it can be force-quit.

Version: 5.0.3.2
Build ID: 1:5.0.3~rc2-0ubuntu1~trusty2
Locale: en-US (en_US.UTF-8)

Kernel: 3.19.0-32-generic x86_64 (64 bit) Desktop: Xfce 4.12.2  Distro: Linux Mint 17.3 Rosa

I also have a VM of Win 7 ultimate/SP1 running under VMWare workstation and LO Version: 4.3.5.2 Build ID: 3a87456aaa6a95c63eea1c1b3201acedf0751bd5 running on that.

The same document opens normally on that version of LO.  It takes about 3 seconds to open the initial view and another 10 seconds or so to render 5 thumbnails of other views.

In attempting to fix the failure to load, I've tried allocating more memory to the graphics cache (no change) and turned off OpenCL and Java (no change).

(below is after having made the above changes and waiting approximately 40 minutes for the document to open)

 4 6704 user 20 0 2184M 1255M 108M R 100. 3.9 37:14.70 /usr/lib/libreoffice/program/soffice.bin --draw --splash-pipe=5

5.0.3.2 seems to be current in the repositories.  I'm happy to try a later release/5.2 beta if there's any reason to think a fix has been integrated.  I don't want to update the Windows copy to current - even if the VM is very slow compared to the host, at least it gives me access to the drawing.

4 pages of complex A0 size drawings opened slowly, but adding a 5th changed a 10-15 minute load time to "forever".  Breaking apart the drawings using the windows version, I can open single pages again.  There seems to be an exponential increase in "thumbnail render time" with the number of A0 pages in the entire drawing.
Comment 1 Buovjaga 2016-06-10 12:22:52 UTC
We need the document to test.

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the document.

To try with the bleeding edge:
http://dev-builds.libreoffice.org/daily/master/Win-x86_64@62-TDF/current/
http://dev-builds.libreoffice.org/daily/master/Linux-rpm_deb-x86_64@70-TDF/current/
https://wiki.documentfoundation.org/Installing_in_parallel
Comment 2 QA Administrators 2016-12-07 12:37:28 UTC Comment hidden (obsolete)
Comment 3 QA Administrators 2017-01-31 00:24:47 UTC Comment hidden (obsolete)
Comment 4 Gessel 2017-05-26 15:56:41 UTC
Created attachment 133623 [details]
This is a demo document with a lot of objects on an A0 page that is very slow.
Comment 5 Timur 2017-05-26 18:03:08 UTC
Can't confirm with 5.1 and master. Slow but similar both in Lin/Win to open (in a minute or so) and work, but opens not in hours.
Since in took long to get a file, please test now with current LO versions or those that you have. 

I'm suggesting that you:
- get http://tdf.io/siguiexe to easily get and run "parallel" LO in Windows (extract without installation) and
- run different extracted versions and architectures (32-bit or 64-bit) related to this bug in order to test 

In Linux you can use Bash Script from http://pastebin.com/L6SFSYFR (just run /bin/LO-extract.sh) to Extract Parallel LO (no installation) from downloaded and unzipped LO folder with DEBS.
Or install latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ or add LO PPA to install. I don't know why Ubuntu doesn't upgrade to x.y.last for stable branch. 

Personally, I'm using Still in production, it means version x.y.last.
Comment 6 Buovjaga 2017-05-26 18:24:48 UTC
Created attachment 133626 [details]
Callgrind output from 5.5 master

Arch Linux 64-bit, KDE Plasma 5
Version: 5.5.0.0.alpha0+
Build ID: e60529fdfe0502f64e3c975f71539b28146943e8
CPU threads: 8; OS: Linux 4.10; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on May 26th 2017
Comment 7 Buovjaga 2017-05-26 18:27:27 UTC
Well it seems to be faster in:

Win 10
Version: 4.4.7.2
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: fi_FI

Arch Linux 64-bit
Version 3.6.7.2 (Build ID: e183d5b)

As I took a callgrind, let's set to NEW so we will lure someone to analyse it.

Apparently the document is different from the one talked about in the description as it only has 1 page.
Comment 8 Gessel 2017-05-26 23:14:59 UTC
Yeah, this attachment is different because the one i was working with is confidential, unfortunately.  I tried to create a new on that causes the same problems.  I ran into massive delays opening more than 2 drawings of this size at the same time.  I could more or less work by opening one at a time.  I tried to create a multi-page document - the equivalent of copying the page in this document a few times and that's when I needed to recover it using version 4.x on Windows, which worked.

I have VMs with latest and 4.X on Linux and can create the same on Windows for testing.
Comment 9 Gessel 2017-07-13 11:59:52 UTC
I can install parallel versions and test on the proprietary drawings.  I checked out https://wiki.documentfoundation.org/QA/Testing/Subsequenttests but it isn't clear those tests can be run document specific.  

There are two manifestations of the same issue that might be testable to provide reproducible statistics:  

The time between initiating a document open and when that document is editable.

The time between making a modification to the drawing and when the drawing is again editable (and the page iconifications update)


The former is probably the most repeatable to test, but I'm not sure how to objectively time it (human observation and manual timing would seem to introduce too many opportunities for error).

-David
Comment 10 Buovjaga 2017-07-13 13:58:34 UTC
(In reply to Gessel from comment #9)
> I can install parallel versions and test on the proprietary drawings.  I
> checked out https://wiki.documentfoundation.org/QA/Testing/Subsequenttests
> but it isn't clear those tests can be run document specific.  

That page is talking about automated tests that developers have defined using C++ or Java. 

To time a document open, you could use a special environment variable. So in a terminal you would give these commands:

export OOO_EXIT_POST_STARTUP=1
time soffice document.odg

When using parallel installs, point the soffice command to whichever specific path you want.
Comment 11 Gessel 2017-07-13 14:15:28 UTC
Thanks - i'll give it a try and post results by version.
Comment 12 QA Administrators 2018-07-14 02:46:53 UTC Comment hidden (obsolete)
Comment 13 Gessel 2019-03-27 22:25:34 UTC
Version: 6.2.2.2 does not seem to be affected under Mint 19.1  I think this can be closed.
Comment 14 Buovjaga 2019-03-28 06:16:09 UTC
Yeah, it's pretty fast:
real    0m21,351s
user    0m12,452s
sys     0m2,067s

Arch Linux 64-bit
Version: 6.3.0.0.alpha0+
Build ID: 9852f09b467e3c7f8058b931010b91f447905051
CPU threads: 8; OS: Linux 5.0; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 27 March 2019