_XGetXCBBuffer, Locking assertion failure, libxcb-xlib.so.0

Frequently asked questions - Please read before posting!

_XGetXCBBuffer, Locking assertion failure, libxcb-xlib.so.0

Postby tuxx-home.at » Mon May 26, 2008 10:28 pm

Applies To:

All P-series cards (Millenium P650, P690, P750, Parhelia, APVe, QID, ...) using the
mtx driver set.

Description:

If you see the following (or a similar) error when running OpenGL applications, this FAQ entry applies to you:

Code: Select all
root@user-desktop:~/glx# glxinfo
name of display: :0.0
Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb773a767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xb773a8b1]
#2 /usr/lib/libX11.so.6(_XReply+0xfd) [0xb78c61bd]
#3 /usr/lib/libGL.so.1 [0xb7d9322b]
#4 /usr/lib/libGL.so.1 [0xb7d9287a]
Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb773a767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x2e) [0xb773a81e]
#2 /usr/lib/libX11.so.6 [0xb78c5518]
#3 /usr/lib/libX11.so.6(XGetVisualInfo+0x26) [0xb78bc0a6]
#4 /usr/lib/libGL.so.1 [0xb7d92db1]
glxinfo: ../../src/xcb_lock.c:77: _XGetXCBBuffer: Assertion `((int) ((xcb_req) - (dpy->request)) >= 0)' failed.
Aborted
root@user-desktop:~/glx#


Symptoms:

OpenGL applications don't work.

Solution:

On older versions of libxcb-xlib, the error message might be a little bit different and
a workaround would be to export an environment variable allowing for so called "sloppy locks".

To see if your version of libxcb supports this workaround, try to run `glxinfo` or `glxgears`
with the following command line:

Code: Select all
$ LIBXCB_ALLOW_SLOPPY_LOCK=1 glxinfo


If that cures your problem, you might want to add the following line to /etc/profile or /etc/profile.local
on your system:

Code: Select all
export LIBXCB_ALLOW_SLOPPY_LOCK=1


If your version of libxcb-xlib is newer (f.ex. v1.1-1ubuntu1, which is the version installed on Ubuntu 8.04 by
default) the above mentionend workaround can't be applied onto your system.

The reason for this is, that the xcb library on your system doesn't really contain this workaround anymore (it
has been compiled with the NDEBUG flag set which disables this workaround).
Compiling the library on your own with proper compiler options enables the workaround again, but doesn't
get you further, because the last error message in the above shown output still persists.

Besides that, the xcb library is currently strongly rewritten to be more thread safe and that's the main cause
why your OpenGL applications don't work anymore.

To get things clear: This is _NOT_ a Bug in libxcb nor is it a bug in Ubuntu or any other modern distribution,
it's a bug in the calling application and in terms of the Matrox drivers, the OpenGL library (libGL.so.1) which
is only distributed in binary format and without sources is too old and therefore incompatible with the latest
libxcb changes.

As I'm currently having only limited access to my Parhelia box (via SSH), I can't say if the following solution
really works, but I get no error messages anymore when using this approach, so please tell me if it works
for you.

To get OpenGL support back on your system, you need to downgrade libx11-6 (the name of the package
might vary depending on your distribution).

For Ubuntu 8.0.4 (hardy), install the version from 7.10 (gutsy) by downloading the appropriate package from
the following location:

[http://packages.ubuntu.com/gutsy/i386/libx11-6/download]

For OpenSuSE 10.3, install the version from 10.2 by downloading the appropriate package from
the following location:

[http://download.opensuse.org/distribution/10.2/repo/oss/suse/i586/]

For all Mandriva 2008.1 users:
Downgrade libx11_6-1.1.3-6mdv2008.1 to libx11_6-1.1.3-2mdv2008.0 from Mandriva 2008.0. The
older libX11 package can be found on one of the Mandriva mirrors, f.ex. here:

[ftp://gd.tuwien.ac.at/pub/linux/Mandrakelinux/official/2008.0/i586/media/main/release/libx11-common-1.1.3-2mdv2008.0.i586.rpm]



and you'll have OpenGL working again.


For all other distributions, check what package provides the library "/usr/lib/libX11.so.6" and downgrade to the
previous version.

After downloading, you can install this package manually with the help of dpkg (as root user or using sudo):

Code: Select all
# Ubuntu and maybe other Debian based systems
dpkg -i libx11-6_1.1.1-1ubuntu4_i386.deb

# OpenSUSE
rpm -U --nodeps --force xorg-x11-libX11-7.2-13.i586.rpm

# Mandriva 2008.1
rpm -U --force libx11_6-1.1.3-2mdv2008.0.i586.rpm


Now try to rerun your OpenGL application, it should work now (you might need to restart the X server for
the changes to take effect).

Please note: With the next systemupdate, the newer version of libx11-6 will be installed again automatically.
To avoid this, you might want to set this package to "hold" so that it won't be updated automatically.

For Debian based systems (including Ubuntu), use the following instructions:

First, check the state of this package (it should show "install" by default):

Code: Select all
# dpkg --get-selections | grep libx11-6
libx11-6                                        install


Now set it to "hold" with the help of `dpkg`:

Code: Select all
echo "libx11-6 hold" | dpkg --set-selections


If you run the command to check the state again, it should now show "hold".

For rpm based distributions I don't know a general way to set the package to hold. If you know,
please tell me so I can add this information to this FAQ.

For OpenSuse, follow these instructions:
1. Open yast2
2. Go to "Software" -> "Software Management"
3. Search for the package "xorg-x11-libX11" and select it
4. Press "!" or go to "Actions" and select "Taboo Yes"

The status of this package should now show "-i-" which means that it won't be upgraded automatically.

Please note that this is only a temporary solution which might not work in the future anymore when
the "old" libX11 package is incompatible with future X Server versions.

Update 2008-06-19: This problem finally hit Debian unstable, libx11-6 was upgraded there too, so follow the above mentioned steps for Ubuntu (but use packages.debian.org instead of packages.ubuntu.com).
User avatar
tuxx-home.at
Supreme Commander
Supreme Commander
 
Posts: 2199
Joined: Mon Jan 01, 2007 12:51 pm
Location: Vassach - Austria - Europe

Return to FAQ

Who is online

Users browsing this forum: No registered users and 2 guests

cron