Bug 157934 - v7.6 crashes in libuno_sal.so.3 when saving a file in Ubuntu 22.04 with XLIB_SKIP_ARGB_VISUALS=1
Summary: v7.6 crashes in libuno_sal.so.3 when saving a file in Ubuntu 22.04 with XLIB_...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.7.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace
Depends on:
Blocks: GTK3 Crash
  Show dependency treegraph
 
Reported: 2023-10-26 14:06 UTC by Stefan Rueger
Modified: 2024-03-07 01:02 UTC (History)
4 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 Stefan Rueger 2023-10-26 14:06:30 UTC
Description:
In Ubuntu LTS 22.04 libreoffice crashes regularly with the simplest of interactions: cut-and-paste, saving a file, etc. Below is just one reproducible example.

Observed straight after a fresh install of Ubuntu LTS 22.04.

Affects many libreoffice versions, 7.3.7 ... 7.6.2.1, both when installed via snap or through apt.

Steps to Reproduce:
1. Install Ubuntu LTS 22.04
2. $ snap install libreoffice
3. $ libreoffice --writer
4. Type ctrl-s


Actual Results:
Libreoffice crashes showing the document recovery window. It's output in bash looks as below. The glib messages appear when I initiate save-file.

Gtk-Message: 14:52:10.475: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.

(soffice:47474): Gtk-WARNING **: 14:52:10.549: GTK+ module /snap/libreoffice/300/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.
Gtk-Message: 14:52:10.549: Failed to load module "canberra-gtk-module"

(soffice:47474): Gtk-WARNING **: 14:52:10.550: GTK+ module /snap/libreoffice/300/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.
Gtk-Message: 14:52:10.550: Failed to load module "canberra-gtk-module"

(soffice:47474): GLib-GIO-WARNING **: 14:52:24.981: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)

(soffice:47474): GLib-GIO-CRITICAL **: 14:52:25.160: GFileInfo created without standard::is-hidden

(soffice:47474): GLib-GIO-CRITICAL **: 14:52:25.160: file ../src/gio/gfileinfo.c: line 1633 (g_file_info_get_is_hidden): should not be reached

(soffice:47474): GLib-GIO-CRITICAL **: 14:52:25.160: GFileInfo created without standard::is-backup

(soffice:47474): GLib-GIO-CRITICAL **: 14:52:25.160: file ../src/gio/gfileinfo.c: line 1655 (g_file_info_get_is_backup): should not be reached

(soffice:47474): GLib-GIO-CRITICAL **: 14:52:25.160: GFileInfo created without standard::is-hidden

(soffice:47474): GLib-GIO-CRITICAL **: 14:52:25.160: file ../src/gio/gfileinfo.c: line 1633 (g_file_info_get_is_hidden): should not be reached

(soffice:47474): GLib-GIO-CRITICAL **: 14:52:25.160: GFileInfo created without standard::is-backup

(soffice:47474): GLib-GIO-CRITICAL **: 14:52:25.160: file ../src/gio/gfileinfo.c: line 1655 (g_file_info_get_is_backup): should not be reached

(soffice:47474): GLib-GIO-CRITICAL **: 14:52:25.160: GFileInfo created without standard::is-hidden

(soffice:47474): GLib-GIO-CRITICAL **: 14:52:25.160: file ../src/gio/gfileinfo.c: line 1633 (g_file_info_get_is_hidden): should not be reached

(soffice:47474): GLib-GIO-CRITICAL **: 14:52:25.160: GFileInfo created without standard::is-backup

(soffice:47474): GLib-GIO-CRITICAL **: 14:52:25.160: file ../src/gio/gfileinfo.c: line 1655 (g_file_info_get_is_backup): should not be reached

(soffice:47474): GLib-GIO-CRITICAL **: 14:52:25.160: GFileInfo created without standard::is-hidden

(soffice:47474): GLib-GIO-CRITICAL **: 14:52:25.160: file ../src/gio/gfileinfo.c: line 1633 (g_file_info_get_is_hidden): should not be reached

(soffice:47474): GLib-GIO-CRITICAL **: 14:52:25.160: GFileInfo created without standard::is-backup

(soffice:47474): GLib-GIO-CRITICAL **: 14:52:25.160: file ../src/gio/gfileinfo.c: line 1655 (g_file_info_get_is_backup): should not be reached



Expected Results:
The save-file window, which is not happening.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
LibreOffice also crashes when I click on the copy widget in the Help -> About LibreOffice window. The following trace is seen in the parent bash window:

Gtk-Message: 15:01:20.211: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.

(soffice:50362): Gtk-WARNING **: 15:01:20.284: GTK+ module /snap/libreoffice/300/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.
Gtk-Message: 15:01:20.284: Failed to load module "canberra-gtk-module"

(soffice:50362): Gtk-WARNING **: 15:01:20.285: GTK+ module /snap/libreoffice/300/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.
Gtk-Message: 15:01:20.285: Failed to load module "canberra-gtk-module"
terminate called after throwing an instance of 'com::sun::star::uno::RuntimeException'


Fatal exception: Signal 6
Stack:
/snap/libreoffice/300/lib/libreoffice/program/libuno_sal.so.3(+0x81f3b)[0x7f57ac3e4f3b]
/snap/libreoffice/300/lib/libreoffice/program/libuno_sal.so.3(+0x82177)[0x7f57ac3e5177]
/snap/libreoffice/300/lib/libreoffice/program/libuno_sal.so.3(+0x8237a)[0x7f57ac3e537a]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f57a4e2e520]
/lib/x86_64-linux-gnu/libc.so.6(pthread_kill+0x12c)[0x7f57a4e82a7c]
/lib/x86_64-linux-gnu/libc.so.6(raise+0x16)[0x7f57a4e2e476]
/lib/x86_64-linux-gnu/libc.so.6(abort+0xd3)[0x7f57a4e147f3]
/snap/libreoffice/300/gnome-platform/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xa2b9e)[0x7f57a4c46b9e]
/snap/libreoffice/300/gnome-platform/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xae20c)[0x7f57a4c5220c]
/snap/libreoffice/300/gnome-platform/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xae277)[0x7f57a4c52277]
/snap/libreoffice/300/gnome-platform/usr/lib/x86_64-linux-gnu/libstdc++.so.6(__cxa_rethrow+0x4b)[0x7f57a4c5252b]
/snap/libreoffice/300/lib/libreoffice/program/libmergedlo.so(+0x1ccc4d2)[0x7f57a6cf64d2]
/snap/libreoffice/300/lib/libreoffice/program/libmergedlo.so(+0x1ccb4c5)[0x7f57a6cf54c5]
/snap/libreoffice/300/lib/libreoffice/program/libmergedlo.so(+0x2c44b75)[0x7f57a7c6eb75]
/snap/libreoffice/300/lib/libreoffice/program/libmergedlo.so(+0x2c4672f)[0x7f57a7c7072f]
/snap/libreoffice/300/lib/libreoffice/program/libmergedlo.so(+0x2c4ce16)[0x7f57a7c76e16]
/snap/libreoffice/300/lib/libreoffice/program/libmergedlo.so(+0x2c4c9e9)[0x7f57a7c769e9]
/snap/libreoffice/300/lib/libreoffice/program/libmergedlo.so(+0x285c172)[0x7f57a7886172]
/snap/libreoffice/300/lib/libreoffice/program/libmergedlo.so(+0x285c609)[0x7f57a7886609]
/snap/libreoffice/300/lib/libreoffice/program/libmergedlo.so(+0x41ed5c5)[0x7f57a92175c5]
/snap/libreoffice/300/lib/libreoffice/program/libuno_sal.so.3(+0x1aa36)[0x7f57ac37da36]
/snap/libreoffice/300/lib/libreoffice/program/libuno_sal.so.3(+0x8233f)[0x7f57ac3e533f]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f57a4e2e520]
/snap/libreoffice/300/usr/lib/x86_64-linux-gnu/libX11.so.6(XVisualIDFromVisual+0x4)[0x7f57a3501104]
/snap/libreoffice/300/usr/lib/x86_64-linux-gnu/libgdk-3.so.0(gdk_x11_window_foreign_new_for_display+0x18e)[0x7f579de4aa2e]
/snap/libreoffice/300/usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x6b9f8)[0x7f579de359f8]
/snap/libreoffice/300/usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x6d191)[0x7f579de37191]
/snap/libreoffice/300/usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x70d28)[0x7f579de3ad28]
/snap/libreoffice/300/usr/lib/x86_64-linux-gnu/libgdk-3.so.0(gdk_display_get_event+0x89)[0x7f579de00a99]
/snap/libreoffice/300/usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x70f46)[0x7f579de3af46]
/snap/libreoffice/300/gnome-platform/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x5ee2b)[0x7f57a39bee2b]
/snap/libreoffice/300/gnome-platform/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x625f0)[0x7f57a39c25f0]
/snap/libreoffice/300/gnome-platform/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x33)[0x7f57a39c2eb3]
/snap/libreoffice/300/lib/libreoffice/program/libvclplug_gtk3lo.so(+0x138d84)[0x7f579e832d84]
/snap/libreoffice/300/lib/libreoffice/program/libvclplug_gtk3lo.so(+0x13c6f2)[0x7f579e8366f2]
/snap/libreoffice/300/lib/libreoffice/program/libmergedlo.so(+0x41d9e46)[0x7f57a9203e46]
/snap/libreoffice/300/lib/libreoffice/program/libmergedlo.so(_ZN11Application5YieldEv+0x196)[0x7f57a920477a]
/snap/libreoffice/300/lib/libreoffice/program/libmergedlo.so(_ZN11Application7ExecuteEv+0x1ad)[0x7f57a9203b4b]
/snap/libreoffice/300/lib/libreoffice/program/libmergedlo.so(+0x285e0e1)[0x7f57a78880e1]
/snap/libreoffice/300/lib/libreoffice/program/libmergedlo.so(_Z10ImplSVMainv+0x219)[0x7f57a921783a]
/snap/libreoffice/300/lib/libreoffice/program/libmergedlo.so(_Z6SVMainv+0xd)[0x7f57a9217963]
/snap/libreoffice/300/lib/libreoffice/program/libmergedlo.so(soffice_main+0x141)[0x7f57a78b6185]
/snap/libreoffice/300/lib/libreoffice/program/soffice.bin(+0x11d0)[0x55d0db7981d0]
/snap/libreoffice/300/lib/libreoffice/program/soffice.bin(+0x11b2)[0x55d0db7981b2]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7f57a4e15d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7f57a4e15e40]
/snap/libreoffice/300/lib/libreoffice/program/soffice.bin(+0x10c5)[0x55d0db7980c5]
/snap/libreoffice/300/libreoffice.wrapper: line 21: 50362 Aborted                 (core dumped) "$soffice" "$@"
Comment 1 Stéphane Guillou (stragu) 2023-10-26 21:15:54 UTC
Can you please check with these packages installed?

sudo apt install libcanberra-gtk-module libcanberra-gtk3-module
Comment 2 Stefan Rueger 2023-10-27 08:47:37 UTC
No change:

$ sudo apt install libcanberra-gtk-module libcanberra-gtk3-module
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libcanberra-gtk3-module is already the newest version (0.30-10ubuntu1.22.04.1).
libcanberra-gtk-module is already the newest version (0.30-10ubuntu1.22.04.1).
0 to upgrade, 0 to newly install, 0 to remove and 14 not to upgrade.

$ dpkg --get-selections | grep '[[:space:]]install$' | sed s/'\s*install$'// | grep canberra
gnome-session-canberra
libcanberra-gtk-module:amd64
libcanberra-gtk0:amd64
libcanberra-gtk3-0:amd64
libcanberra-gtk3-module:amd64
libcanberra-pulse:amd64
libcanberra0:amd64

$ dpkg --get-selections | grep '[[:space:]]install$' | sed s/'\s*install$'// | grep -v canberra | grep gtk
apport-gtk
gir1.2-gtk-3.0:amd64
gir1.2-gtk-4.0:amd64
gir1.2-gtksource-4:amd64
gir1.2-javascriptcoregtk-4.0:amd64
gstreamer1.0-gtk3:amd64
gtk-update-icon-cache
ibus-gtk3:amd64
ibus-gtk4:amd64
libavahi-ui-gtk3-0:amd64
libcheese-gtk25:amd64
libclutter-gtk-1.0-0:amd64
libcolord-gtk1:amd64
libdbusmenu-gtk3-4:amd64
libgirara-gtk3-3:amd64
libgtk-3-0:amd64
libgtk-3-bin
libgtk-3-common
libgtk-4-1:amd64
libgtk-4-bin
libgtk-4-common
libgtk2.0-0:amd64
libgtk2.0-bin
libgtk2.0-common
libgtk3-perl
libgtkmm-3.0-1v5:amd64
libgtksourceview-4-0:amd64
libgtksourceview-4-common
libjavascriptcoregtk-4.0-18:amd64
libwebkit2gtk-4.0-37:amd64
libwmf-0.2-7-gtk
libwmf0.2-7-gtk:amd64
libwxgtk3.0-gtk3-0v5:amd64
python3-aptdaemon.gtk3widgets
qt5-gtk-platformtheme:amd64
software-properties-gtk
transmission-gtk
ubuntu-release-upgrader-gtk
usb-creator-gtk
xdg-desktop-portal-gtk
xdg-user-dirs-gtk
Comment 3 Stefan Rueger 2023-10-27 09:15:27 UTC
I systematically changed my .bashrc (seeing that it is one of the few things I injected into a fresh 22.04 install). Looks like

export XLIB_SKIP_ARGB_VISUALS=1

in .bashrc makes libreoffice crash in the described way. Who knew? I cannot remember when I put it there in the last 20 years and what for...

Begs the question can anyone else reproduce and why does libreoffice crash (but hardly anything else) with this environment variable set?
Comment 4 QA Administrators 2023-10-28 03:13:43 UTC Comment hidden (obsolete)
Comment 5 Stéphane Guillou (stragu) 2023-10-28 08:51:26 UTC
Still can't crash it in Ubuntu 20.04 with:

export XLIB_SKIP_ARGB_VISUALS=1

Looks like some Ubuntu 22.04-specific issue(s), see for example https://stackoverflow.com/questions/75406844/not-loading-module-atk-bridge-the-functionality-is-provided-by-gtk-natively

Caolán and Michael, this touches on a mix of gtk2 and gtk3, and the accessibility toolkit. I expect it to be "not our bug", but any opinion here?
Comment 6 raal 2023-10-28 09:27:59 UTC
I can confirm on Ubuntu 22.04 with export XLIB_SKIP_ARGB_VISUALS=1; window system X11

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 97b6b6b16c4b623f8a34393a906272439a7f0314
CPU threads: 4; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 7 Caolán McNamara 2023-10-28 11:07:30 UTC
"Using GTK+ 2.x and GTK+ 3 in the same process is not supported." reminds me of:
https://bugzilla.redhat.com/show_bug.cgi?id=1285356

/snap/libreoffice/300/gnome-platform/usr/lib/x86_64-linux-gnu/libstdc++.so.6(__cxa_rethrow+0x4b)[0x7f57a4c5252b]
...
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f57a4e2e520]
/snap/libreoffice/300/usr/lib/x86_64-linux-gnu/libX11.so.6(XVisualIDFromVisual+0x4)[0x7f57a3501104]

XVisualIDFromVisual failure is presumably something to do with XLIB_SKIP_ARGB_VISUALS and some exception getting thrown somwehere.

Not sure what is going on here, and I can't reproduce locally
Comment 8 Michael Weghorn 2023-10-31 06:24:36 UTC
Can't reproduce any crash with XLIB_SKIP_ARGB_VISUALS=1 on Debian testing, maybe really some Ubuntu-specific issue?

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: df79eedf6989ab4c2913a23a7e72079bd719168b
CPU threads: 12; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 9 Stefan Rueger 2023-10-31 19:37:25 UTC
Glad @raal could reproduce under Ubuntu 22.04 LTS. This problem kept me from upgrading to 22.04 for nearly two years.

Now that I know it's a pesky environment variable XLIB_SKIP_ARGB_VISUALS=1 still begs the question why does libreoffice crash (but hardly anything else on the laptop that I used for testing out 22.04) with this environment variable set?

It's likely some library or some such, but it *is* libreoffice that crashes.
Comment 10 Stéphane Guillou (stragu) 2024-03-07 01:02:32 UTC
No crash with Ubuntu 22.04 + GNOME 42.9 + Wayland, regardless of if the window is MetaWindowXwayland or MetaWindowWayland

Version: 7.6.5.2 (X86_64) / LibreOffice Community
Build ID: 38d5f62f85355c192ef5f1dd47c5c0c0c6d6598b
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded