All gtk applications Segfault if no GLX context is active

Bug #1574886 reported by Yael
70
This bug affects 14 people
Affects Status Importance Assigned to Milestone
libepoxy (Ubuntu)
Confirmed
Undecided
Unassigned
Nominated for Xenial by Mathew Hodson

Bug Description

I upgraded my desktop today to Ubuntu 16.04 . I use MATE for my desktop. When I tried logging in via VNC, all gtk application Segfault: gedit, nautilus, meld, emacs and many more.
The same exact setup was working fine in Ubuntu 15.10.
I saw that MATE is now using GTK3, and wonder if there is a way to force it to downgrade back to GTK2 ? That would probably help with the VNC setup.
thanks in advance!

Tags: xenial
Yael (ya-ah)
no longer affects: xserver-xorg-input-evdev (Ubuntu)
Revision history for this message
Yael (ya-ah) wrote :

Here is a backtrace, hope that helps resolve this issue.

(gdb) run
Starting program: /usr/bin/gedit
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffeae7c700 (LWP 22741)]
[New Thread 0x7fffea67b700 (LWP 22742)]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6ff8b3f in rawmemchr () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007ffff6ff8b3f in rawmemchr () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff6fdff22 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffff6fceb67 in __isoc99_vsscanf ()
   from /lib/x86_64-linux-gnu/libc.so.6
#3 0x00007ffff6fceb07 in __isoc99_sscanf ()
   from /lib/x86_64-linux-gnu/libc.so.6
#4 0x00007ffff24ded22 in epoxy_glx_version ()
   from /usr/lib/x86_64-linux-gnu/libepoxy.so.0
#5 0x00007ffff5847409 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#6 0x00007ffff584772a in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#7 0x00007ffff584fe3e in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#8 0x00007ffff584cdb6 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#9 0x00007ffff583f165 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#10 0x00007ffff58195e6 in gdk_display_manager_open_display ()
   from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#11 0x00007ffff5cd63c0 in gtk_init_check ()
   from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#12 0x00007ffff5cd63f9 in gtk_init ()
   from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#13 0x00007ffff5bcb76a in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#14 0x00007ffff7b4c8b5 in ?? ()
   from /usr/lib/x86_64-linux-gnu/gedit/libgedit.so
#15 0x00007ffff75591d4 in ?? ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007ffff75739a6 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00007ffff757408f in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x00007ffff78490a2 in g_application_register ()
   from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#19 0x00007ffff78498cf in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#20 0x00007ffff7849c32 in g_application_run ()
   from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#21 0x0000000000400cfa in main ()
(gdb)

Yael (ya-ah)
summary: - All gtk applications Segfault via VNC with 16.04 and MATE desktop
+ All gtk applications Segfault if no GLX context is active
no longer affects: mate-desktop
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libepoxy (Ubuntu):
status: New → Confirmed
Revision history for this message
Nathan Sweet (nate66s) wrote :

I was having a similar problem where all GTK apps were crashing. I ran strace on one of them and found that the app was seg faulting after it could not find libGLX_indirect.so.0. I use the proprietary nvidia drivers, which appear to provide that library, so, as a workaround, I symlinked the nvidia library to where the GTK apps were looking for them (e.g., /usr/lib/x86_64-linux-gnu). Probably not the perfectly correct fix, but this got it working for me.

Revision history for this message
Nathan Sweet (nate66s) wrote :

I should have noted, like the original bug submitter, the GTK apps were only crashing when I was remotely connected (XRDP/VNC).

Revision history for this message
Yael (ya-ah) wrote :

@Nathan, thank you so much for the tip!

Revision history for this message
b (ben-ekran) wrote :

I confirm that the symlink workaround solves the issue for me also. I ended up using this:

sudo ln -s /usr/lib/nvidia-361/libGLX_nvidia.so.361.42 /usr/lib/x86_64-linux-gnu/libGLX_indirect.so.0

Revision history for this message
Kirk Gremillion (kirk-grem) wrote :

I also want to confirm that this link solution works for me! (I have a Nvidia GT610 with prop drivers also.)

sudo ln -s /usr/lib/nvidia-361/libGLX_nvidia.so.361.42 /usr/lib/x86_64-linux-gnu/libGLX_indirect.so.0

Couldn't for the life of me figure out why apps worked on the console, but not via XRDP!

Thank you very much for this solution. But...it seems to me that this should be added to any discussion of installing/using XRDP with XUBUNTU 16.04.

Revision history for this message
Niklas Edmundsson (niklas-edmundsson) wrote :

Upstream bug/discussion: https://github.com/anholt/libepoxy/issues/72

Main issue seems to be libepoxy having been unmaintained for some time, but this issue is showing up in other distros as well so will have to be fixed sooner or later.

Patch is trivial, bug/crash is due to passing on a pointer without checking for NULL return value.

Revision history for this message
Ken Adams (tinsulpop) wrote :

should NVidia's drivers be making that link as well, anyway? I realize it isn't the prime cause...

Revision history for this message
Björn Torkelsson (torkel) wrote :

Looks like they have finally fixed it upstream: https://github.com/anholt/libepoxy/issues/72#issuecomment-276045967

Revision history for this message
Torbjörn Lönnemark (tobbez) wrote :

On February 6 upstream released 1.4.0 which contains the fix:
https://github.com/anholt/libepoxy/releases/tag/v1.4

Revision history for this message
Raj Bhattacharjea (raj-b) wrote :

What's the recommended way to get the updated version of libepoxy on xenial (16.04)? It appears that yakkety and zesty both have version 1.3.1 of libepoxy, but zesty's version number is "1.3.1-1ubuntu1" while xenial and yakkety both have "1.3.1-1", so I'm hopeful the zesty libepoxy package has had the patch pulled in? Does anyone know if this is true? And if so, is a backport request the correct way to go? Or can I just manually download the zesty deb package and install it using dpkg? The only dependency I see is libc6 >= 2.17, which is met by xenial's libc6 2.23

Revision history for this message
Raj Bhattacharjea (raj-b) wrote :

For future users, I installed libepoxy0 (1.3.1-1ubuntu1) from zesty manually by downloading the right deb for my architecture (https://packages.ubuntu.com/zesty/libs/libepoxy0), and then installing with "dpkg -i". It seems that the newer package in zesty has a fix for the underlying bug. It appears to work fine now, no more segfaults when launching synaptic (or other GTK3 applications) over X-forwarding!

Mathew Hodson (mhodson)
tags: added: xenial
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

can you please test libepoxy from my ppa?
 https://launchpad.net/~costamagnagianfranco/+archive/ubuntu/locutusofborg-ppa

please report back results on bug: https://bugs.launchpad.net/ubuntu/+source/libepoxy/+bug/1647600

this is a duplicate bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.