Bug 125372 - FILEOPEN: LibreOffice freeze opening document (with many hints/tracked changes)
Summary: FILEOPEN: LibreOffice freeze opening document (with many hints/tracked changes)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: x86-64 (AMD64) All
: medium major
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0
Keywords: haveBacktrace, perf
Depends on:
Blocks: File-Opening
  Show dependency treegraph
 
Reported: 2019-05-19 14:50 UTC by Sun
Modified: 2019-07-26 15:57 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
The file for reproduce the bug (1.74 MB, application/vnd.oasis.opendocument.text)
2019-05-19 14:51 UTC, Sun
Details
Perf flamegraph (166.84 KB, image/svg+xml)
2019-05-21 13:41 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sun 2019-05-19 14:50:10 UTC
Description:
When I opening or saving the attached document. The LibreOffice writer freezes and took a long time to open or save. I tried to use bisect method to split the document into two halves. But if I open any of them, the problem is gone. So I have to upload the complete document. Sorry about that...

Steps to Reproduce:
1. Open or save the attached document.

Actual Results:
The LibreOffice Writer freeze and the CPU consumption is high.

Expected Results:
The document should be opened or saved instantly.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Sun 2019-05-19 14:51:18 UTC
Created attachment 151516 [details]
The file for reproduce the bug

The file for reproduce the bug
Comment 2 Xisco Faulí 2019-05-21 13:18:46 UTC
I kill Libreoffice after

real	35m6,329s
user	34m42,157s
sys	0m26,532s

Version: 6.3.0.0.alpha1+
Build ID: 38ac0586448d4f07811b139f62f62686b029feba
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 3 Buovjaga 2019-05-21 13:41:20 UTC
Created attachment 151561 [details]
Perf flamegraph

Check IO/CPU overload!

Arch Linux 64-bit
Version: 6.3.0.0.alpha1+
Build ID: 7aa30433719faece8c40e41d7aa8c7539287932d
CPU threads: 8; OS: Linux 5.1; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 19 May 2019
Comment 4 Xisco Faulí 2019-05-21 13:47:30 UTC
in

Version: 5.2.0.0.alpha1+
Build ID: 5b168b3fa568e48e795234dc5fa454bf24c9805e
CPU Threads: 4; OS Version: Linux 4.15; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8)

it takes

real	26m1,750s
user	25m28,823s
sys	0m30,614s

so in master it's slower, although it was already really slow in the past

@Noel, I thought you might be interested in this issue...
Comment 5 Xisco Faulí 2019-05-21 14:51:17 UTC
it takes

real	13m1,579s
user	11m13,255s
sys	0m4,092s

in

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)

faster than master but very slow anyway...
Comment 6 Commit Notification 2019-05-25 18:40:51 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/530331e4ac5b2351c3e72896342db103427088e5%5E%21

tdf#125372 writer, file with lots of hints very slow to open, part1

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2019-05-26 13:06:41 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/06d39b8663fd98a82cec4015eee3b425f92bc51d%5E%21

tdf#125372 writer, file with lots of hints very slow to open, part2

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2019-05-28 14:42:20 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/7ac940d278f9bb3fbb1988a74dfa4909960bd998%5E%21

tdf#125372 writer, file with lots of hints very slow to open, part3

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2019-05-29 05:52:06 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/a65918c5b6aaff0206c461e46b798efb95dc42c6%5E%21

tdf#125372 writer, file with lots of hints very slow to open, part4

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2019-05-30 07:41:38 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/799dac2e621bf14f613b3ee4f6a711b49c0c5e81%5E%21

tdf#125372 writer, file with lots of hints very slow to open, part5

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2019-05-30 11:03:19 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/b32a962897bd3dfeb012d971a0c3349c8d58c7fd%5E%21

tdf#125372 writer, file with lots of hints very slow to open, part6

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2019-05-30 12:06:08 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/5a74ef3d249ea88cf0bf1f333014809f652a6a41%5E%21

tdf#125372 writer, file with lots of hints very slow to open, part7

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2019-05-31 06:22:14 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/9ff648c691f003a11eba9a22ac37032d72b4b642%5E%21

tdf#125372 writer, file with lots of hints very slow to open, part8

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 V Stuart Foote 2019-05-31 13:21:19 UTC
(In reply to Commit Notification from comment #13)
> Noel Grandin committed a patch related to this issue.

> tdf#125372 writer, file with lots of hints very slow to open, part8
> ... 
> Affected users are encouraged to test the fix and report feedback.

On Winndows 10 Home 64-bit en-US (1809) with x86 build TB42 nightly
Version: 6.3.0.0.alpha1+
Build ID: 13da1c7913ca76ca5b33f0666ab7cc4a219815e1
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-05-31_08:35:48
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
 
Initial document load proceeds and first page appears, but crash before fully able to use. When launch is attached to WinDbg receive the below error at crash.

Crashes with both Default or OpenGL rendering.

=-=-=


0:000:x86> ~* kp

.  0  Id: f38.888 Suspend: 1 Teb: 0090a000 Unfrozen
 # ChildEBP RetAddr  
00 013ce050 21ae2776 VCRUNTIME140!memcpy(unsigned char * dst = 0x22fb6124 "???", unsigned char * src = 0x0000ffff "--- memory read error at address 0x0000ffff ---", unsigned long count = 0x32)+0x4e [f:\dd\vctools\crt\vcruntime\src\string\i386\memcpy.asm @ 194] 
WARNING: Stack unwind information not available. Following frames may be wrong.
01 013ce070 21ae2adc swlo!CharFormat::GetItemSet+0x276
02 013ce08c 21ae2b88 swlo!SwViewOption::IsVisitedLinks+0x26c
03 013ce0d0 21b00ace swlo!SwViewOption::IsVisitedLinks+0x318
04 013ce0ec 21b00702 swlo!SwTextNode::IsSymbolAt+0x95e
05 013ce120 21b00871 swlo!SwTextNode::IsSymbolAt+0x592
06 013ce148 21b06921 swlo!SwTextNode::IsSymbolAt+0x701
07 013ce190 21b05bbb swlo!SwTextFrame::FillSelection+0x4d61
08 013ce214 21b081b5 swlo!SwTextFrame::FillSelection+0x3ffb
09 013ce2a0 21aecb1c swlo!SwTextFrame::FillSelection+0x65f5
0a 013ce2e8 21aedaba swlo!SwTextFrame::FormatLine+0x8c
0b 013ce84c 21aedfef swlo!SwTextFrame::Format_+0x78a
0c 013cee54 21aec4ea swlo!SwTextFrame::Format_+0x1cf
0d 013cf3b0 21a1b941 swlo!SwTextFrame::Format+0x57a
0e 013cf4f4 21a1dcd4 swlo!SwViewOption::IsWhitespaceHidden+0x941
0f 013cf530 21a1be88 swlo!SwFrame::PrepareMake+0x224
10 013cf670 21a1d7fb swlo!SwViewOption::IsWhitespaceHidden+0xe88
11 013cf698 21a47187 swlo!SwFrame::OptPrepareMake+0x11b
12 013cf6c4 21a46e6b swlo!SwViewShell::EnableSmooth+0x607
13 013cf6f8 21a48756 swlo!SwViewShell::EnableSmooth+0x2eb
14 013cf734 21a46302 swlo!SwViewOption::GetGapBetweenPages+0x5d6
15 013cf74c 21a45a81 swlo!SwLayoutFrame::MoveLowerFootnotes+0x45c2
16 013cf7fc 21d6498f swlo!SwLayoutFrame::MoveLowerFootnotes+0x3d41
17 013cf840 2186bd28 swlo!SwViewShell::LayoutIdle+0x8f
18 013cf870 2186c14e swlo!SwPosFlyFrame::GetFormat+0x1b68
19 013cf87c 50e531fd swlo!SwViewShell::IsViewLocked+0x1e
1a 013cf904 0f63b5ee vcllo!Timer::Invoke+0xd
1b 013cf948 0f637510 vclplug_winlo!create_SalInstance+0xb1e
1c 013cf978 50e420f6 vclplug_winlo!Point::toPair+0xaee0
1d 013cf9b0 5621ea10 vcllo!Application::Execute+0x156
1e 013cfb10 50e5166f sofficeapp+0xea10
1f 013cfb3c 56257a3e vcllo!ImplSVMain+0x6f
20 013cfbb4 00021049 sofficeapp!soffice_main+0xee
21 013cfbc0 0002123a soffice!main+0x19
22 013cfc08 756f0419 soffice!main+0x20a
23 013cfc18 7719662d KERNEL32!BaseThreadInitThunk+0x19
24 013cfc74 771965fd ntdll_77130000!__RtlUserThreadStart+0x2f
25 013cfc84 00000000 ntdll_77130000!_RtlUserThreadStart+0x1b
Comment 15 Noel Grandin 2019-06-01 08:45:23 UTC
This is embarrassing, it appears I have been optimising the time between startup and the crash. Loading this file has been broken since long before my commit, perhaps someone could bibisect this?
Noting that it needs to be bibsected with release builds, and it will take a long time, since it takes about 30m of load time before it hits the crash.
Comment 16 Xisco Faulí 2019-06-01 15:21:44 UTC
(In reply to Noel Grandin from comment #15)
> This is embarrassing, it appears I have been optimising the time between
> startup and the crash. Loading this file has been broken since long before
> my commit, perhaps someone could bibisect this?
> Noting that it needs to be bibsected with release builds, and it will take a
> long time, since it takes about 30m of load time before it hits the crash.

In that case, I would propose to create a follow-up report. This one is about the performance problem, which has already been addressed.
Closing as RESOLVED FIXED
Comment 17 Xisco Faulí 2019-06-01 15:33:06 UTC
(In reply to Xisco Faulí from comment #2)
> I kill Libreoffice after
> 
> real	35m6,329s
> user	34m42,157s
> sys	0m26,532s
> 
> Version: 6.3.0.0.alpha1+
> Build ID: 38ac0586448d4f07811b139f62f62686b029feba
> CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
> Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
> Calc: threaded

Regarding the opening time, it takes

real	0m34,859s
user	0m34,736s
sys	0m0,324s

in

Version: 6.3.0.0.beta1+
Build ID: 219e128553645911685b6061f7c5ea359a4c551c
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

so we can call this issue fixed and verified
Comment 18 Xisco Faulí 2019-06-01 15:41:24 UTC
Follow-up bug reported in bug 125624