LibreOffice 5.1.6.2 crashes ubuntu 16.04 (64-bit)

At my wit's end. Running LibreOffice 5.1.6.2 (the std repo version) on Ubuntu 16.04 (64-bit).

azed@azed-H270N:~$ uname -a
Linux azed-H270N 4.10.0-37-generic #41~16.04.1-Ubuntu SMP Fri Oct 6 22:42:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

LO has always had a tendency to "hang" on my 16.04 system, but now it is regularly taking down the whole system.

Doing anything quickly in LO - sweep-selecting text, executing two commands in quick succession - seems to bring-on the problem.

The size of the document may also be a factor. The problem has tended to occur when I am working on a long (600 page, 3.6MB) doc, but this may only be because I tend not to work on short docs for very long.

Symptoms:

The whole system freezes. The mouse pointer remains mobile, but the system is otherwise unresponsive. After a few minutes of stasis, the system crashes back to the login screen.

After logging back-in, I am greeted by the LO document-recovery dialogue. The doc comes back OK, but all work done after the last LO autosave is lost.

After one crash, LO is much more likely to crash again.

Steps taken:

  1. I have increased the memory used for the LO graphics cache to 190MB, and the memory / object to 12MB, but this has not improved things.

  2. I have also tried calling LO from a terminal with gtk2 rather than gtk3, using:

    SAL_USE_VCLPLUGIN=gtk libreoffice
    

    as detailed here:

    Force LibreOffice 5.1.2.2 to use gtk2 instead of gtk3?

    But no joy/improvement (didn't seem to change anything).

  3. After the last crash, I examined ~/.xsession-errors, /var/log/dmesg and /var/log/syslog. The last yielded:

    Oct 12 16:20:38 azed-H270N gnome-session[1707]: ** (soffice:1998): WARNING **: Unknown event notification 36
    Oct 12 16:24:26 azed-H270N gnome-session[1707]: ** (soffice:1998): WARNING **: Unknown event notification 36
    Oct 12 16:24:26 azed-H270N systemd[1]: Starting Cleanup of Temporary Directories...
    Oct 12 16:24:26 azed-H270N systemd-tmpfiles[2712]: [/usr/lib/tmpfiles.d/var.conf:14] Duplicate line for path "/var/log", ignoring.
    Oct 12 16:24:26 azed-H270N systemd[1]: Started Cleanup of Temporary Directories.
    Oct 12 16:24:38 azed-H270N gnome-session[1707]: ** (soffice:1998): WARNING **: Unknown event notification 36
    Oct 12 16:29:12 azed-H270N gnome-session[1707]: message repeated 3 times: [ ** (soffice:1998): WARNING **: Unknown event notification 36]
    Oct 12 16:34:46 azed-H270N org.gnome.zeitgeist.SimpleIndexer[1551]: ** (zeitgeist-fts:2105): WARNING **: Unable to get info on application://nautilus-autostart.desktop
    Oct 12 16:39:46 azed-H270N systemd[1]: Starting Automatically fetch and run repair assertions...
    Oct 12 16:39:46 azed-H270N snap-repair[2949]: error: cannot use snap-repair on a classic system
    Oct 12 16:39:46 azed-H270N systemd[1]: Started Automatically fetch and run repair assertions.
    Oct 12 16:49:33 azed-H270N kernel: [ 2426.455211] [drm] GPU HANG: ecode 9:0:0x85dffffb, in Xorg [946], reason: Hang on render ring, action: reset
    Oct 12 16:49:33 azed-H270N kernel: [ 2426.455238] drm/i915: Resetting chip after gpu hang
    Oct 12 16:49:33 azed-H270N kernel: [ 2426.455284] [drm] RC6 on
    Oct 12 16:49:33 azed-H270N kernel: [ 2426.471991] [drm] GuC firmware load skipped
    Oct 12 16:49:51 azed-H270N kernel: [ 2444.435136] drm/i915: Resetting chip after gpu hang
    Oct 12 16:49:51 azed-H270N kernel: [ 2444.435196] [drm] RC6 on
    Oct 12 16:49:51 azed-H270N kernel: [ 2444.449146] [drm] GuC firmware load skipped
    Oct 12 16:50:11 azed-H270N kernel: [ 2464.434387] drm/i915: Resetting chip after gpu hang
    Oct 12 16:50:11 azed-H270N kernel: [ 2464.434449] [drm] RC6 on
    Oct 12 16:50:11 azed-H270N kernel: [ 2464.446462] [drm] GuC firmware load skipped
    Oct 12 16:50:31 azed-H270N kernel: [ 2484.433590] drm/i915: Resetting chip after gpu hang
    Oct 12 16:50:31 azed-H270N kernel: [ 2484.433655] [drm] RC6 on
    Oct 12 16:50:31 azed-H270N kernel: [ 2484.448736] [drm] GuC firmware load skipped
    Oct 12 16:50:49 azed-H270N kernel: [ 2502.416895] drm/i915: Resetting chip after gpu hang
    Oct 12 16:50:49 azed-H270N kernel: [ 2502.416960] [drm] RC6 on
    Oct 12 16:50:49 azed-H270N kernel: [ 2502.431102] [drm] GuC firmware load skipped
    Oct 12 16:51:09 azed-H270N kernel: [ 2522.416124] drm/i915: Resetting chip after gpu hang
    Oct 12 16:51:09 azed-H270N kernel: [ 2522.416192] [drm] RC6 on
    Oct 12 16:51:09 azed-H270N kernel: [ 2522.432185] [drm] GuC firmware load skipped
    Oct 12 16:51:24 azed-H270N kernel: [ 2537.204555] sysrq: SysRq : This sysrq operation is disabled.
    Oct 12 16:51:26 azed-H270N kernel: [ 2538.876556] sysrq: SysRq : This sysrq operation is disabled.
    Oct 12 16:51:27 azed-H270N kernel: [ 2540.500557] sysrq: SysRq : This sysrq operation is disabled.
    Oct 12 16:51:29 azed-H270N kernel: [ 2542.415352] drm/i915: Resetting chip after gpu hang
    

Questions:

Is my problem related to this bug:

https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1574266

would upgrading to a newer version of LO from the official LO ppa help matters?

Has anyone else come across this prob?

New solution ideas?

Any help very gratefully received. LO is a key app for me. If I can't rely on it, it makes my 16.04 system virtually useless.


I get on the right track.

After another crash, I examined /var/log/syslog and turned up this:

Oct 17 20:01:14 azed-H270N kernel: [38304.615927] [drm] GPU HANG: ecode 9:0:0x85dffffb, in Xorg [969], reason: Hang on render ring, action: reset
Oct 17 20:01:14 azed-H270N kernel: [38304.615958] drm/i915: Resetting chip after gpu hang
Oct 17 20:01:14 azed-H270N kernel: [38304.616003] [drm] RC6 on
Oct 17 20:01:14 azed-H270N kernel: [38304.632462] [drm] GuC firmware load skipped
Oct 17 20:01:26 azed-H270N kernel: [38316.580869] drm/i915: Resetting chip after gpu hang

This suggested to me that the problem was indeed this bug. Post #6 in the above thread refers to the tendency of systems using the i915 driver to hang as "a well-known problem with the i915 driver".

For purposes of comparison, if anyone else has this problem, here's my kit:

azed@azed-H270N:~$ sudo lshw -C video
[sudo] password for azed:
*-display
description: VGA compatible controller
product: Sky Lake Integrated Graphics
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 06
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:132 memory:f6000000-f6ffffff memory:e0000000-efffffff ioport:f000(size=64) memory:c0000-dffff

OK, so what to do?

Post #12 in the above thread recommended installing xserver-xorg-video-intel as a fix:

But when I tried doing this with Synaptic, the system wouldn't let me. Another package, xserver-xorg-video-all-hwe-16.04, had to be uninstalled first. Unfortunately, my system wasn't keen to do the uninstall.

A little research revealed that the above was installed at the time of a 16.04 point-release earlier in the year. This info was consistent with the behaviour of my system, which ran OK last year.

Solution:

Found a possible solution here. Following the advice given at the above w/page, I did this:

sudo apt remove xserver-xorg-core-hwe-16.04 xserver-xorg-input-all-hwe-16.04 linux-generic-hwe-16.04 xserver-xorg-video-all-hwe-16.04
sudo apt install xserver-xorg-core
sudo apt install ubuntu-desktop xserver-xorg xserver-xorg-video-all xserver-xorg-input-all

Note: I omitted libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 from the version of this last command given in the link above, as the 64-bit versions of these packages seemed to be already installed in my system.

Having made the above changes, I rebooted. The system came back fine.

Result:

That was a week ago. I haven't had a single "hang" since. My 16.04 system now seems to be working fine.

By the way, I don't think the hang-problem has anything much to do with Libreoffice. I am still getting /var/log/syslog-warnings like:

Oct 24 09:52:57 azed-H270N gnome-session[1684]: (soffice:2017): Gdk-WARNING **: gdk_window_set_icon_list: icons too large
Oct 24 09:53:05 azed-H270N org.gtk.vfs.Daemon[1548]: ** (gvfsd:1619): WARNING **: dbus_mount_reply: Error from org.gtk.vfs.Mountable.mount(): Failed to mount Windows share: Invalid argument
Oct 24 09:53:07 azed-H270N org.gtk.vfs.Daemon[1548]: message repeated 2 times: [ ** (gvfsd:1619): WARNING **: dbus_mount_reply: Error from org.gtk.vfs.Mountable.mount(): Failed to mount Windows share: Invalid argument]
Oct 24 09:54:26 azed-H270N gnome-session[1684]: ** (soffice:2017): WARNING **: Unknown event notification 36

but these don't seem to be causing trouble. I think my problem was a problem with Xorg. I made the association with LibreOffice because I tended to be using it (I use it a lot) whenever the system crashed.

Hope all this helps someone.

Note: if the above solution doesn't work for you, the changes can be reverted with:

sudo apt-get install --install-recommends linux-generic-hwe-16.04 xserver-xorg-hwe-16.04

I think that's it, anyway. See here:

https://wiki.ubuntu.com/Kernel/LTSEnablementStack


I stumbled into this problem as well. I even have the same graphics hardware. I seem to have fixed it with less drastic measures. I turned off Java and OpenCL in the Tools->Options dialog (Java checkbox under "Advanced").

Seems much better now.