[Libreoffice-bugs] [Bug 126728] New: LibreOffice slow start due to FTP access failure

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Aug 6 11:04:00 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=126728

            Bug ID: 126728
           Summary: LibreOffice slow start due to FTP access failure
           Product: LibreOffice
           Version: 6.2.5.2 release
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Base
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: luiz.linux at gmail.com

Description:
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, by further researching, I
found out that the URL ftp.libreoffice.org is not resolvable anywhere.

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 Opensuse Tumbleweed.
I also tried poking around in LibreOffice's advanced settings looking for any
entries for 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.

I believe this is a bug and that, since the URL ftp.libreoffice.org is not
resolving world-wide, this issue is affecting a lot of people.

Steps to Reproduce:
1. Open LibreOffice, base or any component, and strace it.
2. Watch on strace as there are six times while its loading that the output
freezes for about a second due to name resolution failures for
ftp://ftp.libreoffice.org
3. Do a nslookup and check that ftp.libreoffice.org is not resolvable through
any DNS servers.
3. Add ftp.libreoffice.org as an alias for 127.0.0.1 on /etc/hosts and see the
issue disappear [workaround, obviously].

Actual Results:
LibreOffice takes about 16 seconds to fully load.

Expected Results:
With the aforementioned workaround, LibreOffice takes about 5 seconds to fully
load.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
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:~ #

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190806/c543dea8/attachment.html>


More information about the Libreoffice-bugs mailing list