Bug 162057 - LibreOffice hangs when opening previously fixed document (ofz#21168)
Summary: LibreOffice hangs when opening previously fixed document (ofz#21168)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: x86-64 (AMD64) All
: low critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:doc, regression
Depends on:
Blocks: DOC
  Show dependency treegraph
 
Reported: 2024-07-16 12:33 UTC by Alex Pyrgiotis
Modified: 2024-08-13 10:16 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Another document that makes LibreOffice hang (bug #78883) (18.11 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-07-24 11:57 UTC, Alex Pyrgiotis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Pyrgiotis 2024-07-16 12:33:05 UTC
Description:
When opening the document [1] in LibreOffice, it hangs.


Steps to Reproduce:
1. Open the document with LibreOffice, e.g., `libreoffice ofz21168-1.doc`

Actual Results:
LibreOffice hangs. The process remains running, but there's no response from the GUI. Note that this file was included in a change set [2] that fixed a bug in LibreOffice, so the fact that it hangs indicates that there's probably a regression.

Expected Results:
The file should open properly, since it's on the "pass/" folder of the LibreOffice tests.







Reproducible: Always


User Profile Reset: Yes

Additional Info:
Operating System: Arch Linux (tested on Alpine Linux as well)
LibreOffice Version: LibreOffice 7.6.7.2 60(Build:2)

[1]: https://github.com/LibreOffice/core/blob/master/sw/qa/core/data/ww6/pass/ofz21168-1.doc
[2]: https://gerrit.libreoffice.org/c/core/+/90384
Comment 1 Stéphane Guillou (stragu) 2024-07-16 16:15:54 UTC
- In 5.0.0.5, I directly get "Read-Error. This is not a WinWord97 file."
- From 5.1.0.3 to 5.4.0.2, it opens but not sure if it looks like it's supposed to, looks pretty mangled to me.
- Since 6.0.0.3, it hangs.

Still the case in recent trunk build:

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: bbd5079c58e352ece8f10328f8dcda9819c4cfbe
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US

Office 365 desktop "was unable to open the document". OnlyOffice shows an empty document.

Setting priority to "low" as it's a binary file that even Office 365 can't handle.

Caolán, any insight given that you fixed ofz#21168 with c4dab726caaa73be9f9c731312080143b0a0b89d?
Comment 2 Caolán McNamara 2024-07-17 09:11:57 UTC
FWIW "pass" only indicates that the import loads without crash, doesn't imply anything about how it might be laid out or rendered after that :-)
Comment 3 Alex Pyrgiotis 2024-07-24 11:52:21 UTC
Hey folks, sorry for taking a while to reply.

Thanks for taking a look at the report. My point here is that if LibreOffice cannot read this document, then it's ok to error out. If it can read it, but partially, then it's fine to render a partial document as well. It seems that this is in line with what other document readers are doing:

> Office 365 desktop "was unable to open the document". OnlyOffice shows an empty document.

The current situation, however, is that LibreOffice opens this file, and it hogs 100% of a CPU core. That's neither of the above behaviors, and it looks more like a DoS vector, especially given the fact that this used to work in previous LibreOffice versions. In my opinion, even just for the DoS vector, it's worth fixing this issue. Who knows, maybe a larger bug in the logic is there, and that's just the tip.

As for the "pass" semantics, thanks for the explanation Caolán. I thought that these documents were the "good" test set, hence why I opened this bug report.
Comment 4 Alex Pyrgiotis 2024-07-24 11:57:57 UTC
Created attachment 195469 [details]
Another document that makes LibreOffice hang (bug #78883)
Comment 5 Alex Pyrgiotis 2024-07-24 12:00:35 UTC
Oh, one more thing. I have commented on a separate bug report [1] for a document that also makes LibreOffice hang, which I've attached it here as well.

Stéphane, do you still want me to open a separate bug report, or is it better perhaps to merge these two issues here?

[1] https://bugs.documentfoundation.org/show_bug.cgi?id=78883#c30
Comment 6 Alex Pyrgiotis 2024-07-25 07:28:41 UTC
Actually, nevermind about the second file I added, for bug #78883. It seems that it *does* open with LibreOffice 24.2, but not with 7.6.
Comment 7 Buovjaga 2024-08-13 10:16:45 UTC
Bibisected hang upon opening https://github.com/LibreOffice/core/blob/master/sw/qa/core/data/ww6/pass/ofz21168-1.doc with linux-64-6.0 repo to b1ad2ee35647ccd46b0bdb96c5ded09710e307be
tdf#108991 sw: fix crash due to not formatted but "valid" SwTextFrame