Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 441878 - x11-libs/cairo-1.12.6, <x11-base/xorg-server-1.13.1 breaks gtk apps when using net-misc/nxserver-freenx or net-misc/x2goserver
Summary: x11-libs/cairo-1.12.6, <x11-base/xorg-server-1.13.1 breaks gtk apps when usin...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 1 vote (vote)
Assignee: Matt Turner
URL:
Whiteboard:
Keywords:
: 556380 556492 (view as bug list)
Depends on: 447454
Blocks: 508232
  Show dependency tree
 
Reported: 2012-11-05 13:51 UTC by Herbert Wantesh
Modified: 2017-02-26 00:29 UTC (History)
16 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Herbert Wantesh 2012-11-05 13:51:31 UTC
when i install cairo i get error like then when i try to start gtk apps when i use an freenx session:

###!!! ABORT: X_SendEvent: BadValue (integer parameter out of range for operation); 9 requests ago: file /tmp/portage/portage/www-client/firefox-16.0.2/work/mozilla-release/toolkit/xre/nsX11ErrorHandler.cpp, line 157
###!!! ABORT: X_SendEvent: BadValue (integer parameter out of range for operation); 9 requests ago: file /tmp/portage/portage/www-client/firefox-16.0.2/work/mozilla-release/toolkit/xre/nsX11ErrorHandler.cpp, line 157
Speicherzugriffsfehler
peter@tux ~ $ claws-mail 
The program 'claws-mail' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
  (Details: serial 125 error_code 2 request_code 25 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)


Reproducible: Always

Steps to Reproduce:
1.start nxclient
2.connect to host
3.start gtk app



downgrading to x11-libs/cairo-1.10.2-r2 solved the problem
Comment 1 Bernd Feige 2012-11-15 10:58:55 UTC
Same here. It also applies to x2goserver (x2go is the upstream for the current net-misc/nx-3.5.0.15). There's nx-3.5.0.16 available on http://code.x2go.org/releases/source/nx-libs/ but upgrading to it doesn't fix this problem.
Comment 2 Helmut Jarausch 2012-11-15 11:05:04 UTC
(In reply to comment #1)
> Same here. It also applies to x2goserver (x2go is the upstream for the
> current net-misc/nx-3.5.0.15). There's nx-3.5.0.16 available on
> http://code.x2go.org/releases/source/nx-libs/ but upgrading to it doesn't
> fix this problem.

I've also emerged (local overlay)
net-misc/x2goclient-3.99.3.0  and net-misc/x2goserver-3.1.1.6 .

It seemed to work, but I'm not sure which version of cairo was installed on the
client side. I'll have check this.

Helmut.
Comment 3 Helmut Jarausch 2012-11-15 18:36:37 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Same here. It also applies to x2goserver (x2go is the upstream for the
> > current net-misc/nx-3.5.0.15). There's nx-3.5.0.16 available on
> > http://code.x2go.org/releases/source/nx-libs/ but upgrading to it doesn't
> > fix this problem.
> 
> I've also emerged (local overlay)
> net-misc/x2goclient-3.99.3.0  and net-misc/x2goserver-3.1.1.6 .
> 
> It seemed to work, but I'm not sure which version of cairo was installed on
> the
> client side. I'll have check this.
> 
> Helmut.

Unfortunately, it does NOT work with cairo-1.12.6
Helmut.
Comment 4 Marko D 2012-11-22 06:16:01 UTC
Bug confirmed for xfce 4.10, using x2goclient. Both client and server are gentoo installs.
After launching xfce4-session using x2goclient, the desktop is rendered ok, but I can't click on anything except Application Menu. Clicking on Application Menu will freeze the session. No errors in xsession-errors, messages or X.log
If I use x2goclient to launch xterm and then invoke /usr/bin/xfce4-session from the xterm console I get the following error (on standard err):

(xfsettingsd:8375): xfsettingsd-CRITICAL **: Your XI is too old (1.3) version 1.4 is required.
...
The program 'xfce4-panel' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
  (Details: serial 931 error_code 2 request_code 25 minor_code 0)


eix xfce4-session shows

 xfce-base/xfce4-session
     Available versions:  4.10.0 (~)4.10.0-r1 {{consolekit debug gnome-keyring policykit udev +xscreensaver}}
     Installed versions:  4.10.0-r1(11:38:43 11/19/12)(consolekit gnome-keyring policykit udev xscreensaver -debug)

eix x2go shows 

[I] net-misc/x2goclient
     Available versions:  (~)3.0.1.18 (~)3.99.2.1 (~)3.99.2.2 (~)3.99.3.0 {{ldap}}
     Installed versions:  3.99.3.0(21:47:19 11/15/12)(-ldap)
     

[I] net-misc/x2goserver
     Available versions:  (~)3.1.0.1 (~)3.1.1.3 (~)3.1.1.4 (~)3.1.1.4-r1 (~)3.1.1.6 {{+fuse postgres +sqlite}}
     Installed versions:  3.1.1.6(22:09:46 11/15/12)(fuse sqlite -postgres)

eix x11-libs/cairo

[I] x11-libs/cairo
     Available versions:  1.8.10^t 1.10.2-r2^t 1.10.2-r3^t (~)1.12.2-r2^t (~)1.12.2-r3^t (~)1.12.2-r4^t (~)1.12.6^t (~)1.12.8^t **9999^t {{X aqua cleartype debug directfb doc drm gallium +glib lcdfilter legacy-drivers opengl openvg qt4 static-libs +svg xcb}}
     Installed versions:  1.12.8^t(21:45:46 11/15/12)(X glib opengl svg xcb -aqua -debug -directfb -doc -drm -gallium -legacy-drivers -openvg -qt4 -static-libs)



This seems to be related to
https://bugs.freedesktop.org/show_bug.cgi?id=47266

Also, as per https://bbs.archlinux.org/viewtopic.php?pid=1103190 , downgrading cairo is fixing the issue.
Comment 5 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-12-15 15:55:26 UTC
The fix is in xorg-server-1.13.1
Comment 6 Marko D 2013-01-09 12:07:46 UTC
Still present with xorg-server 1.13.1.901. Same as before.
Should I open another bug ?
Comment 7 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-01-09 13:49:39 UTC
Reopening.
Comment 8 Marko D 2013-01-11 18:26:47 UTC
Here is the relevant cairo bug entry:
https://bugs.freedesktop.org/show_bug.cgi?id=59173

and the mailing list disscution
http://thread.gmane.org/gmane.comp.lib.cairo/23411
Comment 9 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-07-18 12:19:58 UTC
cairo-1.12.14-r3[xcb] now uses xlib-xcb backend as suggested by http://thread.gmane.org/gmane.comp.lib.cairo/23137/focus=23412

Please check if the problem still exists with that version.
Comment 10 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-07-22 01:24:31 UTC
Due to rendering problems (bug 477444 and others), the xlib-xcb backend is optional in cairo-1.12.14-r4, Enable it by setting the xlib-xcb USE flag.
Comment 11 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-08-03 09:34:02 UTC
CC'ing nxserver-freenx maintainers

Can you verify the effect of USE="xlib-xcb" in cairo-1.12.14-r4 and adjust dependencies or elog messages accordingly?
Comment 12 Ben de Groot (RETIRED) gentoo-dev 2013-08-21 06:34:53 UTC
Maintainer time-out

+*nx-3.5.0.20-r1 (21 Aug 2013)
+
+  21 Aug 2013; Ben de Groot <yngwin@gentoo.org> +nx-3.5.0.20-r1.ebuild:
+  Non-maintainer commit, adding a warning about using cairo[xlib-xcb] when gtk
+  apps break, to fix bug #441878
Comment 13 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-08-21 14:59:08 UTC
Leaving this bug open so the maintainers can decide whether it is really fixed by the change to net-misc/nx.
Comment 14 Bernard Cafarelli gentoo-dev 2013-09-04 11:20:36 UTC
Thanks for handling this!

I kept the warning in latest nx version bump until someone can confirm (or not) the need for USE="xlib-xcb", my NX server (~amd64) runs fine on x2go, with GTK apps and without it though (nxserver-freenx should behave identically, but I need to test it)
Comment 15 Aidan Marks 2013-12-23 09:31:43 UTC
I had the rendering problem at some stage and backed out to cairo-1.10* for a long time.  I did a big system update including cairo-1.12.16, latest xorg.  nxserver-freenx is working fine with gtk apps.  There doesn't appear to be any rendering issues without xlib-xcb.
Comment 16 Fabio Scaccabarozzi 2014-04-08 15:20:57 UTC
Please, consider removing the flag entirely, or at least using DEPENDS on packages which the USE flag might affect to block it.
Aside the errors with the already mentioned packages, this breaks also virt-manager/virt-viewer/tightvnc/remmina.
Last friday I saw a cairo update, I was already using xcb as default use flag, and I noticed xlib-xcb was disabled. I decided to enable it to get the benefits. Two days later I needed virt-manager, and I noticed the VM console screen was unresponsive. Things were written on it, the VM did respond to some commands, but the screen would remain "snapshotted" to the first drawn image.
I assumed some virt-manager was the culprit, tried virt-viewer, tightvnc and remmina all to no avail. Screen snapshotted.
Recompiled whole @world to rule out possible problems with library linking, code breakage or similar, no change.
The problem was also finding some clues: nothing in libvirt log, nothing when virt-manager/viewer or remmina were started from commandline, I was totally blind.
It was by luck and by accident that I stumbled upon this bug, disabled xlib-xcb and everything went back to normal.
Happened with cairo 1.12.16, xorg-server 1.15.0.
I know blocking the USE on all packages would be cumbersome and removing it seems sort of an extreme approach, but the bug can hit a wide range of applications, possibly ones which the user might not expect. Add to this that the average desktop system has 800-1000+ packages installed, so the warning is very easy to miss, also due to the fact that cairo is a dependency, not (usually) a user-selected package.
Comment 17 Chí-Thanh Christopher Nguyễn gentoo-dev 2014-04-08 16:03:44 UTC
The xlib-xcb flag fixes problems for some users while it causes problems for others. Therefore it is optional and disabled by default. I don't think that changing this is a good idea at this point.
Comment 18 Octavian 2014-10-06 08:29:42 UTC
Maybe I should create a new bug report... there is a new nomachine server/client. Some instalationm intructions for Gentoo on their web-site.
https://www.nomachine.com/AR03L00789

Does it make sense to make a new ebuild?
Comment 19 Ian Stakenvicius (RETIRED) gentoo-dev 2015-07-23 18:30:11 UTC
for everyone's reference - firefox-39 (possibly all above 31.x) seem to not do well with xlib-xcb enabled on cairo - see bug 555600 for example.
Comment 20 Pacho Ramos gentoo-dev 2015-08-03 11:15:20 UTC
*** Bug 556492 has been marked as a duplicate of this bug. ***
Comment 21 Pacho Ramos gentoo-dev 2015-08-03 11:17:07 UTC
IMHO, it looks like enabling that USE flag causes more problems than disabling it, then, people should be warned (via ewarn messages) about this problems to ensure they enable the USE flag ONLY if they want to use the offending packages.

Also... are upstreams from packages needing to have xlib-xcb enabled aware of this issue?
Comment 22 Fabio Coatti 2015-08-03 11:30:13 UTC
Just to add another piece of information, a package that suffers from the xlib-xcb USE flag in cairo is libreoffice.

The symptom is that no presentation is shown when Hardware acceleration is enabled in impress.

Upstream bug: 

https://bugs.documentfoundation.org/show_bug.cgi?id=49165
Comment 23 Pacho Ramos gentoo-dev 2015-08-04 16:56:35 UTC
*** Bug 556380 has been marked as a duplicate of this bug. ***
Comment 24 Pacho Ramos gentoo-dev 2016-02-29 09:30:47 UTC
Is this still happening with recent cairo and NX versions? I mean, most distributions are not using xcb for cairo... but I cannot find any recent (newer than 2013) complaints about NX not working for them :/
Comment 25 Bernard Cafarelli gentoo-dev 2016-02-29 12:47:05 UTC
Here, comment 15 seems the most up-to-date (i.e with current versions everything is OK).

x2go works fine here for me with cairo-1.14.6[xcb,-xlib-xcb]
Comment 26 Bernd Feige 2016-02-29 13:01:02 UTC
(In reply to Bernard Cafarelli from comment #25)
> Here, comment 15 seems the most up-to-date (i.e with current versions
> everything is OK).
> 
> x2go works fine here for me with cairo-1.14.6[xcb,-xlib-xcb]

Exactly the same experience here. I've not had this problem for quite some time now.
Comment 27 Pacho Ramos gentoo-dev 2016-02-29 19:14:18 UTC
In that case, I would remove xlib-xcb USE flag completely to prevent people from having unexpected problems with a lot of random apps
Comment 28 Bernard Cafarelli gentoo-dev 2016-03-09 15:54:34 UTC
No problem either for polynomial-c, so it is definitely a +1 for me to drop this flag
Comment 29 Chí-Thanh Christopher Nguyễn gentoo-dev 2016-03-09 18:31:19 UTC
I would rather package.use.mask the flag than remove it. I am not fully sure about upstream plans, but it appears that they want to continue going forward with xlib-xcb.
Comment 30 Matt Turner gentoo-dev 2017-02-26 00:29:30 UTC
(In reply to Chí-Thanh Christopher Nguyễn from comment #17)
> The xlib-xcb flag fixes problems for some users while it causes problems for
> others. Therefore it is optional and disabled by default. I don't think that
> changing this is a good idea at this point.

Big citation needed.

I poked around, and I cannot find anything that enabling USE=xlib-xcb claims to fix. For posterity, here's what I found:

The ChangeLog for the original addition of the USE flag says:

> *cairo-1.12.14-r4 (22 Jul 2013)
>
>   22 Jul 2013; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
>   +cairo-1.12.14-r4.ebuild, metadata.xml:
>   Make xlib-xcb backend optional, this might address all of bugs #441878 #476306
>   #477444 and #477530. Also require gles2 or opengl for openvg, bug #447294.

In this bug alone, cited in that ChangeLog entry, we have reports of problems with x2goclient, nxserver-freenx, firefox, and libreoffice.

All of the cited bugs are fixed by *disabling* the xlib-xcb flag.

And since then we have an additional report of it breaking things (bug 508232).

Enough is enough...

I have removed the USE flag from the unstable 1.14.8 version as well as 9999, and package.use.mask'd it elsewhere:

commit da01c57e7db19e4aeeab5877ca15d873acbaed75
Author: Matt Turner <mattst88@gentoo.org>
Date:   Sat Feb 25 16:12:55 2017 -0800

    profiles: USE-mask xlib-xcb on x11-libs/cairo.


commit 7de1e4b63e45169100547609744aa4cd32ccdfb4
Author: Matt Turner <mattst88@gentoo.org>
Date:   Sat Feb 25 16:10:50 2017 -0800

    x11-libs/cairo: Drop USE=xlib-xcb flag from unstable versions.


(In reply to Chí-Thanh Christopher Nguyễn from comment #29)
> I would rather package.use.mask the flag than remove it. I am not fully sure
> about upstream plans, but it appears that they want to continue going
> forward with xlib-xcb.

I don't think you're really aware of the history of cairo development. There's a lot of unmaintained garbage in there.