FS#10162 - jre broken

Attached to Project: Arch Linux
Opened by marco (domanov) - Saturday, 12 April 2008, 02:59 GMT
Last edited by Eduardo Romero (kensai) - Wednesday, 09 July 2008, 22:24 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jason Chu (jason)
Eduardo Romero (kensai)
Architecture i686
Severity Medium
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

The Java Runtime Enviroment needs an obscure though crucial fix in order to run jar apps (I only tested with jabref and a couple of other custom applications). As described in http://bbs.archlinux.org/viewtopic.php?pid=354430 , the automagical hack needed is:

sed -i 's/XINERAMA/FAKEEXTN/g' /opt/java/jre/lib/i386/xawt/libmawt.so

I didn't check other architecture than i686. The same bug (with same fix) appeared also at least in jre 6u3-2.

Additional info:
* package version(s)
jre 6u3-2 and jre 6u5-1

* config and/or log files etc.

Steps to reproduce:

pacman -Sy jre
and then launch a jar app (I only tested with jabref)
$ /opt/java/jre/bin/java -jar PATH/TO/JabRef-2.3.1.jar

$ Locking assertion failure. Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb7d3e767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xb7d3e8b1]
#2 /usr/lib/libX11.so.6(_XReply+0xfd) [0xb533ca8d]
#3 /opt/java/jre/lib/i386/xawt/libmawt.so [0xb544e8ce]
#4 /opt/java/jre/lib/i386/xawt/libmawt.so [0xb542b067]
#5 /opt/java/jre/lib/i386/xawt/libmawt.so [0xb542b318]
#6 /opt/java/jre/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x2f) [0xb542b61f]
#7 [0xb5d05bfd]
#8 [0xb5cfee6d]
#9 [0xb5cfee6d]
#10 [0xb5cfc22c]
#11 /opt/java/jre/lib/i386/client/libjvm.so [0x621c40d]
#12 /opt/java/jre/lib/i386/client/libjvm.so [0x6310378]
#13 /opt/java/jre/lib/i386/client/libjvm.so [0x621c2a0]
#14 /opt/java/jre/lib/i386/client/libjvm.so(JVM_DoPrivileged+0x363) [0x6272153]
#15 /opt/java/jre/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb7d1796d]
#16 [0xb5d05bfd]
#17 [0xb5cfed23]
#18 [0xb5cfc22c]
#19 /opt/java/jre/lib/i386/client/libjvm.so [0x621c40d]
java: xcb_xlib.c:82: xcb_xlib_unlock: Assertion `c->xlib.lock' failed.


This task depends upon

Closed by  Eduardo Romero (kensai)
Wednesday, 09 July 2008, 22:24 GMT
Reason for closing:  Fixed
Additional comments about closing:  This time is truly fixed, don't you dare reopne this again. :-D
Comment by Jan de Groot (JGC) - Saturday, 12 April 2008, 09:48 GMT
From /etc/profile.d/xorg.sh:
# temporarily loosen restrictions in libxcb to get java
# application involving X to work.
export LIBXCB_ALLOW_SLOPPY_LOCK=true

This should fix your java and any application that is broken. We won't fix this in java, as your hack is obviously not a clean hack (patching a binary never is a clean hack), this should be fixed upstream at sun.
Comment by marco (domanov) - Saturday, 12 April 2008, 14:26 GMT
I tried this, but it didn't fix the problem. I really had to apply the sed substitution to smoothly run Java apps.
Comment by Jan de Groot (JGC) - Saturday, 12 April 2008, 14:50 GMT
Did you try exporting the variable and starting the java application from the same terminal? These /etc/profile.d files are only sourced on logon.
Comment by marco (domanov) - Saturday, 12 April 2008, 17:55 GMT
Of course I did. I'm not "that" newbie ;)
In effect exporting this environment variable had an effect, in the sense that jabref started, but it was not usable: windows parts were missing, popups had no text, and still some traceback in standard error. After the "sed" fix -which is not mine, of course-, everything run smoothly even with no exported 'LIBXCB_ALLOW_SLOPPY_LOCK=true'.
Comment by Jan de Groot (JGC) - Thursday, 24 April 2008, 21:40 GMT
Should be fixed with java 6.0u6, the official changelog states that this bug is fixed now.
Comment by Joseph Kern (timetrap) - Saturday, 05 July 2008, 05:42 GMT
After updating to jre 6u6-1 through pacman, there are still many references to XINERAMA in the file /opt/java/jre/lib/i386/xawt/libmawt.so

Comment by Greg (dolby) - Saturday, 05 July 2008, 05:43 GMT
Additionally in regards to killing /opt shouldnt jre move to /usr at some point?
Comment by Jan de Groot (JGC) - Saturday, 05 July 2008, 09:12 GMT
This bug is marked as fixed in the changelogs, but it isn't. This is also confirmed in the upstream bugreport. The only real option to fix this bug is to compile java from source, which means OpenJDK/icedTea. I'll start hacking on a package for that next week to see how that one works.
Comment by Eduardo Romero (kensai) - Wednesday, 09 July 2008, 02:31 GMT
OK, finally got this fixed on the jre and jdk 6u7 package I'm going to upload overnight, so JGC, no need to do the OpenJDK/IcedTea package. Take that time off, as vacations. :-D Joking aside, I will close this bug tomorrow morning.
Comment by Joseph Kern (timetrap) - Wednesday, 09 July 2008, 11:46 GMT
I am using jabref also, there are no xcb_xlib errors, but now there is only a blank window displayed.
Comment by Greg (dolby) - Wednesday, 09 July 2008, 12:06 GMT
With jdk 6u7-1 ?
Comment by Joseph Kern (timetrap) - Wednesday, 09 July 2008, 12:34 GMT
Yes, sorry for not mentioning that. I ran pacman -Syu, updated to jre6u7, then ran jabref, rebooted (just in case). Then I got the blank window.

Comment by Eduardo Romero (kensai) - Wednesday, 09 July 2008, 13:57 GMT
OK, this is what happen for me, it opens, and then I am presented with a normal window that has the File -> Tools and other menus on top, aren't you supposed to open a database or something for it to work? I mean in my case I see the application is functional.
Comment by Joseph Kern (timetrap) - Wednesday, 09 July 2008, 21:59 GMT
. . . Looks like my "awesome" tiling window manager ate the title bar, mark the bug closed.

Loading...