We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › xcb lock error on linux
Page Index Toggle Pages: 1
xcb lock error on linux (Read 3995 times)
xcb lock error on linux
Dec 6th, 2007, 10:32am
 
i just updated my linux to fedora 8 and processing has stopped working giving the following error message:

java: xcb_xlib.c:50: xcb_xlib_unlock: Assertion `c->xlib.lock' failed.


it is not a problem with processing, but something with java and libxcb. i think a few other distros are also affected by this problem.

i managed to make processing work by using a workaround and patching processing-0135/java/lib/i386/xawt/libmawt.so with

sed -i 's/XINERAMA/FAKEEXT/g' libmawt.so


this works, but sketches using the opengl library give the same error as above. has anyone encountered this problem? any help would be appreciated.





Re: xcb lock error on linux
Reply #1 - Dec 8th, 2007, 11:01am
 
i found a workaround which makes opengl work. i updated libxcb 1.1 from the development repository (yum --enablerepo=development update libxcb on fc8). and i put  export LIBXCB_ALLOW_SLOPPY_LOCK=1 in the processing startup script. with this solution the sed workaround is not needed. processing and opengl sketches work, although a lot of warnings are displayed on the console while running:

Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb7f0e777]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xb7f0e8d1]
#2 /usr/lib/libX11.so.6(_XReply+0xff) [0x97712f]
#3 processing-0135/libraries/opengl/library/libjogl.so(XineramaQueryScreens+0xd1) [0x8c57a487]
#4 processing-0135/libraries/opengl/library/libjogl.so(XineramaEnabled+0x5f) [0x8c5c16b3]
#5 processing-0135/libraries/opengl/library/libjogl.so(Java_com_sun_opengl_impl_x11
_GLX_XineramaEnabled__J+0x2a) [0x8c57c7c9]
#6 [0xb196d898]
#7 [0xb1967a13]
#8 [0xb1967a13]
#9 [0xb1967a94]
#10 [0xb1967b6b]
#11 [0xb1967b6b]
#12 [0xb1967b6b]
#13 [0xb1967b6b]
#14 [0xb1967b6b]
#15 [0xb1967b6b]
#16 [0xb1965236]
#17 processing-0135/java/lib/i386/server/libjvm.so [0xb7795d7c]
#18 processing-0135/java/lib/i386/server/libjvm.so [0xb7965618]
#19 processing-0135/java/lib/i386/server/libjvm.so [0xb7795baf]

Re: xcb lock error on linux
Reply #2 - Mar 5th, 2008, 4:41pm
 
libxcb cannot be found with apt-get unfortunately and yum is quite picky on hardy (8.04). Is there any workaround for Ubuntu 8.04 (Hardy)? Help would be greatly appreciated.
Re: xcb lock error on linux
Reply #3 - May 6th, 2008, 7:30pm
 
Hi

I'm using Hardy and get the following warnings on the console when I run a sketch.

1.  Does this relate to the xcb lock error mentioned above?
2.  Is it something I should be concerned about?
3.  Is there a work around / fix available?

Cheers

Luke

-----

luke@jed:~$ cd /home/luke/bin/processing-0135/
luke@jed:~/bin/processing-0135$ ./processing
Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb1f0c767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xb1f0c8b1]
#2 /usr/lib/libX11.so.6(_XReply+0xfd) [0xb1f4e1bd]
#3 /home/luke/bin/processing-0135/java/lib/i386/xawt/libmawt.so [0xb2048d7e]
#4 /home/luke/bin/processing-0135/java/lib/i386/xawt/libmawt.so [0xb2032d47]
#5 /home/luke/bin/processing-0135/java/lib/i386/xawt/libmawt.so [0xb2032ec3]
#6 /home/luke/bin/processing-0135/java/lib/i386/xawt/libmawt.so(Java_sun_awt_X11Gra
phicsEnvironment_initDisplay+0x26) [0xb2033106]
#7 [0xb2aa0bfa]
#8 [0xb2a9ab3b]
#9 [0xb2a9ab3b]
#10 [0xb2a98219]
#11 /home/luke/bin/processing-0135/java/lib/i386/client/libjvm.so [0xb782919c]
#12 /home/luke/bin/processing-0135/java/lib/i386/client/libjvm.so [0xb793db38]
#13 /home/luke/bin/processing-0135/java/lib/i386/client/libjvm.so [0xb7828fcf]
#14 /home/luke/bin/processing-0135/java/lib/i386/client/libjvm.so(JVM_DoPrivileged+0
x32d) [0xb7886a7d]
#15 /home/luke/bin/processing-0135/java/lib/i386/libjava.so(Java_java_security_Acces
sController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb762830d]
#16 [0xb2aa04ab]
#17 [0xb2a9aa64]
#18 [0xb2a98219]
#19 /home/luke/bin/processing-0135/java/lib/i386/client/libjvm.so [0xb782919c]
Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb1f0c767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x2e) [0xb1f0c81e]
#2 /usr/lib/libX11.so.6 [0xb1f4d518]
#3 /usr/lib/libX11.so.6(XGetVisualInfo+0x26) [0xb1f440a6]
#4 /home/luke/bin/processing-0135/java/lib/i386/xawt/libmawt.so [0xb2032089]
#5 /home/luke/bin/processing-0135/java/lib/i386/xawt/libmawt.so [0xb20322d3]
#6 /home/luke/bin/processing-0135/java/lib/i386/xawt/libmawt.so [0xb2032f71]
#7 /home/luke/bin/processing-0135/java/lib/i386/xawt/libmawt.so(Java_sun_awt_X11Gra
phicsEnvironment_initDisplay+0x26) [0xb2033106]
#8 [0xb2aa0bfa]
#9 [0xb2a9ab3b]
#10 [0xb2a9ab3b]
#11 [0xb2a98219]
#12 /home/luke/bin/processing-0135/java/lib/i386/client/libjvm.so [0xb782919c]
#13 /home/luke/bin/processing-0135/java/lib/i386/client/libjvm.so [0xb793db38]
#14 /home/luke/bin/processing-0135/java/lib/i386/client/libjvm.so [0xb7828fcf]
#15 /home/luke/bin/processing-0135/java/lib/i386/client/libjvm.so(JVM_DoPrivileged+0
x32d) [0xb7886a7d]
#16 /home/luke/bin/processing-0135/java/lib/i386/libjava.so(Java_java_security_Acces
sController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb762830d]
#17 [0xb2aa04ab]
#18 [0xb2a9aa64]
#19 [0xb2a98219]
/usr/share/themes/Xfce-dusk/gtk-2.0/gtkrc:11: Failed to parse property value " out " for `GtkMenuBar::shadow-type'
/usr/share/themes/Xfce-dusk/gtk-2.0/gtkrc:12: Failed to parse property value " out " for `GtkHandleBox::shadow-type'
/usr/share/themes/Xfce-dusk/gtk-2.0/gtkrc:24: Failed to parse property value " out " for `GtkToolbar::shadow-type'
/usr/share/themes/Xfce-dusk/gtk-2.0/gtkrc:71: Engine "xfce" is unsupported, ignoring
/usr/share/themes/Xfce-dusk/gtk-2.0/gtkrc:103: Engine "xfce" is unsupported, ignoring
/usr/share/themes/Xfce-dusk/gtk-2.0/gtkrc:131: Engine "xfce" is unsupported, ignoring
Re: xcb lock error on linux
Reply #4 - Jun 22nd, 2008, 7:18pm
 
I think I've found a decent workaround for ubuntu now, but I have no idea what's actually wrong tbh. I've posted my workaround to the 'ubuntu installation thread', and posted all the remaining details here.

Fyi, Ubuntu install thread is here:
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Integrate;action=display;num=1210090496;start=15

It appears there are several commonly occuring java-related bugs associated with 'xcb locks', whatever they are! And likely aren't restricted to the official Sun runtime. Whilst looking for a solution to this I discovered that glxgears was dying on exit, as described in this bug report:

https://bugs.launchpad.net/ubuntu/+source/xcb/+bug/91077

I fixed that problem by uninstalling the 'OpenJava' runtime.

Sun has an extensive thread on the subject here, fairly little of which I care to understand, but it was  informative all the same:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6532373

Two other threads with useful workaround info on the problem are these:

"Java problems after upgrade"
http://ubuntuforums.org/showthread.php?t=816018&highlight=xcb

and, "Cannot start matlab..."
https://answers.launchpad.net/ubuntu/+question/26562

Anyway, I believe the lock problem doesn't occur with the latest install of java-6-sun-1.6.0.06 but processing doesn't use this version. It ships with it's own runtime - 1.5 by the looks of things. This runtime does appear to do 'the bad thing' whatever that may be. Simply renaming the directory and creating a link to the ubuntu installed version works for me (/usr/lib/jvm/java-6-sun-1.6.0.06/).

Painful Wink

Cheers,
Sam
Re: xcb lock error on linux
Reply #5 - Jun 22nd, 2008, 7:48pm
 
Actually, it only partly works, so I'll hold off on posting a how-to to the installation thread!

The opengl examples in the '3d and opengl' folder don't run, firing this exception:

java.lang.UnsatisfiedLinkError: /self-installed/processing-0135/libraries/opengl/library/libjogl_drihack.so: /self-installed/processing-0135/libraries/opengl/library/libjogl_drihack.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)

at java.lang.ClassLoader$NativeLibrary.load(Native Method)

at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)

at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)

at java.lang.Runtime.loadLibrary0(Runtime.java:823)

at java.lang.System.loadLibrary(System.java:1030)

at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(NativeLibLoader.ja
va:78)

java.lang.RuntimeException: /self-installed/processing-0135/libraries/opengl/library/libjogl_drihack.so: /self-installed/processing-0135/libraries/opengl/library/libjogl_drihack.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)

at processing.core.PApplet.createGraphics(PApplet.java:1235)

at processing.core.PApplet.size(PApplet.java:1015)

at processing.core.PApplet.size(PApplet.java:959)

at Temporary_7569_3202.setup(Temporary_7569_3202.java:26)

at processing.core.PApplet.handleDisplay(PApplet.java:1390)

at processing.core.PGraphics.requestDisplay(PGraphics.java:690)

at processing.core.PApplet.run(PApplet.java:1562)

at java.lang.Thread.run(Thread.java:619)

I'd guess that by swapping out the runtime I've made the libraries incompatible in some way?

This has all the hallmarks of a long, deep burrow so I'm likely going to back out and settle for P3D support for now!

That is, of course, unless anyone has any ideas?

Cheers,
Sam

Re: xcb lock error on linux
Reply #6 - Sep 22nd, 2008, 12:19am
 
This error still exists. Am I to take it that Processing DOES NOT run on LINUX? That's a shame.
Re: xcb lock error on linux
Reply #7 - Sep 22nd, 2008, 3:18am
 
robin746 wrote on Sep 22nd, 2008, 12:19am:
This error still exists. Am I to take it that Processing DOES NOT run on LINUX That's a shame.

No, it just means that you NEED TO install a better version of Java for your platform, as described in the LINUX reference:
http://processing.org/reference/environment/platforms.html#linux

We simply cannot support every version of Linux, or every machine configuration. Nor can we be responsible for bugs in someone else's Java virtual machine implementation.
Re: xcb lock error on linux
Reply #8 - Sep 22nd, 2008, 4:02pm
 
i think sam's second problem was missing / not found jogl-drihack libraries rather than his (her?) base java installation (which he (she?) points out is sun's java 6)

processing works on linux, i use nothing else...
Re: xcb lock error on linux
Reply #9 - Sep 22nd, 2008, 6:21pm
 
I should point out that I did this with build 136, and will try it again with the latest build when I get home. I did try the latest build out-of-the-box without any success but will re-create the symlinks and try again. I have no idea how to go about resolving the jogl issue if that's still a problem though.

Koogs - what distro/configuration are you using to get Processing working? Does this include opengl? I'd be tempted to switch if there is *a* distro out there that just works.

(btw Samuel is my full name Smiley).

Cheers,
Sam
Re: xcb lock error on linux
Reply #10 - Sep 23rd, 2008, 11:21am
 
SamMartin wrote on Sep 22nd, 2008, 6:21pm:
Koogs - what distro/configuration are you using to get Processing working Does this include opengl I'd be tempted to switch if there is *a* distro out there that just works.


fedora 9 with sun java 6. with opengl, yes. don't think your problem is a linux problem but a java problem, classpaths or jars or something. using sun's java is the important thing.

this: "wrong ELF class: ELFCLASS32" would suggest you may be using a 64 bit distro but 32 bit jogl libraries. if so then i think you can get 64 but jogl libraries from sun.

that said, i did have the 'GLDrawableFactory.chooseGraphicsConfiguration()' problem with 148 and went back to 13(something)

this problem: http://processing.org/discourse/yabb_beta/YaBB.cgi?num=1219366294

apologies about the name confusion 8)
Re: xcb lock error on linux
Reply #11 - Oct 15th, 2008, 5:28pm
 
now tracking here:
http://dev.processing.org/bugs/show_bug.cgi?id=950
Page Index Toggle Pages: 1