Bug 120180 - File->Open causes crash by unbounded memory growth
Summary: File->Open causes crash by unbounded memory growth
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.6.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Memory
  Show dependency treegraph
 
Reported: 2018-09-28 10:04 UTC by Mark Jeronimus
Modified: 2019-01-11 15:08 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
strace (crash starts at 45s).log (579.58 KB, application/x-7z-compressed)
2018-11-28 10:20 UTC, Mark Jeronimus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Jeronimus 2018-09-28 10:04:20 UTC
Description:
This started after the last time I updated (via apt). It seems to happen with any spreadsheet file (ods/xlsx) I tried. It doesn't seem to happen with Writer (I haven't tried other LO editors)

Video: https://youtu.be/2t92nccITRU
Don't mind the list you see at the beginning of the video, most of it was before the last update. At the end you see the mouse cursor is starting to skip. This is not a recording artifact. If I waited any longer with killing the process then the system will become exponentially less responsive to the point I can only hit the reset button.

Steps to Reproduce:
When it does happen:
 - Open Calc,
 - File -> open, select any spreadsheet file (double-click or press OK)

When it does *not* happen:
 - Open Calc or Writer,
 - File -> open, select any document file

When it does happen:
 - Open Nautilus,
 - Double-click any spreadsheet file

When it does *not* happen:
 - Open Calc,
 - Make an edit,
 - File -> open, select any spreadsheet file

When it does *not* happen:
 - Open Calc,
 - File -> recent, select same spreadsheet file


Actual Results:
Calc fills up memory until PC halts to a grind, unless the process is killed in time. The time between the program hangs and the user starts feeling something's wrong is about 40 seconds. The time between when the user starts feeling something's wrong and when it's too far gone to do anything about it about 20 seconds.

Expected Results:
Document opens normally.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Extra details:

mark@mark:~$ apt show libreoffice
Package: libreoffice
Version: 1:6.0.6-0ubuntu0.18.04.1
Priority: optional
Section: universe/editors
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian LibreOffice Maintainers <debian-openoffice@lists.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 104 kB
Depends: libreoffice-base, libreoffice-calc, libreoffice-core (= 1:6.0.6-0ubuntu0.18.04.1), libreoffice-draw, libreoffice-impress, libreoffice-math, libreoffice-report-builder-bin, libreoffice-writer, libreoffice-avmedia-backend-gstreamer, python3-uno (>= 4.4.0~beta2)
Recommends: fonts-crosextra-caladea, fonts-crosextra-carlito, fonts-dejavu, fonts-liberation, fonts-liberation2, fonts-linuxlibertine, fonts-sil-gentium-basic, libreoffice-gnome | libreoffice-kde4, libreoffice-librelogo, libreoffice-nlpsolver, libreoffice-ogltrans, libreoffice-report-builder, libreoffice-script-provider-bsh, libreoffice-script-provider-js, libreoffice-script-provider-python, libreoffice-sdbc-postgresql, libreoffice-wiki-publisher, libreoffice-java-common (>= 1:6.0.6~)
Suggests: cups-bsd, firefox-esr | thunderbird | firefox, fonts-noto-hinted, fonts-noto-mono, ghostscript, gnupg, gpa, hunspell-dictionary, hyphen-hyphenation-patterns, imagemagick | graphicsmagick-imagemagick-compat, libgl1, libreoffice-grammarcheck, libreoffice-help (= 6.0), libreoffice-l10n (= 6.0), libxrender1, myspell-dictionary, mythes-thesaurus, openclipart2-libreoffice | openclipart-libreoffice, pstoedit, unixodbc, gstreamer1.0-plugins-base, gstreamer1.0-plugins-good, gstreamer1.0-plugins-ugly, gstreamer1.0-plugins-bad, gstreamer1.0-libav, default-jre | sun-java6-jre | java6-runtime | jre, libsane1, libreoffice-officebean
Conflicts: libreoffice-dev (<= 1:5.0.3~rc1-2), libreoffice-dev-doc (<= 1:5.0.3~rc1-2)
Homepage: http://www.libreoffice.org
Download-Size: 11.7 kB
APT-Sources: http://nl.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
Description: office productivity suite (metapackage)
 LibreOffice is a full-featured office productivity suite that provides
 a near drop-in replacement for Microsoft(R) Office.
 .
 This metapackage installs all components of libreoffice:
  * libreoffice-writer: Word processor
  * libreoffice-calc: Spreadsheet
  * libreoffice-impress: Presentation
  * libreoffice-draw: Drawing
  * libreoffice-base: Database
  * libreoffice-math: Equation editor
 It also recommends additional packages (e.g. fonts) in order to match an
 upstream LibreOffice install as closely as possible.
 .
 You can extend the functionality of LibreOffice by installing these
 packages:
  * hunspell-*/myspell-*: Hunspell/Myspell dictionaries
    for use with LibreOffice
  * libreoffice-l10n-*: UI interface translation
  * libreoffice-help-*: User help
  * mythes-*: Thesauri for the use with LibreOffice
  * hyphen-*: Hyphenation patterns for LibreOffice
  * libreoffice-gtk(2|3): Gtk UI Plugin, GNOME File Picker support
  * libreoffice-gnome: GIO backend
  * unixodbc: ODBC database support
  * cups-bsd: Allows LibreOffice to detect your CUPS printer queues
    automatically
  * libsane: Use your sane-supported scanner with LibreOffice
  * libxrender1: Speed up display by using Xrender library
  * libgl1: OpenGL support
  * openclipart-libreoffice: Open Clip Art Gallery with LibreOffice index
    files
  * firefox-esr | thunderbird | firefox:
    Mozilla profile with Certificates needed for XML Security...
  * openjdk-9-jre | openjdk-8-jre | openjdk-7-jre | java6-runtime:
    Java Runtime Environment for use with LibreOffice
  * pstoedit / imagemagick / ghostscript: helper tools for EPS
  * gstreamer0.10-plugins-*: GStreamer plugins for use with LibreOffices
    media backend
  * libpaper-utils: papersize detection support via paperconf
  * bluez: Bluetooth support for Impress (slideshow remote control)

N: There is 1 additional record. Please use the '-a' switch to see it
Comment 1 Mark Jeronimus 2018-09-28 10:08:04 UTC
oops, the one with Nautilus should also read "it does *not* happen"
Comment 2 raal 2018-10-06 05:58:57 UTC
Does it happen also in Safe mode? Help-> Restart in safe mode
Comment 3 Buovjaga 2018-10-25 19:05:28 UTC
(In reply to raal from comment #2)
> Does it happen also in Safe mode? Help-> Restart in safe mode

Set to NEEDINFO.
Change back to UNCONFIRMED, if the problem persists. Change to RESOLVED WORKSFORME, if the problem went away.
Comment 4 Mark Jeronimus 2018-10-26 14:11:48 UTC
It's in the first post: "User Profile Reset: yes" implies trying safe mode.

Still persists, although I haven't seen a new version pop up in the Ubuntu software center.
Comment 5 Mark Jeronimus 2018-10-31 09:54:33 UTC
I just had the same (for the first time) by right-clicking on a column header and pressing 'd' (for Delete Columns).
Comment 6 Mark Jeronimus 2018-11-27 08:49:54 UTC
I just had this bug almost kill my ubuntu. I really want to see this resolved sooner rather than later. Tell me whatever you need. More logs? Can I install an IDE and debug LO at the source level? (I'm a Java developer).

Yesterday I accidentally opened a document after launching LO, memory grew like usual. I tried `kill soffice.bin` and this time it somehow didn't work, not even with sudo. The Kill command in Gnome's System Monitor worked somehow (even though killall should send a higher signal level).

Today I did the right thing and typed in the new document after launching LO and then opened documents. The documents were .txt files and it for some reason asked me to save the previous document. I clicked 'no' because I don't want to save the garbage I just typed. Mistake. Memory exploded again and I had to kill it.

Now comes the weird part.

- When I launched LO again and dismissed the document recovery, the menu bar was GONE. I closed and restarted LO a few times and the menu bar stayed gone. (Log 1). Although this is triggered by this bug, tell me if this is worth a new bug report.
- I couldn't open Gnome-Terminal, it just pretended it was loading for a few seconds and it stopped. (Log 2) LO clearly corrupted something menu-related in my current Gnome session.
- I couldn't log in any more after logging out of Gnome. After each login attempt I was just presented the user selection screen again. (Log 3)
- Only reboot helped.

Log 1

Nov 27 09:19:03 mark soffice.bin[7400]: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Nov 27 09:19:03 mark soffice.bin[7400]: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Nov 27 09:19:03 mark soffice.bin[7400]: g_dbus_connection_get_unique_name: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Nov 27 09:19:03 mark soffice.bin[7400]: ../../../../gobject/gsignal.c:3492: signal name 'selection_changed' is invalid for instance '0x5580f9fcf850' of type 'OOoAtkObjCompTxt'
Nov 27 09:19:04 mark soffice.bin[7400]: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Nov 27 09:19:04 mark soffice.bin[7400]: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Nov 27 09:19:04 mark soffice.bin[7400]: g_dbus_connection_get_unique_name: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Nov 27 09:19:04 mark unity-panel-ser[2267]: gtk_menu_detach(): menu is not attached
Nov 27 09:19:04 mark unity-panel-ser[2267]: menus_destroyed: assertion 'IS_WINDOW_MENU(wm)' failed
Nov 27 09:19:05 mark soffice.bin[7400]: void g_lo_menu_insert_section(GLOMenu*, gint, const gchar*, GMenuModel*): assertion 'G_IS_LO_MENU (menu)' failed
Nov 27 09:19:05 mark soffice.bin[7400]: gtk_menu_bar_new_from_model: assertion 'G_IS_MENU_MODEL (model)' failed
Nov 27 09:19:05 mark soffice.bin[7400]: gtk_widget_insert_action_group: assertion 'GTK_IS_WIDGET (widget)' failed
Nov 27 09:19:05 mark soffice.bin[7400]: gtk_widget_set_hexpand: assertion 'GTK_IS_WIDGET (widget)' failed
Nov 27 09:19:05 mark soffice.bin[7400]: gtk_grid_attach: assertion 'GTK_IS_WIDGET (child)' failed
Nov 27 09:19:05 mark soffice.bin[7400]: invalid (NULL) pointer instance
Nov 27 09:19:05 mark soffice.bin[7400]: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
Nov 27 09:19:05 mark soffice.bin[7400]: invalid (NULL) pointer instance
Nov 27 09:19:05 mark soffice.bin[7400]: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
Nov 27 09:19:05 mark soffice.bin[7400]: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Nov 27 09:19:05 mark soffice.bin[7400]: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Nov 27 09:19:05 mark soffice.bin[7400]: g_dbus_connection_get_unique_name: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Nov 27 09:19:05 mark soffice.bin[7400]: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Nov 27 09:19:05 mark soffice.bin[7400]: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Nov 27 09:19:05 mark soffice.bin[7400]: g_dbus_connection_get_unique_name: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Nov 27 09:19:05 mark soffice.bin[7400]: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Nov 27 09:19:05 mark soffice.bin[7400]: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Nov 27 09:19:05 mark soffice.bin[7400]: g_dbus_connection_get_unique_name: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Nov 27 09:19:05 mark soffice.bin[7400]: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Nov 27 09:19:05 mark soffice.bin[7400]: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Nov 27 09:19:05 mark soffice.bin[7400]: g_dbus_connection_get_unique_name: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

Log 2

Nov 27 09:19:56 mark unity-panel-ser[2267]: gtk_menu_detach(): menu is not attached
Nov 27 09:19:56 mark unity-panel-ser[2267]: message repeated 2 times: [ gtk_menu_detach(): menu is not attached]
Nov 27 09:19:56 mark unity-panel-ser[2267]: menus_destroyed: assertion 'IS_WINDOW_MENU(wm)' failed
Nov 27 09:19:57 mark unity-panel-ser[2267]: gtk_menu_detach(): menu is not attached
Nov 27 09:19:58 mark unity-panel-ser[2267]: gtk_menu_detach(): menu is not attached
Nov 27 09:20:00 mark compiz[2259]: # Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Could not connect: Connection refused
Nov 27 09:20:21 mark unity-panel-ser[2267]: gtk_menu_detach(): menu is not attached
Nov 27 09:20:22 mark hud-service[2402]: #033[31mvoid DBusMenuImporterPrivate::updateActionProperty(QAction*, const QString&, const QVariant&)#033[0m: Unhandled property update "toggle-type"
Nov 27 09:20:22 mark hud-service[2402]: message repeated 13 times: [ #033[31mvoid DBusMenuImporterPrivate::updateActionProperty(QAction*, const QString&, const QVariant&)#033[0m: Unhandled property update "toggle-type"]
Nov 27 09:20:22 mark unity-panel-ser[2267]: gtk_menu_detach(): menu is not attached
Nov 27 09:20:22 mark unity-panel-ser[2267]: message repeated 5 times: [ gtk_menu_detach(): menu is not attached]
Nov 27 09:20:27 mark hud-service[2402]: #033[31mvoid DBusMenuImporter::slotGetLayoutFinished(QDBusPendingCallWatcher*)#033[0m: "No such interface 'com.canonical.dbusmenu' on object at path /org/ayatana/bamf/window/69209835"
Nov 27 09:20:27 mark unity-panel-ser[2267]: gtk_menu_detach(): menu is not attached
Nov 27 09:20:28 mark unity-panel-ser[2267]: message repeated 2 times: [ gtk_menu_detach(): menu is not attached]
Nov 27 09:20:28 mark unity-panel-ser[2267]: menus_destroyed: assertion 'IS_WINDOW_MENU(wm)' failed
Nov 27 09:20:29 mark unity-panel-ser[2267]: gtk_menu_detach(): menu is not attached
Nov 27 09:20:30 mark unity-panel-ser[2267]: menus_destroyed: assertion 'IS_WINDOW_MENU(wm)' failed
Nov 27 09:20:33 mark unity-panel-ser[2267]: gtk_menu_detach(): menu is not attached
Nov 27 09:20:33 mark unity-panel-ser[2267]: menus_destroyed: assertion 'IS_WINDOW_MENU(wm)' failed
Nov 27 09:20:33 mark unity-panel-ser[2267]: window_menu_model_new: assertion 'BAMF_IS_APPLICATION(app)' failed
Nov 27 09:20:33 mark unity-panel-ser[2267]: track_menus: assertion 'IS_WINDOW_MENU(menus)' failed
Nov 27 09:20:35 mark unity-panel-ser[2267]: gtk_menu_detach(): menu is not attached
Nov 27 09:20:36 mark compiz[2259]: # Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Could not connect: Connection refused
Nov 27 09:20:44 mark unity-settings-daemon[2065]: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Nov 27 09:20:44 mark unity-settings-daemon[2065]: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Nov 27 09:20:46 mark hud-service[2402]: #033[31mvoid DBusMenuImporter::slotGetLayoutFinished(QDBusPendingCallWatcher*)#033[0m: "No such interface 'com.canonical.dbusmenu' on object at path /org/ayatana/bamf/window/54525957"
Nov 27 09:20:47 mark unity-panel-ser[2267]: window_menu_model_new: assertion 'BAMF_IS_APPLICATION(app)' failed
Nov 27 09:20:47 mark unity-panel-ser[2267]: track_menus: assertion 'IS_WINDOW_MENU(menus)' failed
Nov 27 09:20:47 mark unity-panel-ser[2267]: gtk_menu_detach(): menu is not attached
Nov 27 09:20:47 mark unity-panel-ser[2267]: menus_destroyed: assertion 'IS_WINDOW_MENU(wm)' failed
Nov 27 09:20:48 mark unity-panel-ser[2267]: gtk_menu_detach(): menu is not attached
Nov 27 09:20:54 mark unity-panel-ser[2267]: menus_destroyed: assertion 'IS_WINDOW_MENU(wm)' failed
Nov 27 09:20:55 mark unity-settings-[2065]: Failed to load PNP ids: Failed to open file “/usr/share/hwdata/pnp.ids”: No such file or directory
Nov 27 09:20:55 mark unity-settings-[2065]: message repeated 2 times: [ Failed to load PNP ids: Failed to open file “/usr/share/hwdata/pnp.ids”: No such file or directory]
Nov 27 09:20:55 mark unity-panel-ser[2267]: menus_destroyed: assertion 'IS_WINDOW_MENU(wm)' failed

Log 3

Nov 27 09:21:01 mark /usr/lib/gdm3/gdm-x-session[7622]: dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd
1 exited with status 1
Nov 27 09:21:01 mark /usr/lib/gdm3/gdm-x-session[7622]: dbus-daemon[7630]: [session uid=1000 pid=7630] Activating service name='org.a11y.Bus' requested by ':1.6' (uid=1000 pid=7729 comm="/usr/lib/x86_64-l
inux-gnu/notify-osd " label="unconfined")
Nov 27 09:21:01 mark /usr/lib/gdm3/gdm-x-session[7622]: dbus-daemon[7630]: [session uid=1000 pid=7630] Activating service name='org.freedesktop.systemd1' requested by ':1.7' (uid=1000 pid=7743 comm="syste
mctl --user unset-environment UPSTART_SESSION" label="unconfined")
Nov 27 09:21:01 mark /usr/lib/gdm3/gdm-x-session[7622]: dbus-daemon[7630]: [session uid=1000 pid=7630] Successfully activated service 'org.a11y.Bus'
Nov 27 09:21:01 mark /usr/lib/gdm3/gdm-x-session[7622]: dbus-daemon[7630]: [session uid=1000 pid=7630] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with sta
tus 1
Nov 27 09:21:01 mark /usr/lib/gdm3/gdm-x-session[7622]: Failed to set environment: Process org.freedesktop.systemd1 exited with status 1
Comment 7 Buovjaga 2018-11-27 16:02:21 UTC
See here about installing debugging packages on Ubuntu and "How to get a backtrace": https://wiki.documentfoundation.org/QA/BugReport/Debug_Information

You might also experiment, if you get a different result while running a daily build as an appimage: https://libreoffice.soluzioniopen.com/
Comment 8 Mark Jeronimus 2018-11-28 10:20:48 UTC
Created attachment 147086 [details]
strace (crash starts at 45s).log

I couldn't get gdbtrace working (Can't find any debug package in Bionic), but strace described on the same page worked. I hope that's also useful.

I tried the "daily" release of `LibreOfficeDev-6.3.0.0.alpha0_2018-11-17-x86_64.AppImage` and the bug still persists. (why is it over a week old?)
Comment 9 Buovjaga 2018-11-28 10:37:15 UTC
(In reply to Mark Jeronimus from comment #8)
> Created attachment 147086 [details]
> strace (crash starts at 45s).log
> 
> I couldn't get gdbtrace working (Can't find any debug package in Bionic),
> but strace described on the same page worked. I hope that's also useful.
> 
> I tried the "daily" release of
> `LibreOfficeDev-6.3.0.0.alpha0_2018-11-17-x86_64.AppImage` and the bug still
> persists. (why is it over a week old?)

Maybe this helps with the debug packages: https://wiki.ubuntu.com/Debug%20Symbol%20Packages

The appimages are created by a volunteer.
Comment 10 raal 2018-12-18 11:09:27 UTC
looks similar: https://ask.libreoffice.org/en/question/164383/i-upgraded-ubuntu-1604-to-1804-calc-will-not-open-any-existing-spreadsheets/

Try reinstall: "I reinstalled Libre office from the software center icon and the Calc problem is fixed."
Comment 11 Mark Jeronimus 2019-01-11 13:42:07 UTC
An Ubuntu update bumped LO to 6.0.7.3 and the bug doesn't seem to happen anymore (or at least not as easy anymore)
Comment 12 Xisco Faulí 2019-01-11 15:08:06 UTC
(In reply to Mark Jeronimus from comment #11)
> An Ubuntu update bumped LO to 6.0.7.3 and the bug doesn't seem to happen
> anymore (or at least not as easy anymore)

Good to hear!
Closing as RESOLVED WORKSFORME