2

I have multiple Solaris 10 hosts all working and running correctly with Java 7. I cannot get any flavor of Java 8 to work with my application or other java applications I have on the host.

It fails at startup and writes a Fatal error log. The hs_err_pid* file indicates the crash happened outside of the Java Virtual Machine in native code and it points to the libXi.so.5 library XListInputDevices method.

I have found a few (very few) mentions of this on the internet and most of them indicate this problem is over 5 years old - but I have not found any solutions and the bugs that reference this are still open and inactive. This tells me that someone is using Java 8 on Solaris 10 (sparc) so there has to be hope.

Any suggestions?

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0xa) at pc=0xfffffffec8c05264, pid=24057, tid=0x0000000000000003
#
# JRE version: Java(TM) SE Runtime Environment (8.0_131-b11) (build 1.8.0_131-b11)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.131-b11 mixed mode solaris-sparc compressed oops)
# Problematic frame:
# C  [libXi.so.5+0x5264]  XListInputDevices+0x3c8
#
# Core dump written. Default location: /opt/cds/dataSyncPlus_1.2.2b/bin/core or core.24057
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
...

Stack: [0xffffffff7ab00000,0xffffffff7ac00000],  sp=0xffffffff7abfd160,  free space=1012k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libXi.so.5+0x5264]  XListInputDevices+0x3c8
C  [libawt_xawt.so+0x301b8]  getNumButtons+0x60
C  [libawt_xawt.so+0x3012c]  Java_sun_awt_X11_XToolkit_getNumberOfButtonsImpl+0x3c
j  sun.awt.X11.XToolkit.getNumberOfButtonsImpl()I+0
j  sun.awt.X11.XToolkit.getNumberOfButtonsImpl()I+0
j  sun.awt.X11.XToolkit.getNumberOfButtons()I+10
j  sun.awt.X11.XToolkit.initializeDesktopProperties()V+102
j  java.awt.Toolkit.getDesktopProperty(Ljava/lang/String;)Ljava/lang/Object;+32
j  sun.swing.SwingUtilities2$AATextInfo.getAATextInfo(Z)Lsun/swing/SwingUtilities2$AATextInfo;+11
j  javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(Ljavax/swing/UIDefaults;)V+12062

...

Update:

My Solaris hosts are racked and I always run via SSH from a terminal at my desk. As I said, this works fine for JAVA 7 and everything else I do. For a test I went to the server and tried this from the KVM connected directly to the host and JAVA 8 worked fine. So, not that this should surprise anyone based on the library that failing, but this is indeed an X related issue.

I am not sure how this additional information helps me.

garneke
  • 35
  • 6
  • Are all libraries compatibles with Java 8? – Oussama Ben Ghorbel Apr 27 '17 at 21:13
  • To be honest, I am not sure how I could tell. I would have expected that Java would need to be compatible with the OS libraries, not the other way around. – garneke Apr 28 '17 at 13:13
  • Do you get a core file? If so, what's the output from `pmap core`? That will show the process address space along with what shared objects are linked into the process. Also, the process environment variables could be helpful too, especially any of the `LD_LIBRARY_PATH[_32|_64]` and/or `LD_PRELOAD[_32|_64]` variations. The easiest way to get all the environment variables from a core file is `strings -a core | grep =` and then manually filtering out the garbage. – Andrew Henle Apr 28 '17 at 13:27
  • Wow, I had a brain fart this time. I wrote "coredump" when in fact the OS is fine - Java just crashes with its Fatal Error Log. Sorry for confusing the issue, not sure how to remedy this one ( don't suppose I can edit the title of this post ). – garneke Apr 28 '17 at 14:51
  • Google searching "XListInputDevices+0x3c8" gave me https://bugs.openjdk.java.net/browse/JDK-7001082 –  Apr 28 '17 at 15:03
  • @RC Yes thanks. I found those as well and they are unresolved bugs that indicate the problem has existed for a long time. They appear to be stalled and do not have anyone actively working on them. – garneke Apr 28 '17 at 15:20

2 Answers2

3

This looks like the stack trace reported in the Solaris 10 libXi under Oracle Bug 17750760, which should be fixed by installing Solaris 10 patch #119059-69 (SPARC) or #119060-68 (x86) or later.

alanc
  • 4,102
  • 21
  • 24
1

This is a bug in Java, which is known issue https://bugs.openjdk.java.net/browse/JDK-7028364 it is still in open state.If you are using -d64in vm arguments remove and try again.

Fairoz
  • 1,616
  • 13
  • 16
  • @Farioz - thanks yes I know. It has been an open bug for over 5 years and unfortunately I cannot run without the 64 bit flag. I assume it does work for someone though or this bug would not be soo old. I am going to update my Solaris 10 installation and hope that alanc is correct that it has been corrected within Solaris. – garneke Apr 28 '17 at 18:26