Bug 124622 - opening a file causes soffice.bin to use 100% CPU (one core), doing lstat calls all over the user's home dir, if profile exists
Summary: opening a file causes soffice.bin to use 100% CPU (one core), doing lstat cal...
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.2.2.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Performance CPU-AT-100%
  Show dependency treegraph
 
Reported: 2019-04-09 11:29 UTC by Pas
Modified: 2024-04-25 06:39 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pas 2019-04-09 11:29:01 UTC
Description:
$ libreoffice --version
LibreOffice 6.2.2.2 20(Build:2)


installed via ubuntu 19.04 (disco) packages.



Actual Results:
window becomes unresponsive for a long time (haven't waited it out)

Expected Results:
document opens


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Comment 1 Xisco Faulí 2019-04-09 11:51:45 UTC
Does it work if you disable OpenGl ? -> https://wiki.documentfoundation.org/OpenGL

I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the issue is still present
Comment 2 Pas 2019-04-09 15:15:10 UTC
Hello!

Alas no change. (I let it run for about 10 minutes, but it hasn't finished whatever it was doing.)
Comment 3 Pas 2019-04-09 16:29:39 UTC
Some further info, it's stuck in a loop. :(

[pid  4583] lstat("/home/pas/.wine/dosdevices/z:", {st_mode=S_IFLNK|0777, st_size=1, ...}) = 0
[pid  4583] lstat("/sys", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0


...

[pid  4583] lstat("/home/pas/.wine/dosdevices/z:", {st_mode=S_IFLNK|0777, st_size=1, ...}) = 0
[pid  4583] lstat("/sys", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0



After GDB-ing it:

Thread 1 "soffice.bin" received signal SIGINT, Interrupt.
0x00007ffff11ab5f0 in uno_type_any_assign () from /usr/lib/libreoffice/program/libuno_cppu.so.3
(gdb) bt
#0  0x00007ffff11ab5f0 in uno_type_any_assign () at /usr/lib/libreoffice/program/libuno_cppu.so.3
#1  0x00007ffff65d7a6c in  () at /usr/lib/libreoffice/program/libmergedlo.so
#2  0x00007ffff65d85a9 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#3  0x00007ffff65c9e81 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#4  0x00007ffff5d01002 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#5  0x00007ffff5d0109d in  () at /usr/lib/libreoffice/program/libmergedlo.so
#6  0x00007ffff5d0109d in  () at /usr/lib/libreoffice/program/libmergedlo.so
#7  0x00007ffff5d0109d in  () at /usr/lib/libreoffice/program/libmergedlo.so
#8  0x00007ffff5d0109d in  () at /usr/lib/libreoffice/program/libmergedlo.so
#9  0x00007ffff5d0109d in  () at /usr/lib/libreoffice/program/libmergedlo.so
#10 0x00007ffff5d023c5 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#11 0x00007ffff5d02e0d in  () at /usr/lib/libreoffice/program/libmergedlo.so
#12 0x00007ffff59a4b70 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#13 0x00007ffff59a60db in  () at /usr/lib/libreoffice/program/libmergedlo.so
#14 0x00007ffff5992068 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#15 0x00007ffff5993390 in SfxDocumentTemplates::GetFull(rtl::OUString const&, rtl::OUString const&, rtl::OUString&) () at /usr/lib/libreoffice/program/libmergedlo.so
#16 0x00007ffff59c1da5 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#17 0x00007ffff5a1099c in SfxBaseModel::connectController(com::sun::star::uno::Reference<com::sun::star::frame::XController> const&) () at /usr/lib/libreoffice/program/libmergedlo.so
#18 0x00007ffff5a9ec38 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#19 0x00007ffff54802da in  () at /usr/lib/libreoffice/program/libmergedlo.so
#20 0x00007ffff5481be6 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#21 0x00007ffff5422a41 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#22 0x00007ffff5423658 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#23 0x00007ffff4f73866 in comphelper::SynchronousDispatch::dispatch(com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&, rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) () at /usr/lib/libreoffice/program/libmergedlo.so
#24 0x00007ffff5af1a61 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#25 0x00007ffff5af9723 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#26 0x00007ffff5adfc6f in  () at /usr/lib/libreoffice/program/libmergedlo.so
#27 0x00007ffff5ae137a in  () at /usr/lib/libreoffice/program/libmergedlo.so
#28 0x00007ffff67c81b0 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#29 0x00007ffff6a035d7 in SalUserEventList::DispatchUserEvents(bool) () at /usr/lib/libreoffice/program/libmergedlo.so
#30 0x00007fffebc97899 in  () at /usr/lib/libreoffice/program/libvclplug_gtk3lo.so
#31 0x00007ffff2f82958 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007ffff2f82d48 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007ffff2f82ddc in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007fffebc98b43 in  () at /usr/lib/libreoffice/program/libvclplug_gtk3lo.so
#35 0x00007ffff6a290f2 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#36 0x00007ffff6a2ae75 in Application::Execute() () at /usr/lib/libreoffice/program/libmergedlo.so
#37 0x00007ffff5ae28a3 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#38 0x00007ffff6a31602 in ImplSVMain() () at /usr/lib/libreoffice/program/libmergedlo.so
#39 0x00007ffff5b00981 in soffice_main () at /usr/lib/libreoffice/program/libmergedlo.so
#40 0x000055555555507b in  ()
#41 0x00007ffff3a0cb6b in __libc_start_main () at /lib/x86_64-linux-gnu/libc.so.6
#42 0x00005555555550ba in  ()



Which corresponds to what strace shows. (The dirwalk loops starts after loading libuno_cppu.so.3.)

[pid  4933] lstat("/usr/lib/libreoffice/program/libuno_cppu.so.3", {st_mode=S_IFREG|0644, st_size=228360, ...}) = 0
[pid  4933] lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid  4933] lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid  4933] lstat("/home/pas", {st_mode=S_IFDIR|0755, st_size=16384, ...}) = 0
[pid  4933] access("/home/pas", F_OK)   = 0
[pid  4933] openat(AT_FDCWD, "/home/pas", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 17
[pid  4933] fstat(17, {st_mode=S_IFDIR|0755, st_size=16384, ...}) = 0
[pid  4933] getdents64(17, /* 217 entries */, 32768) = 7200
[pid  4933] lstat("/home/pas/.IdeaIC2019.1", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
[pid  4933] openat(AT_FDCWD, "/home/pas/.IdeaIC2019.1", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 18
...
... endless loop.
Comment 4 Roman Kuznetsov 2019-04-09 20:53:04 UTC
Pas, can you install LibreOffice from TDF site and try repeat your problem?
Comment 5 till busch 2019-05-09 08:01:14 UTC
I'm seeing the same problem when I try to create a new document from a template or when I open an existing document as a template (with command line -n switch):

arch linux, LibreOffice 6.2.3.2 20(Build:2)

Reproducible: Always

I also tested with different java versions and with java disabled.

strace (strace -ff lowriter -n test1.odt) gives the most useful hints:

it starts off fine by entering .config/libreoffice and scanning for templates:
...
[pid 13297] lstat("/home", {st_mode=S_IFDIR|0755, st_size=130, ...}) = 0
[pid 13297] lstat("/home/till", {st_mode=S_IFDIR|0700, st_size=9428, ...}) = 0
[pid 13297] lstat("/home", {st_mode=S_IFDIR|0755, st_size=130, ...}) = 0
[pid 13297] lstat("/home/till", {st_mode=S_IFDIR|0700, st_size=9428, ...}) = 0
[pid 13297] lstat("/home/till/.config", {st_mode=S_IFDIR|0755, st_size=6374, ...}) = 0
[pid 13297] lstat("/home", {st_mode=S_IFDIR|0755, st_size=130, ...}) = 0
[pid 13297] lstat("/home/till", {st_mode=S_IFDIR|0700, st_size=9428, ...}) = 0
[pid 13297] lstat("/home/till/.config", {st_mode=S_IFDIR|0755, st_size=6374, ...}) = 0
[pid 13297] lstat("/home/till/.config/libreoffice", {st_mode=S_IFDIR|0775, st_size=2, ...}) = 0
[pid 13297] lstat("/home", {st_mode=S_IFDIR|0755, st_size=130, ...}) = 0
[pid 13297] lstat("/home/till", {st_mode=S_IFDIR|0700, st_size=9428, ...}) = 0
[pid 13297] lstat("/home/till/.config", {st_mode=S_IFDIR|0755, st_size=6374, ...}) = 0
[pid 13297] lstat("/home/till/.config/libreoffice", {st_mode=S_IFDIR|0775, st_size=2, ...}) = 0
[pid 13297] lstat("/home/till/.config/libreoffice/4", {st_mode=S_IFDIR|0700, st_size=28, ...}) = 0
[pid 13297] lstat("/home", {st_mode=S_IFDIR|0755, st_size=130, ...}) = 0
[pid 13297] lstat("/home/till", {st_mode=S_IFDIR|0700, st_size=9428, ...}) = 0
[pid 13297] lstat("/home/till/.config", {st_mode=S_IFDIR|0755, st_size=6374, ...}) = 0
[pid 13297] lstat("/home/till/.config/libreoffice", {st_mode=S_IFDIR|0775, st_size=2, ...}) = 0
[pid 13297] lstat("/home/till/.config/libreoffice/4", {st_mode=S_IFDIR|0700, st_size=28, ...}) = 0
[pid 13297] lstat("/home/till/.config/libreoffice/4/user", {st_mode=S_IFDIR|0755, st_size=290, ...}) = 0
[pid 13297] lstat("/home", {st_mode=S_IFDIR|0755, st_size=130, ...}) = 0
[pid 13297] lstat("/home/till", {st_mode=S_IFDIR|0700, st_size=9428, ...}) = 0
[pid 13297] lstat("/home/till/.config", {st_mode=S_IFDIR|0755, st_size=6374, ...}) = 0
[pid 13297] lstat("/home/till/.config/libreoffice", {st_mode=S_IFDIR|0775, st_size=2, ...}) = 0
[pid 13297] lstat("/home/till/.config/libreoffice/4", {st_mode=S_IFDIR|0700, st_size=28, ...}) = 0
[pid 13297] lstat("/home/till/.config/libreoffice/4/user", {st_mode=S_IFDIR|0755, st_size=290, ...}) = 0
[pid 13297] lstat("/home/till/.config/libreoffice/4/user/template", {st_mode=S_IFDIR|0755, st_size=400, ...}) = 0
[pid 13297] access("/home/till/.config/libreoffice/4/user/template", F_OK) = 0
[pid 13297] openat(AT_FDCWD, "/home/till/.config/libreoffice/4/user/template", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
[pid 13297] fstat(3, {st_mode=S_IFDIR|0755, st_size=400, ...}) = 0
[pid 13297] getdents64(3, /* 12 entries */, 32768) = 472
[pid 13297] lstat("/home/till/.config/libreoffice/4/user/template/Presentation Backgrounds", {st_mode=S_IFDIR|0755, st_size=18, ...}) = 0
[pid 13297] openat(AT_FDCWD, "/home/till/.config/libreoffice/4/user/template/Presentation Backgrounds", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 22
[pid 13297] fstat(22, {st_mode=S_IFDIR|0755, st_size=18, ...}) = 0
[pid 13297] getdents64(22, /* 3 entries */, 32768) = 80
[pid 13297] lstat("/home/till/.config/libreoffice/4/user/template/Presentation Backgrounds/white.otp", {st_mode=S_IFREG|0644, st_size=9024, ...}) = 0
[pid 13297] getdents64(22, /* 0 entries */, 32768) = 0
[pid 13297] close(22)                   = 0
[pid 13297] lstat("/home/till/.config/libreoffice/4/user/template/groupuinames.xml", {st_mode=S_IFREG|0600, st_size=288, ...}) = 0
...
[pid 13297] getdents64(3, /* 0 entries */, 32768) = 0
[pid 13297] close(3)                    = 0
...

here comes trouble -- why does it enter other .config directories at all? it does getdents64() on every directory and proceeds recursively:

[pid 13297] lstat("/home", {st_mode=S_IFDIR|0755, st_size=130, ...}) = 0
[pid 13297] lstat("/home", {st_mode=S_IFDIR|0755, st_size=130, ...}) = 0
[pid 13297] lstat("/home/till", {st_mode=S_IFDIR|0700, st_size=9428, ...}) = 0
[pid 13297] access("/home/till", F_OK)  = 0
[pid 13297] openat(AT_FDCWD, "/home/till", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
[pid 13297] fstat(3, {st_mode=S_IFDIR|0700, st_size=9428, ...}) = 0
[pid 13297] getdents64(3, /* 437 entries */, 32768) = 15120
[pid 13297] lstat("/home/till/.config", {st_mode=S_IFDIR|0755, st_size=6374, ...}) = 0
[pid 13297] openat(AT_FDCWD, "/home/till/.config", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 22
[pid 13297] fstat(22, {st_mode=S_IFDIR|0755, st_size=6374, ...}) = 0
[pid 13297] getdents64(22, /* 273 entries */, 32768) = 9640
[pid 13297] lstat("/home/till/.config/akonadi", {st_mode=S_IFDIR|0775, st_size=2770, ...}) = 0
[pid 13297] openat(AT_FDCWD, "/home/till/.config/akonadi", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 23
[pid 13297] fstat(23, {st_mode=S_IFDIR|0775, st_size=2770, ...}) = 0
[pid 13297] getdents64(23, /* 34 entries */, 32768) = 2176


which leads to even more trouble -- libreoffice seems to get stuck in a loop of cyclic symbolic links here ...

[pid 13297] lstat("/home/till/.local/share/wineprefixes/vc2008express/dosdevices/c:/users/till/Meine Dokumente/.local/share/wineprefixes/vc2008express/dosdevices/c:/users/till/Meine Dokumente/.local/share/wineprefixes/vc2008express/dosdevices/c:/users/till/Meine Dokumente/.local/share/wineprefixes/vc2008express/dosdevices/c:/users/till/Meine Dokumente/.local/share/wineprefixes/vc2008express/dosdevices/c:/users/till/Meine Dokumente/.local/share/wineprefixes/vc2008express/dosdevices/c:/users/till/Meine Dokumente/.local/share/wineprefixes/vc2008express/dosdevices/c:/users/till/Meine Dokumente/.local/share/wineprefixes/vc2008express/dosdevices/c:/users/till/Meine Dokumente/.local/share/wineprefixes/vc2008express/dosdevices/c:/users/till/Meine Dokumente/.local/share/wineprefixes/vc2008express/dosdevices/c:/users/till/Meine Dokumente/.local/share/wineprefixes/vc2008express/dosdevices/c:/users/till/Meine Dokumente/.local/share/wineprefixes/vc2008express/dosdevices/c:/users/till/Meine Dokumente/.local/share/wineprefixes/vc2008express/dosdevices/c:/users/till/Meine Dokumente/.local/share/wineprefixes/vc2008express/dosdevices/c:/users/till/Meine Dokumente/.local/share/wineprefixes/vc2008express/dosdevices/c:/users/till/Meine Dokumente/.local/share/wineprefixes/vc2008express/dosdevices/c:/users/till/Meine Dokumente/.local/share/wineprefixes/vc2008express/dosdevices/c:/users/till/Meine Dokumente/.local/share/wineprefixes/vc2008express/dosdevices/c:/users/till/Meine Dokumente/.local/share/wineprefixes/vc2008express/dosdevices/c:/users/till/Meine Dokumente/.local/share/wineprefixes/vc2008express/dosdevices/z:/home/till/.local/share/wineprefixes/vc2008express/dosdevices/z:/home/dev/OpenWrt-SDK-ar71xx-for-Linux-i686-gcc-4.3.3+cs_uClibc-0.9.30.1/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/share/ri/1.9/system/XMLEncoding_ja/cdesc-XMLEncoding_ja.ri", 0x7fffa62b6f80) = -1 ENOSYS (Function not implemented)
Comment 6 QA Administrators 2019-11-06 03:32:19 UTC Comment hidden (obsolete)
Comment 7 QA Administrators 2019-12-07 03:44:23 UTC
Dear Pas,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp