Bug 90700 - FILEOPEN: Hang/freeze opening specific .doc with external links
Summary: FILEOPEN: Hang/freeze opening specific .doc with external links
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.2.0 target:5.1.0.2 target:5...
Keywords: filter:doc
Depends on:
Blocks:
 
Reported: 2015-04-18 20:45 UTC by Pacho Ramos
Modified: 2021-11-01 17:30 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
1.doc (81.00 KB, application/msword)
2015-04-18 20:45 UTC, Pacho Ramos
Details
Test document with only two failing links. (78.50 KB, application/msword)
2015-11-30 16:21 UTC, Giuseppe Castagno (aka beppec56)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos 2015-04-18 20:45:12 UTC
Created attachment 114897 [details]
1.doc

I see no error in the terminal at all... it simply hangs until I kill it. On the other hand abiword is able to open the file perfectly

Also reported to downstream:
https://bugs.gentoo.org/show_bug.cgi?id=546732

Thanks
Comment 1 Aaron Honeycutt 2015-04-19 04:05:39 UTC
I'm also unable to open the documents with LibreOffice 4.4.2.2 on Kubuntu 15.04 Beta 2.
Comment 2 Matthew Francis 2015-04-22 02:52:48 UTC
This occurs all the way back to OOo 3.3.0

-> Version: Inherited from OOo
Comment 3 Aron Budea 2015-04-24 05:11:28 UTC
It opens for me (LO 4.4.1.2 and master on Windows 7), but after several minutes. The doc contains many references to an image at https://www.lablife.org/images/magnifier.png , which is inaccessible.
Could this be related to bug 42742?
Comment 4 Matthew Francis 2015-04-24 05:20:41 UTC
Good catch, I think you're right about that - let's call this one a duplicate

*** This bug has been marked as a duplicate of bug 42742 ***
Comment 5 Giuseppe Castagno (aka beppec56) 2015-11-23 09:02:34 UTC
Hi all,

I had a look to bug 42642, triage-debugging it, so I checked this as well.

Though the effect from the user point of view appears similar, the root cause is not.
This one depends on the timeout of the TCP socket connection.

This timeout is system dependent. In my Linux PC Ubuntu 14.04 this timeout is about 3 minutes.

Whereas in another PC with Windows 7 32bit is around 20 seconds.

So:

- marking this as NEW again
- assign it to myself
Comment 6 Giuseppe Castagno (aka beppec56) 2015-11-23 09:05:41 UTC
I pointed out the wrong bug in comment #5, was bug 42742 instead. Sorry.
Comment 7 Giuseppe Castagno (aka beppec56) 2015-11-30 16:21:52 UTC
Created attachment 120899 [details]
Test document with only two failing links.

The attached document contains two failing links, for testing purposes.

They point to the absolute IP address 192.0.2.100 that is part of the IPv4 address block 192.0.2.0/24 (TEST-NET-1) reserved for documentation purposes.

See:
<http://tools.ietf.org/html/rfc5737>
for details about this IPv4 address block use.

The links are https://192.0.2.100/images/magnifier1.png and https://192.0.2.100/images/magnifier2.png.

Using this document and LO 5.0.3.2, in Ubuntu 14.04 32bit loading time is around twelve minutes, same LO version in Windows 7 32bit loading time is around two minutes.

Note:
the attached document will work to its purpose only if the IP address used is not actively filtered locally at the PC used to test, as the recalled RFC allows.
Comment 8 Robinson Tryon (qubit) 2015-12-09 18:43:14 UTC Comment hidden (obsolete)
Comment 9 Commit Notification 2015-12-14 12:07:27 UTC
Giuseppe Castagno committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=95958755cbbf8c6026b878703400d5d9ec1e6c98

Fix tdf#90700 Notify connect timeout early.

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 10 Commit Notification 2015-12-16 14:37:07 UTC
Giuseppe Castagno committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=14220052ef2b8675ee12aad63b0402f023d9760a

Related tdf#90700 Add configuration for web connection timeout.

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 11 Commit Notification 2015-12-16 17:01:48 UTC
Giuseppe Castagno committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5616d22b57a9a5e57d545e912e029162a230829b&h=libreoffice-5-1

Fix tdf#90700 Notify connect timeout early.

It will be available in 5.1.0.2.

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 12 Commit Notification 2015-12-21 14:13:47 UTC
Giuseppe Castagno committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e1693595443f0a7b6974c065219b7b474dea2bee&h=libreoffice-5-1

Related tdf#90700 Add configuration for web connection timeout.

It will be available in 5.1.0.2.

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 13 Giuseppe Castagno (aka beppec56) 2015-12-21 15:37:44 UTC
This is an excerpt from "Related tdf#90700..." commit.

"The timeouts to use can be changed in LO configuration:
'Tools > Options > Advanced > Expert Configuration'.
Propriety names are ConnectTimeout and ReadTimeout.
ConnectTimeout contains the timeout (in seconds) used when making a connection (max 180 s, min 2 s, default 20 s).
ReadTimeout contains the timeout (in seconds) used when reading from a socket (max 180 s, min 20 s, default 60 s)."

These two timeout preset can be used to adapt the response time of LO to events on http(s) connections.
Regarding this bug, ConnectTimeout it's the one that really matters.
Comment 14 Cor Nouws 2016-09-06 09:28:21 UTC
Hi Guiseppe,

I tested this in 5.1.5.2 - opens fine with (some delay) - which is great!
But alas daily20160902 freezes.. So maybe you can have a look?
Thanks!
Cor
Comment 15 Giuseppe Castagno (aka beppec56) 2016-09-12 17:51:11 UTC
Using a master debug build I got the error: '522 Origin Connection Time-out'.

Http error 522 is an unofficial code, in this case opening the problematic address (<https://www.lablife.org/images/magnifier.png>) of the bug in a browser shows you the error implementer, a reverse proxy server that now sits in the middle of the communication link.

The error is explained here: <https://support.cloudflare.com/hc/en-us/articles/200171906-Error-522>.

Wikipedia has a description of some of the known unofficial http error codes: <https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#5xx_Server_Error>.

@Cor:
can you open in a browser: <https://www.lablife.org/images/magnifier.png> if you get the same error?
To be sure the 522 error is not something country related.
In any case LO should deal with it.
Comment 16 Buovjaga 2016-09-27 07:58:31 UTC
(In reply to Giuseppe Castagno (aka beppec56) from comment #15)
> @Cor:
> can you open in a browser: <https://www.lablife.org/images/magnifier.png> if
> you get the same error?
> To be sure the 522 error is not something country related.
> In any case LO should deal with it.

I get 522. Country = Finland.
Comment 17 Cor Nouws 2016-09-27 08:45:49 UTC
(In reply to Giuseppe Castagno (aka beppec56) from comment #15)
> 
> @Cor:
> can you open in a browser: <https://www.lablife.org/images/magnifier.png> if
> you get the same error?
> To be sure the 522 error is not something country related.
> In any case LO should deal with it.

I get 
Error 522 Ray ID: 2e8dad4b3b09073d • 2016-09-27 08:45:15 UTC
Connection timed out
Comment 18 Giuseppe Castagno (aka beppec56) 2016-09-30 13:04:53 UTC
@Buovjaga, @Cor Nouws

Thank you both for testing.

It seems that it's not country related, though this is not the same root cause of the original bug report, the error causing it is now entirely different.

I preferred opening bug 102499 as anchor point for the commits needed to support the unofficial HTTP response status codes.

Some of the changes needed for the near full implementation of bug 102499 will solve this bug too.
Comment 19 Commit Notification 2016-10-13 15:06:35 UTC
Giuseppe Castagno committed a patch related to this issue.
It has been pushed to "master":

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

Related: tdf#90700, fix the link validity check in ww8 sw filter

It will be available in 5.3.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 20 Giuseppe Castagno (aka beppec56) 2016-10-14 06:41:53 UTC
Yesterday night daily:

Version: 5.3.0.0.alpha0+
Build ID: 45a7137c6796f33fbf5b8f7cb64e293260d991cb
CPU Threads: 8; OS Version: Linux 3.13; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-10-13_23:38:06
Locale: en-US (en_US.UTF-8); Calc: group

seems fixed, by bug 102499 and comment 19 commits.

Confirmation welcome.
Comment 21 Giuseppe Castagno (aka beppec56) 2016-10-14 08:04:11 UTC
Tested in Windows:
Version: 5.3.0.0.alpha0+
Build ID: 45a7137c6796f33fbf5b8f7cb64e293260d991cb
CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-10-13_23:40:37
Locale: it-IT (it_IT); Calc: CL

Works as well.

Please allow some time to load. Now it depends from the external reverse proxy time-out.
Comment 22 Buovjaga 2016-11-02 08:18:49 UTC
attachment 114897 [details] opens for me in about 10 seconds.

Win 7 Pro 64-bit Version: 5.3.0.0.alpha1+
Build ID: 4b4abb73fcd7f2802e73102b3e7c30face8d309c
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; Layout Engine: old; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-10-31_02:54:50
Locale: fi-FI (fi_FI); Calc: group
Comment 23 Commit Notification 2021-11-01 17:28:38 UTC
Giuseppe Castagno committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/96b1a6878cbcb05f962abe5c9bb073f4dff6f4dc

ucb: webdav-curl: Fix tdf#90700 Notify connect timeout early.

It will be available in 7.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 24 Commit Notification 2021-11-01 17:30:04 UTC
Giuseppe Castagno committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6c0c0ce22e8b9085ed0993a2445560206b05724e

ucb: webdav-curl: Related tdf#90700 Add configuration for web connection timeout.

It will be available in 7.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.