Karaf
  1. Karaf
  2. KARAF-1377

Karaf crash on SLES 10 when running with 32-bit Java 6

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.2.6
    • Fix Version/s: None
    • Component/s: karaf-shell
    • Labels:
      None
    • Environment:

      SuSE Linux Enterprise Server 10.x
      Oracle Java 6 32-bit

      Description

      If you start Karaf on SLES 10.x with Java 6 32-bit, you will hit a server crash with the core dump like this:

      --------------- T H R E A D ---------------
      ...
      ...
      EBX=0xb770fff4
      0xb770fff4: <offset 0x1cff4> in /lib/ld-linux.so.2 at 0xb76f3000

      ECX=0x084063d0
      0x084063d0 is pointing to unknown location

      EDX=0x00000000
      0x00000000 is pointing to unknown location

      ESP=0xb6c4cc64
      0xb6c4cc64 is pointing into the stack for thread: 0x0805a000
      "main" prio=10 tid=0x0805a000 nid=0x23e6 runnable [0xb6c4d000]
      java.lang.Thread.State: RUNNABLE

      EBP=0xb6c4ccc0
      0xb6c4ccc0 is pointing into the stack for thread: 0x0805a000
      "main" prio=10 tid=0x0805a000 nid=0x23e6 runnable [0xb6c4d000]
      java.lang.Thread.State: RUNNABLE

      ESI=0x0840657c
      0x0840657c is pointing to unknown location

      EDI=0xb6c4cd4c
      0xb6c4cd4c is pointing into the stack for thread: 0x0805a000
      "main" prio=10 tid=0x0805a000 nid=0x23e6 runnable [0xb6c4d000]
      java.lang.Thread.State: RUNNABLE

      Top of Stack: (sp=0xb6c4cc64)
      ...
      ...

      Stack: [0xb6bff000,0xb6c50000], sp=0xb6c4cc64, free space=311k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      C [ld-linux.so.2+0x91fb]
      C [ld-linux.so.2+0x9587]
      C [ld-linux.so.2+0xac00]
      C [ld-linux.so.2+0x11481]
      C [ld-linux.so.2+0xd3a6]
      C [ld-linux.so.2+0x10cae]
      C [libdl.so.2+0xe8d]
      C [ld-linux.so.2+0xd3a6]
      C [libdl.so.2+0x133c]
      C [libdl.so.2+0xdc4] dlopen+0x44
      V [libjvm.so+0x371779]
      V [libjvm.so+0x2b8d09]
      C [libjava.so+0xbc4c] Java_java_lang_ClassLoader_00024NativeLibrary_load+0x6c
      j java.lang.ClassLoader$NativeLibrary.load(Ljava/lang/String;)V+0
      j java.lang.ClassLoader.loadLibrary0(Ljava/lang/Class;Ljava/io/File;)Z+300
      j java.lang.ClassLoader.loadLibrary(Ljava/lang/Class;Ljava/lang/String;Z)V+127
      j java.lang.Runtime.load0(Ljava/lang/Class;Ljava/lang/String;)V+57
      j java.lang.System.load(Ljava/lang/String;)V+7
      j org.fusesource.hawtjni.runtime.Library.load(Ljava/util/ArrayList;Ljava/io/File;)Z+4
      j org.fusesource.hawtjni.runtime.Library.doLoad()V+166
      j org.fusesource.hawtjni.runtime.Library.load()V+9
      j org.fusesource.jansi.internal.CLibrary.<clinit>()V+18
      v ~StubRoutines::call_stub
      V [libjvm.so+0x23f671]
      V [libjvm.so+0x375498]
      V [libjvm.so+0x23f49f]
      V [libjvm.so+0x21b3a1]
      V [libjvm.so+0x21a06e]
      V [libjvm.so+0x219568]
      V [libjvm.so+0x32050a]
      V [libjvm.so+0x31fc73]
      V [libjvm.so+0x236e08]
      j org.fusesource.jansi.AnsiConsole.wrapOutputStream(Ljava/io/OutputStream;)Ljava/io/OutputStream;+34
      j org.fusesource.jansi.AnsiConsole.<clinit>()V+13
      v ~StubRoutines::call_stub
      V [libjvm.so+0x23f671]
      V [libjvm.so+0x375498]
      V [libjvm.so+0x23f49f]
      V [libjvm.so+0x21b3a1]
      V [libjvm.so+0x21a06e]
      V [libjvm.so+0x219568]
      V [libjvm.so+0x3208bf]
      V [libjvm.so+0x32265f]
      V [libjvm.so+0x3223cc]
      V [libjvm.so+0x2381bb]
      j org.apache.karaf.shell.console.jline.Activator.start(Lorg/osgi/framework/BundleContext;)V+0

        Issue Links

          Activity

          Hide
          Forrest Xia added a comment -

          This problem happened when loading jansi native library on SLES 10.x, seems the library does not work under SLES 10.x. Tried on SLES 11.x, no this problem.

          Show
          Forrest Xia added a comment - This problem happened when loading jansi native library on SLES 10.x, seems the library does not work under SLES 10.x. Tried on SLES 11.x, no this problem.
          Hide
          Jean-Baptiste Onofré added a comment -

          Is it directly at Karaf startup (using bin/karaf script) or using the service wrapper ?

          Show
          Jean-Baptiste Onofré added a comment - Is it directly at Karaf startup (using bin/karaf script) or using the service wrapper ?
          Hide
          Forrest Xia added a comment -

          Both using bin/karaf and the service wrapper.

          Show
          Forrest Xia added a comment - Both using bin/karaf and the service wrapper.
          Hide
          Forrest Xia added a comment -

          Attached a crash log when using bin/karaf scripts for analysis.

          Show
          Forrest Xia added a comment - Attached a crash log when using bin/karaf scripts for analysis.
          Hide
          Kevan Miller added a comment -

          The problem seems to be caused by jansi-native. I built jansi-native on a SLES 10 32-bit box and it fixed the problem. I chatted with Hiram a bit on IRC. He said he built on CENT OS 5.2. He tested my .so on CENT OS and it works there... No idea what's causing the problem, but appears there's a way to avoid... Will require release for jansi-native and jline (if i understand the build, correctly).

          Show
          Kevan Miller added a comment - The problem seems to be caused by jansi-native. I built jansi-native on a SLES 10 32-bit box and it fixed the problem. I chatted with Hiram a bit on IRC. He said he built on CENT OS 5.2. He tested my .so on CENT OS and it works there... No idea what's causing the problem, but appears there's a way to avoid... Will require release for jansi-native and jline (if i understand the build, correctly).
          Hide
          Oliver Pajonk added a comment - - edited

          I hit the same bug today. I was able to fix it by replacing the libjansi.so included in Karaf console with the one advertised in this bugfix: http://www-01.ibm.com/support/docview.wss?uid=swg21592112&myns=swgws&mynp=OCSS6JMN&mync=R

          However, it would clearly be great if this could be included in one of the next Karaf releases.

          Show
          Oliver Pajonk added a comment - - edited I hit the same bug today. I was able to fix it by replacing the libjansi.so included in Karaf console with the one advertised in this bugfix: http://www-01.ibm.com/support/docview.wss?uid=swg21592112&myns=swgws&mynp=OCSS6JMN&mync=R However, it would clearly be great if this could be included in one of the next Karaf releases.
          Hide
          Jean-Baptiste Onofré added a comment -

          Thanks for the update guys. Let me check in Jansi to include/compile a correct so.

          Show
          Jean-Baptiste Onofré added a comment - Thanks for the update guys. Let me check in Jansi to include/compile a correct so.
          Hide
          Xin Wu added a comment -

          Hi,
          I've rebuilt the libjansi.so under /usr/local/lib, but it does not work at all. Are there any following steps after rebuild the jansi native? Thanks in advance.

          Show
          Xin Wu added a comment - Hi, I've rebuilt the libjansi.so under /usr/local/lib, but it does not work at all. Are there any following steps after rebuild the jansi native? Thanks in advance.
          Hide
          Freeman Fang added a comment -

          Hi,

          Put the libjansi.so you build yourself in $KARAF_HOME/data/tmp folder to replace the old one, this way your libjansi.so will take effect.

          Freeman

          Show
          Freeman Fang added a comment - Hi, Put the libjansi.so you build yourself in $KARAF_HOME/data/tmp folder to replace the old one, this way your libjansi.so will take effect. Freeman
          Hide
          Jean-Baptiste Onofré added a comment -

          It should work now with the jansi updated version.

          Show
          Jean-Baptiste Onofré added a comment - It should work now with the jansi updated version.

            People

            • Assignee:
              Unassigned
              Reporter:
              Forrest Xia
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development