Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1568545 - GTK+ on Xvfb without mesa-dri-drivers crashes immediately
Summary: GTK+ on Xvfb without mesa-dri-drivers crashes immediately
Alias: None
Product: Fedora
Classification: Fedora
Component: libxcb
Version: 29
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Adam Jackson
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2018-04-17 17:48 UTC by Benjamin Berg
Modified: 2019-11-27 19:00 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-11-27 19:00:07 UTC
Type: Bug

Attachments (Terms of Use)

Description Benjamin Berg 2018-04-17 17:48:47 UTC
Description of problem:

On the (GNOME) CI infrastructure I tried running a test requiring GTK without mesa-dri-drivers installed. The result was a crash during gtk_init which was rather unexpected.

This is obviously a rather odd bug to hit, and the workaround is quite simple. A slightly more graceful failure mode would be nice though :)

(gdb) bt
#0  0x00007fffe9b7a874 in xcb_glx_query_server_string_string_length () at /lib64/libxcb-glx.so.0
#1  0x00007fffeabf6f99 in __glXQueryServerString () at /lib64/libGLX_indirect.so.0
#2  0x00007fffeabf4b93 in __glXInitialize () at /lib64/libGLX_indirect.so.0
#3  0x00007fffeabf0304 in GetGLXPrivScreenConfig () at /lib64/libGLX_indirect.so.0
#4  0x00007fffeabf0c85 in glXQueryServerString () at /lib64/libGLX_indirect.so.0
#5  0x00007ffff2be2bbd in epoxy_glx_version () at /lib64/libepoxy.so.0
#6  0x00007ffff43a5e6c in gdk_x11_screen_init_gl () at /lib64/libgdk-3.so.0
#7  0x00007ffff43a6216 in _gdk_x11_screen_update_visuals_for_gl () at /lib64/libgdk-3.so.0
#8  0x00007ffff43aed88 in _gdk_x11_screen_init_visuals () at /lib64/libgdk-3.so.0
#9  0x00007ffff43abefd in _gdk_x11_screen_new () at /lib64/libgdk-3.so.0
#10 0x00007ffff439c091 in _gdk_x11_display_open () at /lib64/libgdk-3.so.0
#11 0x00007ffff436fd35 in gdk_display_manager_open_display () at /lib64/libgdk-3.so.0
#12 0x00007ffff6de9652 in gtk_init_check () at /lib64/libgtk-3.so.0
#13 0x00007ffff6de968d in gtk_init () at /lib64/libgtk-3.so.0
#14 0x00007ffff6ea3763 in gtk_test_init () at /lib64/libgtk-3.so.0
#15 0x0000000000414fff in main (argc=1, argv=0x7fffffffe558) at ../tests/network/test-network-panel.c:321

Comment 1 Adam Jackson 2018-04-17 21:26:07 UTC
Just jotting down some notes for myself, since it was a bit hard to see how we got here:

If mesa-dri-drivers isn't present, xserver will try to initialize GLX for the screen, but fail to actually do so. However by that point we've already registered the extension, so the client library will bang ahead and try to set it up. When it sends the QueryServerString request, vnd will try to find a vendor for the screen, fail, and throw BadMatch. From xcb's perspective that looks like a null reply and an error, but we parse that null reply expecting it to be non-null, and boom.

Probably this wants a belt-and-suspenders fix. Mesa shouldn't crash if this happens, which means the xcb_glx_query_blah bits should be more careful about errors. But also, xserver should probably delay actually registering the GLX extension (from the protocol perspective) until it's sure there's at least one real GLX screen.

Comment 2 Jan Kurik 2018-08-14 10:06:33 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 3 Ben Cotton 2019-10-31 20:54:05 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Ben Cotton 2019-11-27 19:00:07 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.