Bug 94429 - CPU-bound hang opening spreadsheet
Summary: CPU-bound hang opening spreadsheet
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.0.0.alpha0+ Master
Hardware: Other All
: high major
Assignee: Markus Mohrhard
URL:
Whiteboard: target:5.2.0
Keywords: bibisected, perf, regression
Depends on:
Blocks:
 
Reported: 2015-09-22 01:31 UTC by Jim Avera
Modified: 2016-10-25 19:07 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Test spreadsheet which make LO "hang" when loading (269.54 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-09-22 01:31 UTC, Jim Avera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Avera 2015-09-22 01:31:13 UTC
Created attachment 118919 [details]
Test spreadsheet which make LO "hang" when loading

Using 5.1.0.0.alpha1 on 64-bit linux (Ubuntu 15.04)

Something horrible happens with the attached .ods spreadsheet which pegs the CPU and prevents LO from functioning normally.  When first opened, a blank window is displayed for maybe 30 seconds; then the spreadsheet view is painted, bit by bit, and after a couple of minutes it all seems to be showing.  However LO is unresponsive and the CPU remains pegged at 100%.

=> This spreadsheet functions perfectly using Apache Open Office 4.4.1

lo 4.4.2.2 opens the spreadsheet quickly, but if macros are enabled it crashes during certain operations.  I didn't get far enough to try the macros with 5.1 alpha1, since I can't even load the spreadsheet with macros DISABLED.

STEPS TO REPRODUCE:

1. Start lo on the attached spreadsheet
2. When prompted, DISABLE macros

EXPECTED RESULTS:

Spreadsheet displays promptly

ACTUAL RESULTS:

Spreadsheet "never" displays, and CPU stays pegged at 100%

NOTE/IDEA/CONJECTURE: This .ods file contains several dozen "sheets", each of which contains a few lines which use Conditional Formats to change the color and possibly font size of affected cells, depending on the data.  Maybe the problem has something to do with that.
Comment 1 Buovjaga 2015-09-22 14:45:14 UTC
Reproduced hang.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+ (x64)
Build ID: 9ce08dcc2e32c5554ddf71b79173f8854e0568ad
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2015-09-17_21:43:51
Locale: en-US (fi_FI)
Comment 2 Puggan SE 2015-10-19 21:01:52 UTC
bibescted with 50max, using:
git bisect run bash -c "opt/program/soffice -env:UserInstallation=file:///tmp/soffice-bisect ../../bug_94429/test.ods || exit 1"

# bad: [dda106fd616b7c0b8dc2370f6f1184501b01a49e] source-hash-0db96caf0fcce09b87621c11b584a6d81cc7df86
# good: [5b9dd620df316345477f0b6e6c9ed8ada7b6c091] source-hash-2851ce5afd0f37764cbbc2c2a9a63c7adc844311
git bisect start 'latest' 'oldest'
# skip: [0c30a2c797b249d0cd804cb71554946e2276b557] source-hash-45aaec8206182c16025cbcb20651ddbdf558b95d
git bisect skip 0c30a2c797b249d0cd804cb71554946e2276b557
# skip: [0c30a2c797b249d0cd804cb71554946e2276b557] source-hash-45aaec8206182c16025cbcb20651ddbdf558b95d
git bisect skip 0c30a2c797b249d0cd804cb71554946e2276b557
# good: [0c30a2c797b249d0cd804cb71554946e2276b557] source-hash-45aaec8206182c16025cbcb20651ddbdf558b95d
git bisect good 0c30a2c797b249d0cd804cb71554946e2276b557
# bad: [2ce02b2ce56f12b9fcb9efbd380596975a3a5686] source-hash-17d714eef491bda2512ba8012e5b3067ca19a5be
git bisect bad 2ce02b2ce56f12b9fcb9efbd380596975a3a5686
# bad: [2a6310949964d9626c516f2c649b8874f1a24a18] source-hash-871740210e5608e619b37297b47362f534f7ed8d
git bisect bad 2a6310949964d9626c516f2c649b8874f1a24a18
# bad: [391054ff3d3d5a47195e45ad70cff490d2e9dd0d] source-hash-1ddd165418d72536e494ce6d2a078ab1ef3b20c9
git bisect bad 391054ff3d3d5a47195e45ad70cff490d2e9dd0d
# bad: [534715525a93b0d7d56ba123d253c927cccf0afe] source-hash-40c9a46b78b8919aae82dd9b94774d63bb9cb4e6
git bisect bad 534715525a93b0d7d56ba123d253c927cccf0afe
# good: [c255ade961c9628f72d2fbca268fdf3a4e5f60c2] source-hash-4bdbea5447f36beb9cc33df173a89a49a9918290
git bisect good c255ade961c9628f72d2fbca268fdf3a4e5f60c2
# good: [2b4739cd51404149b1279b86643f1fee719de667] source-hash-8ee20e2691aa6f67c67d40c61a8cd1569458b5a8
git bisect good 2b4739cd51404149b1279b86643f1fee719de667
# good: [9891e7d487540e4650378e546aea5025876d02cf] source-hash-b2f76e0e8a81b456f47b677cd881cc105f781cdb
git bisect good 9891e7d487540e4650378e546aea5025876d02cf
# skip: [891b689ba95b9e53609194ee2a1a2d3b8955843c] source-hash-01f406bc28f53acc5a2734af637aa8074a5d1813
git bisect skip 891b689ba95b9e53609194ee2a1a2d3b8955843c
# good: [1e9077bc3cddafd46edbf547ba6ab12628388a9e] source-hash-fa4ce83f567cfb735bdfd2319458585ded4cd554
git bisect good 1e9077bc3cddafd46edbf547ba6ab12628388a9e
# good: [7af487a891c9a59de3b45226ebc9e7df95d6c4bb] source-hash-1ac9985ade97f91869a11ce45231ffd6a5440959
git bisect good 7af487a891c9a59de3b45226ebc9e7df95d6c4bb
# good: [aa7507ca437687a092c086522a62696d316fc469] source-hash-1028643bc7d294e4c32b4ccea288d90088abae53
git bisect good aa7507ca437687a092c086522a62696d316fc469
# good: [cfa6015c1d535c8e22bef6a6abb9363c757693d1] source-hash-9e678c14e4fc8e58b1e0530744f648fa3958d338
git bisect good cfa6015c1d535c8e22bef6a6abb9363c757693d1
# bad: [0a9eee9b8daa9c3fe698a5d31435df4af462e2a5] source-hash-3da65dc8982167517f19e80a288b049118bc3d23
git bisect bad 0a9eee9b8daa9c3fe698a5d31435df4af462e2a5
# bad: [eb937212a1dc1fca07e61451b053a092b9418ff2] source-hash-ca3700c42238e71684ec1d5f5eacaea4b1ca3b30
git bisect bad eb937212a1dc1fca07e61451b053a092b9418ff2
# bad: [18afb8632caa524fbc70ed5ce3808e23e5dad16f] source-hash-d05a64df34fd143670cb939b72abfb32d6b714c7
git bisect bad 18afb8632caa524fbc70ed5ce3808e23e5dad16f
# only skipped commits left to test
# possible first bad commit: [18afb8632caa524fbc70ed5ce3808e23e5dad16f] source-hash-d05a64df34fd143670cb939b72abfb32d6b714c7
# possible first bad commit: [891b689ba95b9e53609194ee2a1a2d3b8955843c] source-hash-01f406bc28f53acc5a2734af637aa8074a5d1813
Comment 3 Robinson Tryon (qubit) 2015-12-13 11:14:20 UTC Comment hidden (obsolete)
Comment 4 Markus Mohrhard 2016-04-10 14:13:36 UTC
Looks like another case of the STYLE function inside of conditional formatting.
Comment 5 Commit Notification 2016-04-10 14:37:06 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=28d0e255e231639c4d79f6dedbe972d6daeae7f0

tdf#94429, tdf#92198, tdf#95233: STYLE in conditional formatting

It will be available in 5.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 6 Markus Mohrhard 2016-04-10 14:41:29 UTC
I'm still going to either remove STYLE in conditional format formulas or limit it to the 1 parameter version as part of 5.3.

This is an ugly hack for 5.2.