Bug 1144361 - LibreOffice slow start due to FTP access failure
LibreOffice slow start due to FTP access failure
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: LibreOffice
Current
x86-64 All
: P5 - None : Normal (vote)
: ---
Assigned To: Markéta Machová
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-08-05 17:11 UTC by Luiz Fernando Silva
Modified: 2021-07-09 11:03 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luiz Fernando Silva 2019-08-05 17:11:46 UTC
I have noticed that LibreOffice takes a long time to start on my machine and decided to strace it to see what was causing the slowness. It turns out that LibreOffice is making six attempts at resolving the address ftp://ftp.libreoffice.org prior to actually starting up.

I actually confirmed this by tcpdumping at port 53.

Because I was unable to resolve ftp.libreoffice.org into an IP address all six attempts timed-out, leading to a slowdown of about 16s to fully start.

After I added ftp.libreoffice.org as an alias to 127.0.0.1 to /etc/hosts, the startup time dropped to about 5s.

At first I thought it was a problem with my DNS, but further searching I found out that the URL ftp.libreoffice.org is not valid.

I tried finding where in LibreOffice configurations this was sat, to no avail.
I believe this is a bug and since the URL ftp.libreoffice.org is not resolving world-wide I think this issue is affecting a lot of people.

Additional informations:
========================

T430:~ # cat /etc/*ease
LSB_VERSION="core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64"
NAME="openSUSE Tumbleweed"
# VERSION="20190730"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20190730"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20190730"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
LOGO="distributor-logo"
T430:~ #

T430:~ # rpm -qa | grep libreoffice
libreoffice-mailmerge-6.2.5.2-1.1.x86_64
libreoffice-base-6.2.5.2-1.1.x86_64
libreoffice-l10n-en-6.2.5.2-1.1.noarch
libreoffice-pyuno-6.2.5.2-1.1.x86_64
libreoffice-gnome-6.2.5.2-1.1.x86_64
libreoffice-l10n-pt_BR-6.2.5.2-1.1.noarch
libreoffice-base-drivers-firebird-6.2.5.2-1.1.x86_64
libreoffice-draw-6.2.5.2-1.1.x86_64
libreoffice-filters-optional-6.2.5.2-1.1.x86_64
libreoffice-icon-themes-6.2.5.2-1.1.noarch
libreoffice-writer-6.2.5.2-1.1.x86_64
libreoffice-branding-upstream-6.2.5.2-1.1.noarch
libreoffice-math-6.2.5.2-1.1.x86_64
libreoffice-share-linker-1-5.1.noarch
libreoffice-qt5-6.2.5.2-1.1.x86_64
libreoffice-impress-6.2.5.2-1.1.x86_64
libreoffice-calc-6.2.5.2-1.1.x86_64
libreoffice-gtk3-6.2.5.2-1.1.x86_64
libreoffice-6.2.5.2-1.1.x86_64
T430:~ #

T430:~ # time strace -f /usr/lib64/libreoffice/program/soffice.bin --calc 2>&1 | grep ftp
[pid  1803] sendmsg(13, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\1\0\1\36\0\0\0\16\0\0\0w\0\0\0\1\1o\0\23\0\0\0/modules"..., iov_len=136}, {iov_base="\31\0\0\0ftp://ftp.libreoffice.org\0", iov_len=30}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 166
[pid  1803] sendmsg(13, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\1\0\1\36\0\0\0\23\0\0\0w\0\0\0\1\1o\0\23\0\0\0/modules"..., iov_len=136}, {iov_base="\31\0\0\0ftp://ftp.libreoffice.org\0", iov_len=30}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL <unfinished ...>
[pid  1803] sendmsg(13, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\1\0\1\36\0\0\0\27\0\0\0w\0\0\0\1\1o\0\23\0\0\0/modules"..., iov_len=136}, {iov_base="\31\0\0\0ftp://ftp.libreoffice.org\0", iov_len=30}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 166
[pid  1803] sendmsg(13, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\1\0\1\36\0\0\0\33\0\0\0w\0\0\0\1\1o\0\23\0\0\0/modules"..., iov_len=136}, {iov_base="\31\0\0\0ftp://ftp.libreoffice.org\0", iov_len=30}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL <unfinished ...>
[pid  1803] sendmsg(13, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\1\0\1\36\0\0\0\37\0\0\0w\0\0\0\1\1o\0\23\0\0\0/modules"..., iov_len=136}, {iov_base="\31\0\0\0ftp://ftp.libreoffice.org\0", iov_len=30}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 166
[pid  1803] sendmsg(13, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\1\0\1\36\0\0\0#\0\0\0w\0\0\0\1\1o\0\23\0\0\0/modules"..., iov_len=136}, {iov_base="\31\0\0\0ftp://ftp.libreoffice.org\0", iov_len=30}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL <unfinished ...>
^C

real    0m16,752s
user    0m0,883s
sys     0m1,136s
T430:~ #

T430:~ # grep libre /etc/hosts
127.0.0.1       localhost ftp.libreoffice.org
T430:~ #

T430:~ # time strace -f /usr/lib64/libreoffice/program/soffice.bin --calc 2>&1 | grep ftp
[pid  3538] sendmsg(13, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\1\0\1\36\0\0\0\16\0\0\0w\0\0\0\1\1o\0\23\0\0\0/modules"..., iov_len=136}, {iov_base="\31\0\0\0ftp://ftp.libreoffice.org\0", iov_len=30}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 166
[pid  3538] sendmsg(13, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\1\0\1\36\0\0\0\23\0\0\0w\0\0\0\1\1o\0\23\0\0\0/modules"..., iov_len=136}, {iov_base="\31\0\0\0ftp://ftp.libreoffice.org\0", iov_len=30}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 166
[pid  3538] sendmsg(13, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\1\0\1\36\0\0\0\27\0\0\0w\0\0\0\1\1o\0\23\0\0\0/modules"..., iov_len=136}, {iov_base="\31\0\0\0ftp://ftp.libreoffice.org\0", iov_len=30}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL <unfinished ...>
[pid  3538] sendmsg(13, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\1\0\1\36\0\0\0\33\0\0\0w\0\0\0\1\1o\0\23\0\0\0/modules"..., iov_len=136}, {iov_base="\31\0\0\0ftp://ftp.libreoffice.org\0", iov_len=30}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL <unfinished ...>
[pid  3538] sendmsg(13, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\1\0\1\36\0\0\0\37\0\0\0w\0\0\0\1\1o\0\23\0\0\0/modules"..., iov_len=136}, {iov_base="\31\0\0\0ftp://ftp.libreoffice.org\0", iov_len=30}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 166
[pid  3538] sendmsg(13, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\1\0\1\36\0\0\0#\0\0\0w\0\0\0\1\1o\0\23\0\0\0/modules"..., iov_len=136}, {iov_base="\31\0\0\0ftp://ftp.libreoffice.org\0", iov_len=30}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL <unfinished ...>
^C

real    0m5,290s
user    0m0,830s
sys     0m1,194s
T430:~ #

T430:~ # nslookup
> server 8.8.8.8
Default server: 8.8.8.8
Address: 8.8.8.8#53
> ftp.libreoffice.org
;; connection timed out; no servers could be reached
> exit

T430:~ #
Comment 1 Luiz Fernando Silva 2019-08-05 17:23:42 UTC
My first guess is that this behavior is part of some "check for updates at start" type of setting, but to my surprise I could not find anything in LibreOffice's settings to disable this.
There used to be a setting for this in LibreOffice 5 [Tools - Options - LibreOffice - Online Update], but not anymore on 6, at least not in the version available in Tumbleweed.

I also tried poking around in LibreOffice's advanced settings looking for any entries for ftp://ftp.libreoffice.org, but couldn't find anything.

If this is not a "check for updates at start" setting, I wonder why is LibreOffice trying to resolve the above URL.

I started a FTP server on my machine, which due to the alias I added to /etc/hosts, would receive the connection attempts done by LibreOffice. No traffic was observed, all that LibreOffice is doing during startup is name resolution, no actual FTP connection is made whatsoever.
Comment 2 Luiz Fernando Silva 2019-08-06 11:05:51 UTC
Submitted upstream bug report:
https://bugs.documentfoundation.org/show_bug.cgi?id=126728
Comment 3 Luiz Fernando Silva 2019-08-06 14:56:40 UTC
Upstream replied to my bug report, seems like a bug in /core/shell/source/backends/kf5be/kf5access.cxx 

Apparently on that section of code, they query for the URL ftp://ftp.libreoffice.org in order to determine if a FTP proxy is set.

My proxy settings in LibreOffice are set to "None". However I do have a proxy set on KDE through automatic configuration URL.
Comment 4 Tomáš Chvátal 2019-08-12 10:37:33 UTC
Lets see first if upstream provides something workable as it is not something we introduced in our pacakge.
Comment 5 Luiz Fernando Silva 2019-08-14 16:10:40 UTC
(In reply to Tomáš Chvátal from comment #4)
> Lets see first if upstream provides something workable as it is not
> something we introduced in our pacakge.

Upstream had me build LibreOffice from git clone and the problem did not manifest. At least, it seams that it'll be ok on future LibreOffice 6.4.0.

However, if we look at kf5access.cxx from git it still refers to the missing URL (ftp.libreoffice.org) so if this is still "wrong" in the git repo and the bug doesn't manifest it self, could we investigate if this bug is not related to openSuse's build?
Comment 6 Luiz Fernando Silva 2019-08-14 17:19:00 UTC
The newly released package LibreOffice 6.3.0.4 performs 2 lookups of the missing URL, which is a performance improvement, but not a definite fix. See strace bellow:

T430# strace -t -f /usr/bin/soffice 2>&1 | grep ftp
[pid 14269] 14:13:44 sendmsg(16, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\1\0\1\36\0\0\0\5\0\0\0w\0\0\0\1\1o\0\23\0\0\0/modules"..., iov_len=136}, {iov_base="\31\0\0\0ftp://ftp.libreoffice.org\0", iov_len=30}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 166
[pid 14269] 14:13:50 sendmsg(16, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\1\0\1\36\0\0\0\n\0\0\0w\0\0\0\1\1o\0\23\0\0\0/modules"..., iov_len=136}, {iov_base="\31\0\0\0ftp://ftp.libreoffice.org\0", iov_len=30}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 166
T430#

The same package from LibreOffice performs exactly the same, so it seems openSuse's packages are inline with upstream...
Comment 8 Markéta Machová 2021-03-12 09:27:14 UTC
(In reply to Luiz Fernando Silva from comment #5)
> (In reply to Tomáš Chvátal from comment #4)
> > Lets see first if upstream provides something workable as it is not
> > something we introduced in our pacakge.
> 
> Upstream had me build LibreOffice from git clone and the problem did not
> manifest. At least, it seams that it'll be ok on future LibreOffice 6.4.0.

Is it indeed fixed in 6.4.0 (or newer)? Could you please try?
Comment 9 Markéta Machová 2021-07-09 11:03:51 UTC
let us suppose it was fixed