JNI CRASHES

hi
i imported some java classes using JAVA IMPORTER.
but when i try to call any method in these imported classes, the client session crashes immediately.
please let me know if anyone has something
regards

Right, I think this is a free threaded issue to do with the VB IDE. I've had something similar when using the ActiveX bridge. Don't think you can get around this easily. You could try temporarily packaging the COM code as a COM exe, thus forcing it into its own process.
Dom.

Similar Messages

  • JNI crash sockets

    I am trying to write a Java library around a piece of hardware that currently does not support Java. As the first part of the task, I need to establish a TCP/IP connection between a client and server. I wrote some test code in C that is very simple socket code that can be found on tons of example sites (yes I know Java has built in classes for this, but the connection must exist in the native side).
    I wrapped everything into a simple ConnectToServer and ConnectToClient functions (everything is hardcoded, so no parameters are passed) in a .so and can establish and run the connection without a hitch in a C++ program that loads the .so. When I load the .so and try to call the functions in a Java harness, the JVM crashes with a SIGSEGV in the server side during the accept call (the client does establish the connection, so it must be crashing somewhere pretty far into the accept( ) call). I have verified this crash by building and running the debug version of hotspot in gdb.
    Im running Red Hat Enterprise Linux Server release 6.1 (Santiago) and Java VM: Java HotSpot(TM) 64-Bit Server VM (21.0-b17 mixed mode linux-amd64 compressed oops).
    Am I not allowed to call native library functions that have system calls in them during JNI, or am I missing something else that is not immediately obvious?

    jschell wrote:
    891860 wrote:
    I am trying to write a Java library around a piece of hardware that currently does not support Java. As the first part of the task, I need to establish a TCP/IP connection between a client and server. I wrote some test code in C that is very simple socket code that can be found on tons of example sites (yes I know Java has built in classes for this, but the connection must exist in the native side).Only reason I can think of for that would be because you need to pass the socket to your C code.
    So given that.
    1. Write C code that creates the socket
    2. Write an API in C that uses 1 to call the library.
    3. Test 1 and 2 via C code.
    After step 3 is complete you do the following.
    A. Determine the business functionality that your java application needs to access via the library. This step does not involve code at all. No C. No java.
    B. Write an API in C that implements the functionality determined in step A. And it will use code from 1/2 as well as needed.
    C. Write code in C to test B.
    After you have completed step 3 and step C then you write JNI and Java.Yes, the case is that the library that Im using for this device is in C, and requires a C socket. I did pretty much the steps that you mentioned. I wrote the basic network code. I wrapped it. Then I wrote a C program to load the .so and test it. It worked fine. When I added the JNI wrapper and Java code to launch it, that is when I had the problems.
    I removed everything but the basic TCP IP code (literally the wrapper that goes into JNI is just the TCP connection code). It still crashed. I then replaced the TCP IP code with another example I found on the net. Same issue. :(
    Edited by: 891860 on 17-Oct-2011 15:55

  • Solaris/JVM/JNI crashes

    Hello,
    I am experiencing periodic crashes in an application while using Solaris 2.8 and JVM 1.3.0. The application is invoking multi-threaded java code from C++ and the conflict causing the crashes seems to be in how the threads are being handled. Is anybody aware of problems using Solaris 2.8 with JVM 1.3 for this purpose?
    Thanks.

    By the way that presumes that your JNI code is actually robust (either long time use or extensive testin/profiling) to rule out a problem with it. If not then the problem is probably with the JNI code and has nothing to do with java.

  • JNI Crashes at the Runtime

    Hello everybody,
    I'm newbie at community, but I'm not so noob in Java programming.
    At first, I tried a lot of solutions for this problem, but nothing did work. Now, I hope we can work together to solve that.
    Ok, here we go. I'll explain the problem:
    I'm trying to integrate a native library written in C++ with Java. First I tried to use JNA because the user API is easiest then JNI. But the program crashes during the runtime. Here is the log file:
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # SIGSEGV (0xb) at pc=0xb7f3ef15, pid=6847, tid=3085961424
    # Java VM: Java HotSpot(TM) Client VM (1.4.2_18-b06 mixed mode)
    # Problematic frame:
    # C [libc.so.6+0x3df15] IOvfprintf+0x35
    --------------- T H R E A D ---------------
    Current thread (0x08057bd8): JavaThread "main" [_thread_in_native, id=6847]
    siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x00000046
    Registers:
    EAX=0xb7f008d0, EBX=0xb803fff4, ECX=0x00000000, EDX=0x0000000d
    ESP=0xbfe90610, EBP=0xbfe90c2c, ESI=0x081318c8, EDI=0xffffffc8
    EIP=0xb7f3ef15, CR2=0x00000046, EFLAGS=0x00210282
    Top of Stack: (sp=0xbfe90610)
    0xbfe90610: ffffffc0 00000345 00200034 00280007
    0xbfe90620: b7f008d0 b7f40f74 00000000 00000000
    0xbfe90630: 00000000 000e4d1c 000e4d1c b7f008d0
    0xbfe90640: bfe90b90 00000001 000e5830 bfe90cc0
    0xbfe90650: ffffffff 000042a0 0000a108 00000006
    0xbfe90660: 00001000 00000002 000e8998 000e8998
    0xbfe90670: 000e8998 000000f8 000000f8 00000006
    0xbfe90680: 00000004 00000007 00000000 ffffffff
    Instructions: (pc=0xb7f3ef15)
    0xb7f3ef05: ff 8b bb cc ff ff ff 8b 14 38 89 95 94 fa ff ff
    0xb7f3ef15: 80 79 46 00 0f 84 31 26 00 00 8b 45 08 8b 30 f7
    Stack: [0xbfca2000,0xbfe94000), sp=0xbfe90610, free space=1977k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C [libc.so.6+0x3df15] IOvfprintf+0x35
    C [libc.so.6+0x47c1f] IOfprintf+0x1f
    C [VenusLib.so+0xa92b] _ZN8CVv5404U10SaveConfigEv+0x7d
    C [VenusLib.so+0xa9ca] _ZN8CVv5404UD0Ev+0x32
    C [VenusLib.so+0x33fd] DestroyISensor+0xb9
    C [libNBioBSP.so+0x1423c] _Z13FreeSensorDllPP7ISensorPPv+0x52
    C [libNBioBSP.so+0x2a8e7] Z11OpenDevicetPP7ISensorPPvPNS_18tagDeviceInfoParamEPKc+0x38f
    C [libNBioBSP.so+0x20dc4] _ZN8CNBioBSP10OpenDeviceEt+0x94
    C [libNBioBSP.so+0x1bc19] NBioAPI_OpenDevice+0x3f
    C [libHBioBSP.so+0xa20] HBioAPI_OpenDevice+0x40
    C [jna29140.tmp+0x108db] ffi_call_SYSV+0x17
    C [jna29140.tmp+0x105b9] ffi_call+0x92
    C [jna29140.tmp+0x3b81]
    C [jna29140.tmp+0x43e1] Java_com_sun_jna_Function_invokeInt+0x43
    j com.sun.jna.Function.invokeInt(I[Ljava/lang/Object;)I+0
    j com.sun.jna.Function.invoke([Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object;+203
    j com.sun.jna.Function.invoke(Ljava/lang/Class;[Ljava/lang/Object;Ljava/util/Map;)Ljava/lang/Object;+194
    j com.sun.jna.Library$Handler.invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;+344
    j $Proxy0.HBioAPI_OpenDevice(I)S+23
    j henry.classes.HBioBSPModule.abrirDispositivo()S+15
    j jnaenbspnitgensdkv1.Main.main([Ljava/lang/String;)V+52
    v ~StubRoutines::call_stub
    V [libjvm.so+0x1b1824]
    V [libjvm.so+0x267379]
    V [libjvm.so+0x1b1a76]
    V [libjvm.so+0x1b9d3e]
    V [libjvm.so+0x1c890d]
    C [java+0x1880]
    C [libc.so.6+0x165f5] __libc_start_main+0xe5
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j com.sun.jna.Function.invokeInt(I[Ljava/lang/Object;)I+0
    j com.sun.jna.Function.invoke([Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object;+203
    j com.sun.jna.Function.invoke(Ljava/lang/Class;[Ljava/lang/Object;Ljava/util/Map;)Ljava/lang/Object;+194
    j com.sun.jna.Library$Handler.invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;+344
    j $Proxy0.HBioAPI_OpenDevice(I)S+23
    j henry.classes.HBioBSPModule.abrirDispositivo()S+15
    j jnaenbspnitgensdkv1.Main.main([Ljava/lang/String;)V+52
    v ~StubRoutines::call_stub
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x080a4b08 JavaThread "CompilerThread0" daemon [_thread_blocked, id=6853]
    0x080a3cd8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=6852]
    0x0808faa8 JavaThread "Finalizer" daemon [_thread_blocked, id=6850]
    0x0808e000 JavaThread "Reference Handler" daemon [_thread_blocked, id=6849]
    =>0x08057bd8 JavaThread "main" [_thread_in_native, id=6847]
    Other Threads:
    0x0808cd50 VMThread [id=6848]
    0x080a6538 WatcherThread [id=6854]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 576K, used 340K [0xab890000, 0xab930000, 0xabd70000)
    eden space 512K, 53% used [0xab890000, 0xab8d5120, 0xab910000)
    from space 64K, 100% used [0xab920000, 0xab930000, 0xab930000)
    to space 64K, 0% used [0xab910000, 0xab910000, 0xab920000)
    tenured generation total 1408K, used 50K [0xabd70000, 0xabed0000, 0xaf890000)
    the space 1408K, 3% used [0xabd70000, 0xabd7cb28, 0xabd7cc00, 0xabed0000)
    compacting perm gen total 4096K, used 1600K [0xaf890000, 0xafc90000, 0xb3890000)
    the space 4096K, 39% used [0xaf890000, 0xafa200e8, 0xafa20200, 0xafc90000)
    Dynamic libraries:
    08048000-08053000 r-xp 00000000 08:06 108586 /opt/java-sdk/j2sdk1.4.2_18/bin/java
    08053000-08055000 rwxp 0000a000 08:06 108586 /opt/java-sdk/j2sdk1.4.2_18/bin/java
    08055000-0815f000 rwxp 08055000 00:00 0 [heap]
    aadfc000-aaf16000 rwxp aadfc000 00:00 0
    aaf16000-aaffb000 r-xp 00000000 08:06 360409 /usr/lib/libstdc++.so.6.0.10
    aaffb000-aafff000 r-xp 000e5000 08:06 360409 /usr/lib/libstdc++.so.6.0.10
    aafff000-ab000000 rwxp 000e9000 08:06 360409 /usr/lib/libstdc++.so.6.0.10
    ab000000-ab006000 rwxp ab000000 00:00 0
    ab01d000-ab029000 r-xp 00000000 08:06 468130 /lib/libgcc_s.so.1
    ab029000-ab02a000 r-xp 0000b000 08:06 468130 /lib/libgcc_s.so.1
    ab02a000-ab02b000 rwxp 0000c000 08:06 468130 /lib/libgcc_s.so.1
    ab02b000-ab0e3000 r-xp 00000000 08:06 446430 /usr/lib/libstdc++.so.5.0.7
    ab0e3000-ab0e4000 r-xp 000b8000 08:06 446430 /usr/lib/libstdc++.so.5.0.7
    ab0e4000-ab0e8000 rwxp 000b9000 08:06 446430 /usr/lib/libstdc++.so.5.0.7
    ab0e8000-ab0ed000 rwxp ab0e8000 00:00 0
    ab0ed000-ab16b000 r-xp 00000000 08:06 468121 /lib/libNBioBSP.so
    ab16b000-ab174000 rwxp 0007e000 08:06 468121 /lib/libNBioBSP.so
    ab174000-ab17b000 rwxp ab174000 00:00 0
    ab182000-ab191000 r-xp 00000000 08:06 468087 /lib/VenusLib.so
    ab191000-ab192000 rwxp 0000f000 08:06 468087 /lib/VenusLib.so
    ab192000-ab193000 r-xp 00000000 08:06 463826 /usr/lib/libHBioBSP.so
    ab193000-ab194000 r-xp 00000000 08:06 463826 /usr/lib/libHBioBSP.so
    ab194000-ab195000 rwxp 00001000 08:06 463826 /usr/lib/libHBioBSP.so
    ab195000-ab1a8000 r-xp 00000000 08:06 519772 /tmp/jna29140.tmp
    ab1a8000-ab1a9000 r-xp 00012000 08:06 519772 /tmp/jna29140.tmp
    ab1a9000-ab1aa000 rwxp 00013000 08:06 519772 /tmp/jna29140.tmp
    ab1aa000-ab1b8000 r-xs 00000000 08:06 21586 /opt/java-lib/jna-3/linux-i386.jar
    ab1b8000-ab1e0000 r-xs 00000000 08:06 20837 /opt/java-lib/jna-3/jna.jar
    ab1e0000-ab1ed000 r-xs 00000000 08:06 108661 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/ext/ldapsec.jar
    ab1ed000-ab209000 r-xs 00000000 08:06 108659 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/ext/sunjce_provider.jar
    ab209000-ab2c7000 r-xs 00000000 08:06 108662 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/ext/localedata.jar
    ab2c7000-ab2ca000 r-xs 00000000 08:06 108660 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/ext/dnsns.jar
    ab2ca000-ab2cb000 ---p ab2ca000 00:00 0
    ab2cb000-ab34b000 rwxp ab2cb000 00:00 0
    ab34b000-ab34c000 ---p ab34b000 00:00 0
    ab34c000-ab359000 rwxp ab34c000 00:00 0
    ab359000-ab35c000 ---p ab359000 00:00 0
    ab35c000-ab54c000 rwxp ab35c000 00:00 0
    ab54c000-ab54d000 ---p ab54c000 00:00 0
    ab54d000-ab55a000 rwxp ab54d000 00:00 0
    ab55a000-ab55d000 ---p ab55a000 00:00 0
    ab55d000-ab5cd000 rwxp ab55d000 00:00 0
    ab5cd000-ab5ce000 ---p ab5cd000 00:00 0
    ab5ce000-ab64e000 rwxp ab5ce000 00:00 0
    ab64e000-ab68d000 r-xp 00000000 08:06 492489 /usr/lib/locale/pt_BR.utf8/LC_CTYPE
    ab68d000-ab68e000 ---p ab68d000 00:00 0
    ab68e000-ab69b000 rwxp ab68e000 00:00 0
    ab69b000-ab69e000 ---p ab69b000 00:00 0
    ab69e000-ab70e000 rwxp ab69e000 00:00 0
    ab70e000-ab70f000 ---p ab70e000 00:00 0
    ab70f000-ab71c000 rwxp ab70f000 00:00 0
    ab71c000-ab71f000 ---p ab71c000 00:00 0
    ab71f000-ab78f000 rwxp ab71f000 00:00 0
    ab78f000-ab790000 ---p ab78f000 00:00 0
    ab790000-ab813000 rwxp ab790000 00:00 0
    ab813000-ab831000 rwxp ab813000 00:00 0
    ab831000-ab832000 rwxp ab831000 00:00 0
    ab832000-ab84f000 rwxp ab832000 00:00 0
    ab84f000-ab850000 rwxp ab84f000 00:00 0
    ab850000-ab851000 rwxp ab850000 00:00 0
    ab851000-ab853000 rwxp ab851000 00:00 0
    ab853000-ab86f000 rwxp ab853000 00:00 0
    ab86f000-ab871000 rwxp ab86f000 00:00 0
    ab871000-ab88f000 rwxp ab871000 00:00 0
    ab88f000-ab930000 rwxp ab88f000 00:00 0
    ab930000-abd70000 rwxp ab930000 00:00 0
    abd70000-abed0000 rwxp abd70000 00:00 0
    abed0000-af890000 rwxp abed0000 00:00 0
    af890000-afc90000 rwxp af890000 00:00 0
    afc90000-b3890000 rwxp afc90000 00:00 0
    b3892000-b38bd000 rwxp b3892000 00:00 0
    b38bd000-b393a000 rwxp b38bd000 00:00 0
    b393a000-b39c2000 rwxp b393a000 00:00 0
    b39c2000-b593a000 rwxp b39c2000 00:00 0
    b593a000-b5f0f000 r-xs 00000000 08:06 108725 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/charsets.jar
    b5f0f000-b5f21000 r-xs 00000000 08:06 108717 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/jce.jar
    b5f21000-b5ffe000 r-xs 00000000 08:06 108746 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/jsse.jar
    b5ffe000-b6014000 r-xs 00000000 08:06 108727 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/sunrsasign.jar
    b6014000-b605e000 rwxp b6014000 00:00 0
    b605e000-b7a1a000 r-xs 00000000 08:06 108716 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/rt.jar
    b7a1a000-b7a28000 r-xp 00000000 08:06 115020 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/i386/libzip.so
    b7a28000-b7a2a000 rwxp 0000d000 08:06 115020 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/i386/libzip.so
    b7a2a000-b7a46000 r-xp 00000000 08:06 115023 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/i386/libjava.so
    b7a46000-b7a48000 rwxp 0001b000 08:06 115023 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/i386/libjava.so
    b7a48000-b7a51000 r-xp 00000000 08:06 467991 /lib/libnss_files-2.8.so
    b7a51000-b7a52000 r-xp 00008000 08:06 467991 /lib/libnss_files-2.8.so
    b7a52000-b7a53000 rwxp 00009000 08:06 467991 /lib/libnss_files-2.8.so
    b7a53000-b7a5b000 r-xp 00000000 08:06 467977 /lib/libnss_nis-2.8.so
    b7a5b000-b7a5c000 r-xp 00007000 08:06 467977 /lib/libnss_nis-2.8.so
    b7a5c000-b7a5d000 rwxp 00008000 08:06 467977 /lib/libnss_nis-2.8.so
    b7a5e000-b7a65000 r-xs 00000000 08:06 360525 /usr/lib/gconv/gconv-modules.cache
    b7a65000-b7a72000 r-xp 00000000 08:06 115005 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/i386/libverify.so
    b7a72000-b7a74000 rwxp 0000c000 08:06 115005 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/i386/libverify.so
    b7a74000-b7a98000 r-xp 00000000 08:06 467990 /lib/libm-2.8.so
    b7a98000-b7a99000 r-xp 00023000 08:06 467990 /lib/libm-2.8.so
    b7a99000-b7a9a000 rwxp 00024000 08:06 467990 /lib/libm-2.8.so
    b7a9a000-b7aad000 r-xp 00000000 08:06 468200 /lib/libnsl-2.8.so
    b7aad000-b7aae000 r-xp 00012000 08:06 468200 /lib/libnsl-2.8.so
    b7aae000-b7aaf000 rwxp 00013000 08:06 468200 /lib/libnsl-2.8.so
    b7aaf000-b7ab1000 rwxp b7aaf000 00:00 0
    b7ab1000-b7ecf000 r-xp 00000000 08:06 115001 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/i386/client/libjvm.so
    b7ecf000-b7eeb000 rwxp 0041d000 08:06 115001 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/i386/client/libjvm.so
    b7eeb000-b7f01000 rwxp b7eeb000 00:00 0
    b7f01000-b803e000 r-xp 00000000 08:06 467979 /lib/libc-2.8.so
    b803e000-b8040000 r-xp 0013d000 08:06 467979 /lib/libc-2.8.so
    b8040000-b8041000 rwxp 0013f000 08:06 467979 /lib/libc-2.8.so
    b8041000-b8044000 rwxp b8041000 00:00 0
    b8044000-b8046000 r-xp 00000000 08:06 467985 /lib/libdl-2.8.so
    b8046000-b8047000 r-xp 00001000 08:06 467985 /lib/libdl-2.8.so
    b8047000-b8048000 rwxp 00002000 08:06 467985 /lib/libdl-2.8.so
    b8048000-b805c000 r-xp 00000000 08:06 468133 /lib/libpthread-2.8.so
    b805c000-b805d000 r-xp 00013000 08:06 468133 /lib/libpthread-2.8.so
    b805d000-b805e000 rwxp 00014000 08:06 468133 /lib/libpthread-2.8.so
    b805e000-b8060000 rwxp b805e000 00:00 0
    b8062000-b8066000 rwxs 00000000 08:06 552405 /tmp/hsperfdata_jborges/6847
    b8066000-b806d000 r-xp 00000000 08:06 467942 /lib/libnss_compat-2.8.so
    b806d000-b806e000 r-xp 00006000 08:06 467942 /lib/libnss_compat-2.8.so
    b806e000-b806f000 rwxp 00007000 08:06 467942 /lib/libnss_compat-2.8.so
    b806f000-b8075000 r-xp 00000000 08:06 115026 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/i386/native_threads/libhpi.so
    b8075000-b8077000 rwxp 00005000 08:06 115026 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/i386/native_threads/libhpi.so
    b8077000-b8078000 rwxp b8077000 00:00 0
    b8078000-b8093000 r-xp 00000000 08:06 468320 /lib/ld-2.8.so
    b8093000-b8094000 r-xp 0001a000 08:06 468320 /lib/ld-2.8.so
    b8094000-b8095000 rwxp 0001b000 08:06 468320 /lib/ld-2.8.so
    bfc98000-bfca2000 rwxp bfc98000 00:00 0
    bfca2000-bfca5000 ---p bfca2000 00:00 0
    bfe80000-bfe95000 rwxp bffeb000 00:00 0 [stack]
    ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso]
    VM Arguments:
    java_command: jnaenbspnitgensdkv1.Main
    Launcher Type: SUN_STANDARD
    Environment Variables:
    JAVA_HOME=/usr/lib/jvm/jre
    JRE_HOME=/usr/lib/jvm/jre
    PATH=/opt/kde3/bin:/home/jborges/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/lib/qt3/bin
    LD_LIBRARY_PATH=/opt/java-sdk/j2sdk1.4.2_18/jre/lib/i386/client:/opt/java-sdk/j2sdk1.4.2_18/jre/lib/i386:/opt/java-sdk/j2sdk1.4.2_18/jre/../lib/i386:/opt/java-sdk/jdk1.6.0_07/jre/lib/i386/client:/opt/java-sdk/jdk1.6.0_07/jre/lib/i386:/opt/java-sdk/jdk1.6.0_07/jre/../lib/i386
    SHELL=/bin/bash
    DISPLAY=:0.0
    HOSTTYPE=i386
    OSTYPE=linux
    MACHTYPE=i686-suse-linux
    --------------- S Y S T E M ---------------
    OS:openSUSE 11.0 (i586)
    VERSION = 11.0
    uname:Linux 2.6.25.11-0.1-pae #1 SMP 2008-07-13 20:48:28 +0200 i686
    libc:glibc 2.8 NPTL 2.8
    rlimit: STACK 8192k, CORE 0k, NPROC 7677, NOFILE 8192, AS 1386000k
    load average:93490094150470077220126720.00 3606846966761539820743723613461780200924650763268597725005162661671931552496146641583441222935396377935628714291211382611843028547896026403367449273839563203090546838260603705542944542680411726151680.00 21221869192944998738009783234686122942367469160885032855155084356764147413706813705551872.00
    CPU:total 2 family 15, cmov, cx8, fxsr, mmx, sse, sse2
    Memory: 4k page, physical 969472k(12108k free), swap 763016k(762984k free)
    vm_info: Java HotSpot(TM) Client VM (1.4.2_18-b06) for linux-x86, built on May 28 2008 00:05:38 by unknown with unknown compiler
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Let me explain more..
    After some tests I decided to use Java SDK 1.4 for this application. As you can see it was run in HotSpot Client VM 1.4.2_18. The OS is openSUSE 11.0 (kernel 2.6.25.11) and the System C Library is compatible with libc.so.6 (glibc) "the new one".
    Here are the native modules I'm trying to integrate with Java:
    VenusLib.so => It's the driver for the USB device I have to use in my application.
    libNBioBSP.so => It's the SDK written in C++ (compiled and compatible with GNU 3.x) that access the driver functionality.
    NOTE 1: I can't access driver's methods directly. It's made by the SDK.
    NOTE 2: The driver and the SDK are compatible with old libc.so.5 but I'm not sure about the compatibility with libc.so.6.
    I tested the SDK functionality with C++. I wrote a simple application and compiled using GNU 3.2. It worked very well.
    After that, I created a JNA interface to invoke the SDK methods but the program crash when I try to access the USB device.
    Here is a part of the JNA interface:
    public interface BSPModuleInterface extends Library {
        /* NBioAPI_Init
         * NBioAPI_RETURN NBioAPI_Init(
         *      OUT NBioAPI_HANDLE_PTR phHandle);
        public int NBioAPI_Init(IntByReference phBSP);
        /* NBioAPI_GetVersion
         * NBioAPI_RETURN NBioAPI_GetVersion(
         *      IN NBioAPI_HANDLE hHandle,
         *      OUT NBioAPI_VERSION_PTR pVersion);
        public int NBioAPI_GetVersion(int hHandle, Structure pVersion);
        /* NBioAPI_GetInitInfo
         * NBioAPI_RETURN NBioAPI_GetInitInfo(
         *      IN NBioAPI_HANDLE hHandle,
         *      IN NBioAPI_UINT8 nStructureType,
         *      OUT NBioAPI_INIT_INFO_PTR pInitInfo);
        public int NBioAPI_GetInitInfo(int hHandle, int nStructureType, Structure pInitInfo);
        /* NBioAPI_SetInitInfo
         * NBioAPI_RETURN NBioAPI_SetInitInfo(
         *      IN NBioAPI_HANDLE hHandle,
         *      IN NBioAPI_UINT8 nStructureType,
         *      OUT NBioAPI_INIT_INFO_PTR pInitInfo);
        public int NBioAPI_SetInitInfo(int hHandle, int nStructureType, Structure pInitInfo);
        /* NBioAPI_OpenDevice
         * NBioAPI_RETURN NBioAPI_OpenDevice(
         *      IN NBioAPI_HANDLE hHandle,
         *      IN NBioAPI_DEVICE_ID nDeviceID);
        public int NBioAPI_OpenDevice(int hHandle, int nDeviceID);
        /* NBioAPI_CloseDevice
         * NBioAPI_RETURN NBioAPI_CloseDevice(
         *      IN NBioAPI_HANDLE             hHandle,
         *      IN NBioAPI_DEVICE_ID          nDeviceID);
        public int NBioAPI_CloseDevice(int hHandle, short nDeviceID);
        public void NBioAPI_Enroll();
        public void NBioAPI_Verify();
        /* NBioAPI_EnumerateDevice
         * NBioAPI_RETURN NBioAPI_EnumerateDevice (
         *      IN NBioAPI_HANDLE hHandle,
         *      OUT NBioAPI_UINT32* pNumDevice,
         *      OUT NBioAPI_DEVICE_ID** ppDeviceID);
         public int NBioAPI_EnumerateDevice(int hHandle, IntByReference pNumDevice, PointerByReference ppDeviceID);
        /* NBioAPI_GetDeviceInfo
         *      NBioAPI_RETURN NBioAPI_GetDeviceInfo(
         *      IN NBioAPI_HANDLE hHandle,
         *      IN NBioAPI_DEV ICE_ID nDeviceID,
         *      IN NBioAPI_UINT8 nStructureType,
         *      OUT NBioAPI_DEVICE_INFO_PTR pDeviceInfo);
         public int NBioAPI_GetDeviceInfo(int hHandle, short nDeviceID, int StructureType, Structure pDeviceInfo);
         /* NBioAPI_SetDeviceInfo
          * NBioAPI_RETURN NBioAPI_SetDeviceInfo(
          *     IN NBioAPI_HANDLE hHandle,
          *     IN NBioAPI_DEVICE_ID nDeviceID,
          *     IN NBioAPI_UINT8 nStructureType,
          *     IN NBioAPI_DEVICE_INFO_PTR pDeviceInfo);
         public int NBioAPI_SetDeviceInfo(int hHandle, short nDeviceID, int nStructureType, Structure pDeviceInfo);
        /* NBioAPI_Terminate
         * NBioAPI_RETURN NBioAPI_Terminate(
         *      IN NBioAPI_HANDLE hHandle);
        public int NBioAPI_Terminate(int hHandle);
        /* NBioAPI_GetOpenedDeviceID
         * NBioAPI_DEVICE_ID NBioAPI NBioAPI_GetOpenedDeviceID(
         *      IN NBioAPI_HANDLE hHandle);
        public short NBioAPI_GetOpenedDeviceID(int hHandle);
    }Some of methods worked fine. But all methods that access the device crashes at the runtime.
    Well, it's not a topic about JNA so I will not give more details. After literally crashes my own head I decided to "down-ground" and use JNI to invoke the SDK methods.
    At first I created a simple class to test listed below:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package henry.hbiobsp.jni;
    * @author jborges
    public class HBioBSPModule {
        public native boolean HBioAPI_Init(int phHandle);
        public native boolean HBioAPI_Terminate(int hHandle);
        public native short HBioAPI_OpenDevice(int hHandle);   
        public native boolean HBioAPI_CloseDevice(int hHandle, short nDeviceID);
        static {
            System.loadLibrary("HBioBSP");
    }Using javah I generated the header file HBioBSP.h:
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class HBioBSP */
    #ifndef _Included_HBioBSP
    #define _Included_HBioBSP
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class:     HBioBSP
    * Method:    Init
    * Signature: ()I
    JNIEXPORT jint JNICALL Java_HBioBSP_Init
      (JNIEnv *, jobject);
    * Class:     HBioBSP
    * Method:    Terminate
    * Signature: (I)Z
    JNIEXPORT jboolean JNICALL Java_HBioBSP_Terminate
      (JNIEnv *, jobject, jint);
    * Class:     HBioBSP
    * Method:    OpenDevice
    * Signature: (I)S
    JNIEXPORT jshort JNICALL Java_HBioBSP_OpenDevice
      (JNIEnv *, jobject, jint);
    * Class:     HBioBSP
    * Method:    CloseDevice
    * Signature: (IS)Z
    JNIEXPORT jboolean JNICALL Java_HBioBSP_CloseDevice
      (JNIEnv *, jobject, jint, jshort);
    #ifdef __cplusplus
    #endif
    #endifSo, I implemented the C++ methods and compiled a dynamic library (HBioBSP.so) using GNU 3.2 Tools and I copied it to the system folder /usr/lib
    Now, here's the Main class to test the new library:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    * @author jborges
    public class Main {
         * @param args the command line arguments
        public static void main(String[] args) {
            int hHandle;
            short nDeviceID;
            HBioBSP bioModule = new HBioBSP();
            System.out.println("bioModule.Init() \t\t\t\t> hHandle = " + (hHandle = bioModule.Init()));
            System.out.println("bioModule.OpenDevice() \t\t\t\t> " + (nDeviceID = bioModule.OpenDevice(hHandle)));
            System.out.println("bioModule.CloseDevice() \t\t\t> " + bioModule.CloseDevice(hHandle, nDeviceID));
            System.out.println("bioModule.Terminate() \t\t\t\t> " + bioModule.Terminate(hHandle));       
    }I run and...
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    init:
    deps-jar:
    Compiling 1 source file to /home/jborges/NetBeansProjects/JNI-HBioBSP/build/classes
    compile-single:
    run-single:
    bioModule.Init() > hHandle = 135324080
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # SIGSEGV (0xb) at pc=0xb7e6ef15, pid=8554, tid=3085109456
    # Java VM: Java HotSpot(TM) Client VM (1.4.2_18-b06 mixed mode)
    # Problematic frame:
    # C [libc.so.6+0x3df15] IOvfprintf+0x35
    # An error report file with more information is saved as hs_err_pid8554.log
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    Java Result: 134
    CONSTRU&Iacute;DO COM SUCESSO (tempo total: 2 segundos)
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Ohhhhhhh god! It crashed when tried to access the USB device => bioModule.OpenDevice()
    The log file is below:
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # SIGSEGV (0xb) at pc=0xb7e22f15, pid=7705, tid=3084798160
    # Java VM: Java HotSpot(TM) Client VM (1.4.2_18-b06 mixed mode)
    # Problematic frame:
    # C [libc.so.6+0x3df15] IOvfprintf+0x35
    --------------- T H R E A D ---------------
    Current thread (0x08057bc0): JavaThread "main" [_thread_in_native, id=7705]
    siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x00000046
    Registers:
    EAX=0xb7de48d0, EBX=0xb7f23ff4, ECX=0x00000000, EDX=0x0000000d
    ESP=0xbff7315c, EBP=0xbff73778, ESI=0x0810e1b8, EDI=0xffffffc8
    EIP=0xb7e22f15, CR2=0x00000046, EFLAGS=0x00210286
    Top of Stack: (sp=0xbff7315c)
    0xbff7315c: ffffffc0 00000345 00200034 00280007
    0xbff7316c: b7de48d0 b7e24f74 00000000 00000000
    0xbff7317c: 00000000 000e4d1c 000e4d1c b7de48d0
    0xbff7318c: bff736dc 00000001 000e5830 bff7380c
    0xbff7319c: ffffffff 000042a0 0000a108 00000006
    0xbff731ac: 00001000 00000002 000e8998 000e8998
    0xbff731bc: 000e8998 000000f8 000000f8 00000006
    0xbff731cc: 00000004 00000007 00000000 ffffffff
    Instructions: (pc=0xb7e22f15)
    0xb7e22f05: ff 8b bb cc ff ff ff 8b 14 38 89 95 94 fa ff ff
    0xb7e22f15: 80 79 46 00 0f 84 31 26 00 00 8b 45 08 8b 30 f7
    Stack: [0xbfd84000,0xbff76000), sp=0xbff7315c, free space=1980k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C [libc.so.6+0x3df15] IOvfprintf+0x35
    C [libc.so.6+0x47c1f] IOfprintf+0x1f
    C [VenusLib.so+0xa92b] _ZN8CVv5404U10SaveConfigEv+0x7d
    C [VenusLib.so+0xa9ca] _ZN8CVv5404UD0Ev+0x32
    C [VenusLib.so+0x33fd] DestroyISensor+0xb9
    C [libNBioBSP.so+0x1423c] _Z13FreeSensorDllPP7ISensorPPv+0x52
    C [libNBioBSP.so+0x2a8e7] Z11OpenDevicetPP7ISensorPPvPNS_18tagDeviceInfoParamEPKc+0x38f
    C [libNBioBSP.so+0x20dc4] _ZN8CNBioBSP10OpenDeviceEt+0x94
    C [libNBioBSP.so+0x1bc19] NBioAPI_OpenDevice+0x3f
    C [libHBioBSP.so+0xbe0] Java_HBioBSP_OpenDevice+0x40
    j HBioBSP.OpenDevice(I)S+0
    j Main.main([Ljava/lang/String;)V+55
    v ~StubRoutines::call_stub
    V [libjvm.so+0x1b1824]
    V [libjvm.so+0x267379]
    V [libjvm.so+0x1b1a76]
    V [libjvm.so+0x1b9d3e]
    V [libjvm.so+0x1c890d]
    C [java+0x1880]
    C [libc.so.6+0x165f5] __libc_start_main+0xe5
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j HBioBSP.OpenDevice(I)S+0
    j Main.main([Ljava/lang/String;)V+55
    v ~StubRoutines::call_stub
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x080a4ac8 JavaThread "CompilerThread0" daemon [_thread_blocked, id=7714]
    0x080a3c38 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=7713]
    0x0808fa58 JavaThread "Finalizer" daemon [_thread_blocked, id=7710]
    0x0808dfb0 JavaThread "Reference Handler" daemon [_thread_blocked, id=7709]
    =>0x08057bc0 JavaThread "main" [_thread_in_native, id=7705]
    Other Threads:
    0x0808cd38 VMThread [id=7708]
    0x080a64d8 WatcherThread [id=7715]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 576K, used 144K [0xab770000, 0xab810000, 0xabc50000)
    eden space 512K, 28% used [0xab770000, 0xab7942a8, 0xab7f0000)
    from space 64K, 0% used [0xab7f0000, 0xab7f0000, 0xab800000)
    to space 64K, 0% used [0xab800000, 0xab800000, 0xab810000)
    tenured generation total 1408K, used 0K [0xabc50000, 0xabdb0000, 0xaf770000)
    the space 1408K, 0% used [0xabc50000, 0xabc50000, 0xabc50200, 0xabdb0000)
    compacting perm gen total 4096K, used 982K [0xaf770000, 0xafb70000, 0xb3770000)
    the space 4096K, 23% used [0xaf770000, 0xaf865920, 0xaf865a00, 0xafb70000)
    Dynamic libraries:
    08048000-08053000 r-xp 00000000 08:06 108586 /opt/java-sdk/j2sdk1.4.2_18/bin/java
    08053000-08055000 rwxp 0000a000 08:06 108586 /opt/java-sdk/j2sdk1.4.2_18/bin/java
    08055000-08113000 rwxp 08055000 00:00 0 [heap]
    aad2d000-aae47000 rwxp aad2d000 00:00 0
    aae47000-aaf2c000 r-xp 00000000 08:06 360409 /usr/lib/libstdc++.so.6.0.10
    aaf2c000-aaf30000 r-xp 000e5000 08:06 360409 /usr/lib/libstdc++.so.6.0.10
    aaf30000-aaf31000 rwxp 000e9000 08:06 360409 /usr/lib/libstdc++.so.6.0.10
    aaf31000-aaf37000 rwxp aaf31000 00:00 0
    aaf4e000-aaf5a000 r-xp 00000000 08:06 468130 /lib/libgcc_s.so.1
    aaf5a000-aaf5b000 r-xp 0000b000 08:06 468130 /lib/libgcc_s.so.1
    aaf5b000-aaf5c000 rwxp 0000c000 08:06 468130 /lib/libgcc_s.so.1
    aaf5c000-ab014000 r-xp 00000000 08:06 446430 /usr/lib/libstdc++.so.5.0.7
    ab014000-ab015000 r-xp 000b8000 08:06 446430 /usr/lib/libstdc++.so.5.0.7
    ab015000-ab019000 rwxp 000b9000 08:06 446430 /usr/lib/libstdc++.so.5.0.7
    ab019000-ab01e000 rwxp ab019000 00:00 0
    ab01e000-ab09c000 r-xp 00000000 08:06 468121 /lib/libNBioBSP.so
    ab09c000-ab0a5000 rwxp 0007e000 08:06 468121 /lib/libNBioBSP.so
    ab0a5000-ab0ac000 rwxp ab0a5000 00:00 0
    ab0b3000-ab0c2000 r-xp 00000000 08:06 468087 /lib/VenusLib.so
    ab0c2000-ab0c3000 rwxp 0000f000 08:06 468087 /lib/VenusLib.so
    ab0c3000-ab0d0000 r-xs 00000000 08:06 108661 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/ext/ldapsec.jar
    ab0d0000-ab0ec000 r-xs 00000000 08:06 108659 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/ext/sunjce_provider.jar
    ab0ec000-ab1aa000 r-xs 00000000 08:06 108662 /opt/java-sdk/j2sdk1.4.2_18/jre/lib/ext/localedata.jar
    ab1aa000-ab1ab000 ---p ab1aa000 00:00 0
    ab1ab000-ab22b000 rwxp ab1ab000 00:00 0
    ab22b000-ab22c000 ---p ab22b000 00:00 0
    ab22c000-ab239000 rwxp ab22c000 00:00 0
    ab239000-ab23c000 ---p ab239000 00:00 0
    ab23c000-ab42c000 rwxp ab23c000 00:00 0
    ab42c000-ab42d000 ---p ab42c000 00:00 0
    ab42d000-ab43a000 rwxp ab42d000 00:00 0
    ab43a000-ab43d000 ---p ab43a000 00:00 0
    ab43d000-ab4ad000 rwxp ab43d000 00:00 0
    ab4ad000-ab4ae000 ---p ab4ad000 00:00 0
    ab4ae000-ab52e000 rwxp ab4ae000 00:00 0
    ab52e000-ab56d000 r-xp 00000000 08:06 492489 /usr/lib/locale/pt_BR.utf8/LC_CTYPE
    ab56d000-ab56e000 ---p ab56d000 00:00 0
    ab56e000-ab57b000 rwxp ab56e000 00:00 0
    ab57b000-ab57e000 ---p ab57b000 00:00 0
    ab57e000-ab5ee000 rwxp ab57e000 00:00 0
    ab5ee000-ab5ef000 ---p ab5ee000 00:00 0
    ab5ef000-ab5fc000 rwxp ab5ef000 00:00 0
    ab5fc000-ab5ff000 ---p ab5fc000 00:00 0
    ab5ff000-ab66f000 rwxp ab5ff000 00:00 0
    ab66f000-ab670000 ---p ab66f000 00:00 0
    ab670000-ab6f3000 rwxp ab670000 00:00 0
    ab6f3000-ab711000 rwxp ab6f3000 00:00 0
    ab711000-ab712000 rwxp ab711000 00:00 0
    ab712000-ab72f000 rwxp ab712000 00:00 0
    ab72f000-ab730000 rwxp ab72f000 00:00 0
    ab730000-ab731000 rwxp ab730000 00:00 0
    ab731000-ab733000 rwxp ab731000 00:00 0
    ab733000-ab74f000 rwxp ab733000 00:00 0
    ab74f000-ab751000 rwxp ab74f000 00:00 0
    ab751000-ab76f000 rwxp ab751000 00:00 0
    ab76f000-ab810000 rwxp ab76f000 00:00 0
    ab810000-abc50000 rwxp ab810000 00:00 0
    abc50000-abdb0000 rwxp abc50000 00:00 0
    abdb0000-af770000 rwxp abdb0000 00:00 0
    af770000-afb70000 rwxp af770000 00:00 0
    afb70000-b3770000 rwxp afb70000 00:00 0
    b3770000-b3771000 r-xp 00000000 08:06 463826 /usr/lib/libHBioBSP.so
    b3771000-b3772000 r-xp 00000000 08:06 463826 /usr/lib/libHBioBSP.so
    b3772000-b3773000 rwxp 00001000 08:06 463826 /usr/lib/libHBioBSP.so
    b3773000-b3776000 r-xs 00000000 08:06 108660 /opt/java-sdk/j2sdk1.

    Hello guys,
    After some tests I discovered the problem:
    If I run the Java Application as root user it works fine. It's not JNI or Java runtime or library dependences \o/ xD Just a permission access error to device, but without an appropriate error message.. That's why I didn't know what to do.
    Also, I can use JNA to invoke the SDK methods. It means the Java interface and the codification work will become more simple and faster to do.
    Well,
    Thank you all for attention. I hope participate more of the community and help other developers too.
    0_codexxx

  • JNI crash during info- getHWND()

    It appaers that the JNIENV * and/or jobject are invalid and when the function getHWND() [which returns a JAWT_Win32DrawingSurfaceInfo*] is called it crashes. Can anyone see something obvious why this fails I've written other projects using the mechanism, but only this one fails.
    Thanks
    David
    //Java code
    public class CommFeedback extends Canvas
         public String nativeLibraryDirectory;
         public String nameOfDllBeingUsed;     
         public String memInfo;
         public String cpuInfo;
         public String graphicsInfo;
         public CommFeedback()
              this.nativeLibraryDirectory = System.getProperty("java.library.path") + "\\";
    //          System.out.println("Native Library Directory : " + nativeLibraryDirectory);
              loadDLL();          
         public void GetInfo()
              cpuInfo = getCPUInfo();
              memInfo = getMemInfo();
              if( initOpenGL() )
                   graphicsInfo = getGraphicsInfo();
                   System.out.println("Graphics Information");
                   System.out.println(graphicsInfo);
         public void printInfo()
              System.out.println("CPU Information");
              System.out.println(cpuInfo);
              System.out.println("Memory Information");
              System.out.println(memInfo);          
              System.out.println("Graphics Information");
              System.out.println(graphicsInfo);
         private void loadDLL()
              String nameDLL = "Comm";
              try
                   System.loadLibrary(nameDLL);
              catch(Exception e)
                   e.printStackTrace();
         public native String getCPUInfo();
         public native String getMemInfo();     
         public native String getGraphicsInfo();
         public native boolean initOpenGL();
    //C++ code
         class JAWT_Info * info = NULL;
         info = new JAWT_Info(env, panel);
         std::cout << "Before info->getHWND()" << std::endl;
         if(info->getHWND() == NULL)
              std::cout << "info->getHWND() == NULL" << std::endl;
              return 0;
         }

    I've added a check to determine if info has a value of NULL and info contains a non NULL value. I assumed that the values for the JNIENV * and/or jobject are invalid because the the dsi is derived from this information.
         class JAWT_Info * info = NULL;
         info = new JAWT_Info(env, panel);
         if(info == NULL)
              std::cout << "info == NULL" << std::endl;
              return 0;
         std::cout << "Before info->getHWND()" << std::endl;
         if(info->getHWND() == NULL)
              std::cout << "info->getHWND() == NULL" << std::endl;
              return 0;
         }typedef struct jawt_Win32DrawingSurfaceInfo {
    /* Native window, DDB, or DIB handle */
    union {
    HWND hwnd;
    HBITMAP hbitmap;
    void* pbits;
    * This HDC should always be used instead of the HDC returned from
    * BeginPaint() or any calls to GetDC().
    HDC hdc;
    HPALETTE hpalette;
    } JAWT_Win32DrawingSurfaceInfo;
    JAWT_Win32DrawingSurfaceInfo* dsi_win;
    HWND getHWND()
    if(dsi_win == NULL)
    return NULL;
    return dsi_win->hwnd;

  • Dlopen and JNI

    Hi all,
    im trying to make a code, that looks like this:
    - javaInterface dynamic library: a library that serves as an interface to some java functions
    - caller: a library that uses the java interface above and call functions
    - executable: calls dlopen to open caller and its functions
    JNI crashes while starting the JVM. The interesting thing is, if instead of using dlopen I compile executable linking with caller, it works. I heard there was an incompatibility with Thread Local Storage and dlopen, and the libc RH EL uses has TLS. Can anyone shed a light here?
    Thanks
    Matheus

    It is quite old, yes. We have to stick to version 1.3, the actual version is
    1.3.1_04 IIRC, because of something coded against specific swing
    peculiarities.
    Of course threads are more efficient, that's their reason to exist.
    However, I haven't been able to find any doc about that, except a single
    sentence mentioning that on Solaris the implementation was not using
    native threads. BTW, I haven't been able to find the source code for
    Linux libjvm either.
    Our C application continuously calls into the JVM to get user's input.
    Should it use mutexes? Catch signals? I cannot work it out without some
    detailed description. Isn't that relevant for programmers? Or is just me
    looking in the wrong places?

  • Application crashes when using JNI with Jdk 1,2, 1.3 and 1.4

    Hi!
    I have this application that has a GUI written in Java and a file parser written in C. JNI is used to connect these parts together. The problem is that the application only works when I am using jdk 1.1.8 but not when using jdk1.2, jdk1.3 or jdk1.4. I am running the application on a Solaris 8 machine.
    I have not written the application myself but I am going to be working with it from now on. But I have today little knowledge with JNI and I have tried different approaches to solve the problem. For example I have tried to used DDD together with GDB to find out what the problem is but with no luck. When I run the application using jdk1.4 I get the following error when the JVM crashes:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : 10 occurred at PC=0xFA023164
    Function=Java_Bitmap_setDebug+0x1C
    Library=/usr/u/lal/micview/micview2_1_0_beta1/libBitmapImpl.so
    Current Java thread:
    at Bitmap.setDebug(Native Method)
    at DisplayPanel.loadFile(DisplayPanel.java:396)
    at MicPlot.loadFile(MicPlot.java:1452)
    at MicPlot.loadFile(MicPlot.java:1441)
    at MicPlot.miOpen_Action(MicPlot.java:1267)
    at MicPlot$SymAction.actionPerformed(MicPlot.java:1184)
    at java.awt.MenuItem.processActionEvent(MenuItem.java:588)
    at java.awt.MenuItem.processEvent(MenuItem.java:548)
    at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:285)
    at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:273)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:452)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    Dynamic libraries:
    0x10000 /opt/java/jdk1.4/bin/java
    0xff360000 /usr/lib/libthread.so.1
    0xff3a0000 /usr/lib/libdl.so.1
    0xff280000 /usr/lib/libc.so.1
    0xff270000 /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1
    0xfe000000 /opt/java/j2sdk1.4.1/jre/lib/sparc/client/libjvm.so
    0xff220000 /usr/lib/libCrun.so.1
    0xff200000 /usr/lib/libsocket.so.1
    0xff100000 /usr/lib/libnsl.so.1
    0xff1d0000 /usr/lib/libm.so.1
    0xff250000 /usr/lib/libw.so.1
    0xff0e0000 /usr/lib/libmp.so.2
    0xff0b0000 /opt/java/j2sdk1.4.1/jre/lib/sparc/native_threads/libhpi.so
    0xff080000 /opt/java/j2sdk1.4.1/jre/lib/sparc/libverify.so
    0xff030000 /opt/java/j2sdk1.4.1/jre/lib/sparc/libjava.so
    0xfe7e0000 /opt/java/j2sdk1.4.1/jre/lib/sparc/libzip.so
    0xfe4e0000 /usr/lib/locale/en_US.ISO8859-1/en_US.ISO8859-1.so.2
    0xedd00000 /opt/java/j2sdk1.4.1/jre/lib/sparc/libawt.so
    0xfc480000 /opt/java/j2sdk1.4.1/jre/lib/sparc/libmlib_image.so
    0xfc410000 /opt/java/j2sdk1.4.1/jre/lib/sparc/motif21/libmawt.so
    0xeda80000 /usr/dt/lib/libXm.so.4
    0xfa090000 /usr/openwin/lib/libXt.so.4
    0xfa3d0000 /usr/openwin/lib/libXext.so.0
    0xfc7e0000 /usr/openwin/lib/libXtst.so.1
    0xed980000 /usr/openwin/lib/libX11.so.4
    0xfa2a0000 /usr/openwin/lib/libdps.so.5
    0xfa3b0000 /usr/openwin/lib/libSM.so.6
    0xfa1d0000 /usr/openwin/lib/libICE.so.6
    0xed880000 /opt/java/j2sdk1.4.1/jre/lib/sparc/libfontmanager.so
    0xfa390000 /usr/openwin/lib/locale/common/xlibi18n.so.2
    0xfa1b0000 /usr/openwin/lib/locale/iso8859-1/xomEuro.so.2
    0xfa190000 /usr/lib//liblayout.so
    0xfa050000 /usr/openwin/lib/locale/common/ximlocal.so.2
    0xfa010000 /usr/u/lal/micview/micview2_1_0_beta1/libBitmapImpl.so
    Local Time = Thu Oct 3 13:32:47 2002
    Elapsed Time = 35
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.4.1-beta-b14 mixed mode)
    # An error report file has been saved as hs_err_pid27692.log.
    # Please refer to the file for further information.
    Abort
    From this information I think that the problem should be in the native method setDebug. But I have tried to set a breakpoint at the beginning of that function in the C part but with no luck. The application crashes before it reaches that position in the C file.
    What could possibly go wrong between the setDebug function in the C part and the function call in the Java part?
    When using GDB, GDB cannot figure out what is wrong it just returns a hex address, no function name.
    I would really appreciate some help. I have tried everything that I can come up with!
    Best regards
    Lars

    I have figured out that the application fails on its first call to the native methods.
    So I have this Bitmap class that contains all the native calls and it is defined shortly as follow:
    public class Bitmap {
    static {
    System.loadLibrary("BitmapImpl");
    native void setDebug(int debuglevel, int statistics);
    There are many more native methods defined in Bitmap, but I only show the setDebug method because that is the first one that is executed and also the one that immediately fails.
    My setDebug C function is defined as follow in BitmapImpl.c
    #include <time.h>
    #include <stdio.h>
    #include <limits.h>
    #include <fcntl.h>
    #include <jni.h>
    #include <math.h>
    #include <errno.h>
    #include "Bitmap.h"
    #include "data.h"
    jint debug = 0;
    jint statistics = 1;
    JNIEXPORT void JNICALL Java_Bitmap_setDebug
    (JNIEnv *jenv, jobject jo, jint d, jint s)
    debug = d;
    statistics = s;
    My libBitmapImpl.so file is compiled using the following Makefile and using GNU gcc:
    JAVAPATH=$(JAVAINCLUDEPATH)
    LMACRO=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DSOLARIS
    CSOURCE=BitmapImpl.c
    all:
    gcc -O3 -G $(LMACRO) -I$(JAVAPATH) -I$(JAVAPATH)/solaris \
    $(CSOURCE) -o libBitmapImpl.so
    It is still a total mystory why the application fails. I have tried it on a RedHat Linux machine and there it works fine. But not on Solaris. Only if I use the jdk1.1.8 but not a later one.
    Would really appreiciate some help!
    Best regards
    Lars

  • App crash when using JNI callbacks

    Hi all,
    I have a solaris application which crashes when I try to callback the JNI methods from the native code. The description of the problem is below
    Written a native library, the library is multithreaded (i.e) I create a thread using pthread_create() in the native code which performs the operation of calling a JAVA method from the native code. The routine of calling the JAVA method works perfectly from elsewhere.
    There are two scenarios I've tested it in
    1. I created a thread (say X) from the main thread (say Y) and made the y to wait until the X is complete using the pthread_join(). The JAVA callbacks work fine when called from Y but the app crashes if done from X.
    2. Did not make the Y to wait until the X is complete, hoping that both will run paralelly and even the the App crashes.
    And to be precise the Y is the thread where the native method is called from JAVA.
    I have tested for any memory leaks or stack corruption by removing the JAVA callbacks and bulding a executable and using purify, the report doesnot hint any such occurances.
    The linker options used for building the shared library is as follows
    ${GPP} ${INC} -G ${LIB} -mt -g -lCstd -lCrun -lpthread ${OBJS} -o <lib-name>
    I wonder if we can create threads in the native code when using JAVA callbacks and even if we can whether it would be appropiate to use the callbacks with in the threads
    Looking forward for any help.
    Regards,
    Vamsi

    Guys... can't any one help me with this problem :(

  • JVM Crash When Using JNI and COM

    I'm trying to call a DLL compiled from VB6 source code that I do not have access to. The VB6 code simply retrieves data from a DB2 database using ADO and my client code grabs that data and marshals it to my Java code. I'm attempting to achieve this using JNI and COM (without a third-party bridge). It works 75% of the time, but the other 25% of the time, the JVM crashes with the usual Hotspot crash log containing an access violation exception. However, I don't know what in my C++ code (VC++ 8) could be causing this except for passing a "wild" pointer to the code lying underneath the COM object interface. If that is the case, I don't know how I am doing that.
    The Java code that is calling my native method is running on Tomcat 5.5.25 and just to be safe, I am not allowing multiple threads to concurrently call the method in my JNI DLL (though I realize that this will kill performance). Once I can get past this problem, I'll do the COM interfacing on a worker thread in my native code so I don't screw up CoInitialize and CoUninitialize calls in the case the same thread is concurrently executing multiple calls to my native code.
    I've noticed that in most cases, the JVM crashes during my call to the pClsAccount->OpenConnection method. However, my DLL isn't what is listed on the top of the call stack, which is why I suspect the passing of a wild pointer, though I'm just taking a guess at that. Does anyone have an idea as to what's going on ?
    JNIEXPORT jobject JNICALL Java_CustomerInfo_nGetCustomerAccountInfo(JNIEnv *env, jobject customerInfo, jstring accountNumber, jstring iniFileName)
    jboolean isCopy;
    // Account info class and instance to be instantiated
    jclass accountInfoCls = NULL;
    jobject accountInfoObj = NULL;
    // The constructor ID of the accountInfoCls
    jmethodID ctorID = NULL;
    // Pointer to the interface for the ClsAccount COM object
    _clsAccount *pClsAccount = NULL;
    HRESULT hr;
    BSTR bstrIniFileName(L"");
    try
    const char *nativeAccountNumber = NULL;
    if (accountNumber != NULL)
    nativeAccountNumber = env->GetStringUTFChars(accountNumber, &isCopy);
    else
    jclass newExcCls;
    env->ExceptionDescribe();
    env->ExceptionClear();
    newExcCls = env->FindClass("java/lang/IllegalArgumentException");
    env->ThrowNew(newExcCls, "accountNumber passed in was null !");
    return NULL;
    // Initialization
    variantt varConnectionSucceeded = variantt(false);
    variantt varGetAccountInfoSucceeded = variantt(false);
    variantt varAccountNumber = variantt(nativeAccountNumber);
    bstrt bstrLastPaymentDate = bstrt();
    bstrt bstrLastErrorMessage = bstrt();
    bstrt bstrLastErrorNumber = bstrt();
    jlong jTotalDue = NULL;
    jlong jEstablishedDueDay = NULL;
    jlong jLastPaymentAmount = NULL;
    jstring jLastPaymentDate = NULL;
    jstring jLastErrorMessage = NULL;
    jstring jLastErrorNumber = NULL;
    jthrowable jException = NULL;
    const char *chLastPaymentDate = NULL;
    const char *chLastErrorMessage = NULL;
    const char *chLastErrorNumber = NULL;
    long long totalDue;
    long long lastPaymentAmount;
    long establishedDueDateDay;
    //Convert string from Java string to C string to VB string
    const char *nativeIniFileName = NULL;
    if (iniFileName != NULL)
    nativeIniFileName = env->GetStringUTFChars(iniFileName, &isCopy);
    else
    jclass newExcCls;
    env->ExceptionDescribe();
    env->ExceptionClear();
    newExcCls = env->FindClass("java/lang/IllegalArgumentException");
    env->ThrowNew(newExcCls, "iniFileName passed in was null");
    return NULL;
    bstrIniFileName = comutil::ConvertStringToBSTR(nativeIniFileName);
    CoInitialize(NULL);
    // Create an instance of the COClass with the interface over it
    hr = CoCreateInstance(__uuidof(clsAccount), NULL, CLSCTX_INPROC_SERVER, __uuidof(_clsAccount), (void **)&pClsAccount);
    if (hr == S_OK)
    varConnectionSucceeded.boolVal = pClsAccount->OpenConnection(&bstrIniFileName);
    &#12288;
    if (varConnectionSucceeded.boolVal == -1)
    varGetAccountInfoSucceeded.boolVal = pClsAccount->GetAccountPaymentInformation(&(varAccountNumber.GetVARIANT()));
    env->ReleaseStringUTFChars(accountNumber, nativeAccountNumber);
    // Extract all available account information from the ClsAccount object
    if (varGetAccountInfoSucceeded.boolVal == -1)
    totalDue = pClsAccount->TotalDue.int64;
    establishedDueDateDay = pClsAccount->EstablishedDueDateDay;
    lastPaymentAmount = pClsAccount->LastPaymentAmount.int64;
    bstrLastPaymentDate = pClsAccount->LastPaymentDate;
    chLastPaymentDate = comutil::ConvertBSTRToString(bstrLastPaymentDate.GetBSTR());
    jTotalDue = (jlong)totalDue;
    jEstablishedDueDay = (jlong)establishedDueDateDay;
    jLastPaymentAmount = (jlong)lastPaymentAmount;
    jLastPaymentDate = env->NewStringUTF(chLastPaymentDate);
    delete[] chLastPaymentDate;
    pClsAccount->CloseConnection();
    // Populate error fields if any errors occur
    bstrLastErrorMessage = pClsAccount->LastErrMessage;
    chLastErrorMessage = comutil::ConvertBSTRToString(bstrLastErrorMessage.GetBSTR());
    bstrLastErrorNumber = pClsAccount->LastErrNumber;
    chLastErrorNumber = comutil::ConvertBSTRToString(bstrLastErrorNumber.GetBSTR());
    jLastErrorMessage = env->NewStringUTF(chLastErrorMessage);
    jLastErrorNumber = env->NewStringUTF(chLastErrorNumber);
    delete[] chLastErrorMessage;
    delete[] chLastErrorNumber;
    const char* clsName = "com/nuance/merchantsmutual/businessentities/CustomerAccountInfo";
    // Find the Java class and the ID of its constructor
    accountInfoCls = env->FindClass(clsName);
    ctorID = env->GetMethodID(accountInfoCls, "<init>", "(JJJLjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
    jException = env->ExceptionOccurred();
    if (jException != NULL)
    env->ExceptionDescribe();
    env->ExceptionClear();
    //Release all resources associated with the ClsAccount instance
    pClsAccount->Release();
    //Instantiate the class with the given parameters
    accountInfoObj = env->NewObject(accountInfoCls, ctorID, jTotalDue, jEstablishedDueDay, jLastPaymentAmount, jLastPaymentDate, jLastErrorMessage, jLastErrorNumber);
    jException = env->ExceptionOccurred();
    if (jException != NULL)
    env->ExceptionDescribe();
    env->ExceptionClear();
    else if (hr == REGDB_E_CLASSNOTREG)
    cout << "COM class not registered" << endl;
    else if ( hr == CLASS_E_NOAGGREGATION)
    cout << "COM class can't be aggregated" << endl;
    else if (hr == E_NOINTERFACE)
    cout << "No interface for COM class clsAccount" << endl;
    else if (hr == E_POINTER)
    cout << "*ppv pointer was NULL !" << endl;
    else
    cout << "Error occurred while creating COM object. HR is [" << hr << "]" << endl;
    // Free the BSTR because a new one was returned with a call to comutil::ConvertStringToBSTR
    SysFreeString(bstrIniFileName);
    // Release the string when it's no longer needed. MUST call if string won't be used
    // anymore or else a memory leak will occur
    env->ReleaseStringUTFChars(iniFileName, nativeIniFileName);
    CoUninitialize();
    &#12288;
    catch (_com_error &e)
    cout << "Encountered an exception in GetCustomerAccountInfo: Error was " << e.ErrorMessage();
    pClsAccount->Release();
    catch (...)
    pClsAccount->Release();
    return accountInfoObj;
    Edited by: Cthulhu76 on Jan 5, 2010 9:18 AM

    0x49202400 JavaThread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon [_thread_blocked, id=5340, stack(0x49bf0000,0x49c40000)]
    0x48a7e800 JavaThread "Thread-1" [_thread_in_native, id=5976, stack(0x48f00000,0x48f50000)]
    0x48a0dc00 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3072, stack(0x48c60000,0x48cb0000)]
    0x48a09000 JavaThread "CompilerThread0" daemon [_thread_blocked, id=4988, stack(0x48c10000,0x48c60000)]
    0x48a07c00 JavaThread "Attach Listener" daemon [_thread_blocked, id=3124, stack(0x48bc0000,0x48c10000)]
    0x48a07000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2572, stack(0x48b70000,0x48bc0000)]
    0x489f5c00 JavaThread "Finalizer" daemon [_thread_blocked, id=5752, stack(0x48b20000,0x48b70000)]
    0x489f4c00 JavaThread "Reference Handler" daemon [_thread_blocked, id=2596, stack(0x48ad0000,0x48b20000)]
    0x003c6000 JavaThread "main" [_thread_in_native, id=4252, stack(0x00820000,0x00870000)]
    Other Threads:
    0x489f0400 VMThread [stack: 0x48a80000,0x48ad0000] [id=5624]
    0x48a18800 WatcherThread [stack: 0x48cb0000,0x48d00000] [id=1192]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 36288K, used 12762K [0x02940000, 0x050a0000, 0x07800000)
    eden space 32256K, 34% used [0x02940000, 0x0343af58, 0x048c0000)
    from space 4032K, 37% used [0x04cb0000, 0x04e2ba28, 0x050a0000)
    to space 4032K, 0% used [0x048c0000, 0x048c0000, 0x04cb0000)
    tenured generation total 483968K, used 7518K [0x07800000, 0x250a0000, 0x42940000)
    the space 483968K, 1% used [0x07800000, 0x07f57958, 0x07f57a00, 0x250a0000)
    compacting perm gen total 14080K, used 14016K [0x42940000, 0x43700000, 0x46940000)
    the space 14080K, 99% used [0x42940000, 0x436f0320, 0x436f0400, 0x43700000)
    No shared spaces configured.
    Dynamic libraries:
    0x00400000 - 0x0040f000      C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\tomcat5.exe
    0x7c800000 - 0x7c8c0000      C:\WINDOWS\system32\ntdll.dll
    0x77e40000 - 0x77f42000      C:\WINDOWS\system32\kernel32.dll
    0x77380000 - 0x77411000      C:\WINDOWS\system32\USER32.dll
    0x77c00000 - 0x77c48000      C:\WINDOWS\system32\GDI32.dll
    0x77f50000 - 0x77feb000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77c50000 - 0x77cef000      C:\WINDOWS\system32\RPCRT4.dll
    0x76f50000 - 0x76f63000      C:\WINDOWS\system32\Secur32.dll
    0x77ba0000 - 0x77bfa000      C:\WINDOWS\system32\MSVCRT.dll
    0x7c8d0000 - 0x7d0cf000      C:\WINDOWS\system32\SHELL32.dll
    0x77da0000 - 0x77df2000      C:\WINDOWS\system32\SHLWAPI.dll
    0x76290000 - 0x762ad000      C:\WINDOWS\system32\IMM32.DLL
    0x77420000 - 0x77523000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.3790.3959_x-ww_D8713E55\comctl32.dll
    0x6d7c0000 - 0x6da10000      C:\Program Files\Java\jre1.6.0_07\bin\client\jvm.dll
    0x76aa0000 - 0x76acd000      C:\WINDOWS\system32\WINMM.dll
    0x7c340000 - 0x7c396000      C:\WINDOWS\system32\MSVCR71.dll
    0x6d270000 - 0x6d278000      C:\Program Files\Java\jre1.6.0_07\bin\hpi.dll
    0x76b70000 - 0x76b7b000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d770000 - 0x6d77c000      C:\Program Files\Java\jre1.6.0_07\bin\verify.dll
    0x6d310000 - 0x6d32f000      C:\Program Files\Java\jre1.6.0_07\bin\java.dll
    0x6d7b0000 - 0x6d7bf000      C:\Program Files\Java\jre1.6.0_07\bin\zip.dll
    0x6d570000 - 0x6d583000      C:\Program Files\Java\jre1.6.0_07\bin\net.dll
    0x71c00000 - 0x71c17000      C:\WINDOWS\system32\WS2_32.dll
    0x71bf0000 - 0x71bf8000      C:\WINDOWS\system32\WS2HELP.dll
    0x71b20000 - 0x71b61000      C:\WINDOWS\system32\mswsock.dll
    0x5f270000 - 0x5f2ca000      C:\WINDOWS\system32\hnetcfg.dll
    0x71ae0000 - 0x71ae8000      C:\WINDOWS\System32\wshtcpip.dll
    0x76ed0000 - 0x76efa000      C:\WINDOWS\system32\DNSAPI.dll
    0x76f70000 - 0x76f77000      C:\WINDOWS\System32\winrnr.dll
    0x76f10000 - 0x76f3e000      C:\WINDOWS\system32\WLDAP32.dll
    0x76f80000 - 0x76f85000      C:\WINDOWS\system32\rasadhlp.dll
    0x4a6a0000 - 0x4a6ac000      C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\MMI\WEB-INF\lib\CustomerInfoProxy.dll
    0x77670000 - 0x777a9000      C:\WINDOWS\system32\ole32.dll
    0x77d00000 - 0x77d8b000      C:\WINDOWS\system32\OLEAUT32.dll
    0x7c420000 - 0x7c4a7000      C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_E6967989\MSVCP80.dll
    0x78130000 - 0x781cb000      C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_E6967989\MSVCR80.dll
    0x777b0000 - 0x77833000      C:\WINDOWS\system32\CLBCatQ.DLL
    0x77010000 - 0x770d6000      C:\WINDOWS\system32\COMRes.dll
    0x77b90000 - 0x77b98000      C:\WINDOWS\system32\VERSION.dll
    0x75da0000 - 0x75e5d000      C:\WINDOWS\system32\SXS.DLL
    0x75e60000 - 0x75e87000      C:\WINDOWS\system32\apphelp.dll
    0x4dc30000 - 0x4dc5e000      C:\WINDOWS\system32\msctfime.ime
    0x4b0d0000 - 0x4b395000      C:\WINDOWS\system32\xpsp2res.dll
    0x71bb0000 - 0x71bb9000      C:\WINDOWS\system32\WSOCK32.dll
    0x4bbe0000 - 0x4bbea000      C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\MMI\WEB-INF\lib\ClearTranProxy.dll
    0x745e0000 - 0x7489e000      C:\WINDOWS\system32\msi.dll
    0x71c40000 - 0x71c97000      C:\WINDOWS\system32\NETAPI32.dll
    0x4bc50000 - 0x4bc6c000      C:\WINDOWS\system32\DBNETLIB.DLL
    0x71f60000 - 0x71f64000      C:\WINDOWS\system32\security.dll
    0x76c90000 - 0x76cb7000      C:\WINDOWS\system32\msv1_0.dll
    0x76cf0000 - 0x76d0a000      C:\WINDOWS\system32\iphlpapi.dll
    0x761b0000 - 0x76243000      C:\WINDOWS\system32\crypt32.dll
    0x76190000 - 0x761a2000      C:\WINDOWS\system32\MSASN1.dll
    0x4bcf0000 - 0x4bcff000      C:\Program Files\Common Files\System\Ole DB\SQLOLEDB.RLL
    0x4a8a0000 - 0x4a8aa000      C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\MMI\WEB-INF\lib\MIGI.DLL
    0x73570000 - 0x736c2000      C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\MMI\WEB-INF\lib\MSVBVM60.DLL
    0x4a950000 - 0x4a9e2000      C:\Program Files\Common Files\System\ado\msado15.dll
    0x74a50000 - 0x74a6a000      C:\WINDOWS\system32\MSDART.DLL
    0x4c850000 - 0x4c8c9000      C:\Program Files\Common Files\System\Ole DB\oledb32.dll
    0x4dbb0000 - 0x4dbc1000      C:\Program Files\Common Files\System\Ole DB\OLEDB32R.DLL
    VM Arguments:
    jvm_args: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 5.5 -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 5.5 -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\endorsed -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 5.5\temp -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\logging.properties -Djava.library.path=C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\MMI\WEB-INF\lib vfprintf -Xms512m -Xmx1024m
    java_command: <unknown>
    Launcher Type: generic
    Environment Variables:
    JAVA_HOME=C:\Program Files\Java\jdk1.6.0_07
    [error occurred during error reporting (printing environment variables), id 0xc0000005]
    --------------- S Y S T E M ---------------
    OS: Windows Server 2003 family Build 3790 Service Pack 2
    CPU:total 4 (4 cores per cpu, 1 threads per core) family 6 model 7 stepping 6, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3
    Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k free)
    vm_info: Java HotSpot(TM) Client VM (10.0-b23) for windows-x86 JRE (1.6.0_07-b06), built on Jun 10 2008 01:14:11 by "java_re" with MS VC++ 7.1
    time: Mon Dec 28 15:24:00 2009
    elapsed time: 600 seconds

  • Variety of periodic JVM crashes (no JNI)

    Hello,
    I have a J2SE application that runs on a Linux box that is getting a number of various JVM crashes. The program has no JNI and does not use any libraries, it's all just Java. The call stacks are always different, and I don't see any consistency in what is happening in the application when the JVM crashes. It does however always seem to be a SIGSEGV. Sometimes they happen after 2 minutes of uptime, sometimes after days.
    I tried upgrading the JVM from 6.0_27-b07 to 7.0_06-b24 but it has made no difference. I uploaded all the hs_err logs here: http://www.tacticstudios.com/downloads/logs.rar if you would like to take a look.
    Due to the inconsistent call stacks my only assumption is that memory is getting corrupted in some way, and the crash is occurring later on.  Maybe it is a hardware problem? I'm not certain what would cause this.
    Any assistance you can provide in how to debug this, or any ideas would be extremely appreciated. I have pasted the most recent error log below.
    Jesse
    # A fatal error has been detected by the Java Runtime Environment:
    #  SIGSEGV (0xb) at pc=0x00007fbcc8a16bd4, pid=3126, tid=140448514426624
    # JRE version: 7.0_06-b24
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (23.2-b09 mixed mode linux-amd64 compressed oops)
    # Problematic frame:
    # V  [libjvm.so+0x7b5bd4]  PhaseChaitin::Split(unsigned int)+0x8e4
    # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
    # If you would like to submit a bug report, please visit:
    #   http://bugreport.sun.com/bugreport/crash.jsp
    ---------------  T H R E A D  ---------------
    Current thread (0x00007fbcc40e7800):  JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=3145, stack(0x00007fbcb7bfc000,0x00007fbcb7cfd000)]
    siginfo:si_signo=SIGSEGV: si_errno=0, si_code=128 (), si_addr=0x0000000000000000
    Registers:
    RAX=0x00007fbc89897540, RBX=0x00007fbc88e499f0, RCX=0x00007fbc898974b0, RDX=0x0000000000000000
    RSP=0x00007fbcb7cf8390, RBP=0x00007fbcb7cf8820, RSI=0x0000000000000004, RDI=0x00007fbc88e499f0
    R8 =0x0000000000000181, R9 =0x0000000000000004, R10=0x0000000000000001, R11=0x00007fbc88e69390
    R12=0x0000000000000000, R13=0x0000000000000001, R14=0x00007fbc88e499f0, R15=0xf100000000000000
    RIP=0x00007fbcc8a16bd4, EFLAGS=0x0000000000010202, CSGSFS=0x0000000000000033, ERR=0x0000000000000000
      TRAPNO=0x000000000000000d
    Top of Stack: (sp=0x00007fbcb7cf8390)
    0x00007fbcb7cf8390:   00007fbcb7cf83d0 00007fbcc897d002
    0x00007fbcb7cf83a0:   0000000000000000 0000000000000000
    0x00007fbcb7cf83b0:   000000000000002a 00007fbcb7cf8a40
    0x00007fbcb7cf83c0:   0101010101010101 0101010101010101
    0x00007fbcb7cf83d0:   0000000000000000 0000000000000000
    0x00007fbcb7cf83e0:   00007fbcb7cf8690 00007fbcb7cf8650
    0x00007fbcb7cf83f0:   00007fbcb7cf8670 00007fbcb7cf8750
    0x00007fbcb7cf8400:   0000000000000007 00007fbc88f97d90
    0x00007fbcb7cf8410:   0000000000000000 00007fbcb7cf8a40
    0x00007fbcb7cf8420:   00007fbc8908f210 00007fbcc848c156
    0x00007fbcb7cf8430:   00007fbcb7cf8490 0000000000000004
    0x00007fbcb7cf8440:   00007fbc88712fc8 00007fbc8908f188
    0x00007fbcb7cf8450:   0000000000000008 0000000000002940
    0x00007fbcb7cf8460:   00007fbcb7cf9f90 00007fbc883f9cc0
    0x00007fbcb7cf8470:   00007fbc883fa590 0000000000000000
    0x00007fbcb7cf8480:   0000000000000090 00007fbcb7cf8a40
    0x00007fbcb7cf8490:   00007fbc8909b580 00007fbc8908f188
    0x00007fbcb7cf84a0:   00007fbcb7cfa058 00007fbcc846c6ce
    0x00007fbcb7cf84b0:   0000000000000003 0000011ac8ac9296
    0x00007fbcb7cf84c0:   00007fbc883fb850 00007fbc88b58600
    0x00007fbcb7cf84d0:   00007fbc88b58640 00007fbc883fc120
    0x00007fbcb7cf84e0:   01007fbc8908f260 00007fbc898974b0
    0x00007fbcb7cf84f0:   00007fbc88b51000 00007fbc88348b90
    0x00007fbcb7cf8500:   00007fbc883f4990 0000007888107a90
    0x00007fbcb7cf8510:   00007fbcb7cf8500 00007fbcc848c03f
    0x00007fbcb7cf8520:   00007fbcb7cf89e0 00000000000000f0
    0x00007fbcb7cf8530:   0000000000000009 0000000000000013
    0x00007fbcb7cf8540:   00007fbcc8f37280 00007fbcc8763c94
    0x00007fbcb7cf8550:   0000000000000008 00007fbcb7cfade0
    0x00007fbcb7cf8560:   00007fbcc8f37280 00007fbcc8763ac0
    0x00007fbcb7cf8570:   00007fbc88071000 0000000000000048
    0x00007fbcb7cf8580:   0000000000000002 0000000000070d60
    Instructions: (pc=0x00007fbcc8a16bd4)
    0x00007fbcc8a16bb4:   84 f6 0f 84 dc 1b 00 00 48 8b 8d c8 fc ff ff 45
    0x00007fbcc8a16bc4:   31 f6 8b 71 18 85 f6 74 07 48 8b 41 20 4c 8b 30
    0x00007fbcc8a16bd4:   49 8b 07 4c 89 ff ff 50 28 48 8b b5 c8 fc ff ff
    0x00007fbcc8a16be4:   48 89 85 78 fc ff ff 31 c0 8b 56 18 85 d2 74 07
    Register to memory mapping:
    RAX=0x00007fbc89897540 is an unknown value
    RBX=0x00007fbc88e499f0 is an unknown value
    RCX=0x00007fbc898974b0 is an unknown value
    RDX=0x0000000000000000 is an unknown value
    RSP=0x00007fbcb7cf8390 is pointing into the stack for thread: 0x00007fbcc40e7800
    RBP=0x00007fbcb7cf8820 is pointing into the stack for thread: 0x00007fbcc40e7800
    RSI=0x0000000000000004 is an unknown value
    RDI=0x00007fbc88e499f0 is an unknown value
    R8 =0x0000000000000181 is an unknown value
    R9 =0x0000000000000004 is an unknown value
    R10=0x0000000000000001 is an unknown value
    R11=0x00007fbc88e69390 is an unknown value
    R12=0x0000000000000000 is an unknown value
    R13=0x0000000000000001 is an unknown value
    R14=0x00007fbc88e499f0 is an unknown value
    R15=0xf100000000000000 is an unknown value
    Stack: [0x00007fbcb7bfc000,0x00007fbcb7cfd000],  sp=0x00007fbcb7cf8390,  free space=1008k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    V  [libjvm.so+0x7b5bd4]  PhaseChaitin::Split(unsigned int)+0x8e4
    V  [libjvm.so+0x347d4e]  PhaseChaitin::Register_Allocate()+0x48e
    V  [libjvm.so+0x3ba1dd]  Compile::Code_Gen()+0x3ad
    V  [libjvm.so+0x3bcde5]  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool)+0xe15
    V  [libjvm.so+0x32eaf2]  C2Compiler::compile_method(ciEnv*, ciMethod*, int)+0x142
    V  [libjvm.so+0x3c1d03]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x323
    V  [libjvm.so+0x3c2e6d]  CompileBroker::compiler_thread_loop()+0x43d
    V  [libjvm.so+0x864ec8]  JavaThread::thread_main_inner()+0xc8
    V  [libjvm.so+0x865018]  JavaThread::run()+0x138
    V  [libjvm.so+0x746a00]  java_start(Thread*)+0x100
    Current CompileTask:
    C2:5652858  298             Main.GameObject::aiMoveUnit (1510 bytes)
    ---------------  P R O C E S S  ---------------
    Java Threads: ( => current thread )
      0x00007fbc68018000 JavaThread "Thread-107" [_thread_in_native, id=4598, stack(0x00007fbcb53d9000,0x00007fbcb54da000)]
      0x00007fbc68017000 JavaThread "Thread-108" [_thread_blocked, id=4597, stack(0x00007fbcb52d8000,0x00007fbcb53d9000)]
      0x00007fbc68012000 JavaThread "Thread-100" [_thread_in_native, id=4442, stack(0x00007fbcb59df000,0x00007fbcb5ae0000)]
      0x00007fbc68011800 JavaThread "Thread-101" [_thread_blocked, id=4441, stack(0x00007fbcb58de000,0x00007fbcb59df000)]
      0x00007fbc68016000 JavaThread "Thread-93" [_thread_in_native, id=4405, stack(0x00007fbcb57dd000,0x00007fbcb58de000)]
      0x00007fbc68015000 JavaThread "Thread-94" [_thread_blocked, id=4404, stack(0x00007fbcb56dc000,0x00007fbcb57dd000)]
      0x00007fbc68014000 JavaThread "Thread-85" [_thread_in_native, id=4322, stack(0x00007fbcb54da000,0x00007fbcb55db000)]
      0x00007fbc68013000 JavaThread "Thread-86" [_thread_blocked, id=4321, stack(0x00007fbcb55db000,0x00007fbcb56dc000)]
      0x00007fbc6801d000 JavaThread "Thread-79" [_thread_in_native, id=4308, stack(0x00007fbcb68f2000,0x00007fbcb69f3000)]
      0x00007fbc68001000 JavaThread "Thread-80" [_thread_blocked, id=4307, stack(0x00007fbcb69f3000,0x00007fbcb6af4000)]
      0x00007fbc68010800 JavaThread "Thread-41" [_thread_in_native, id=3373, stack(0x00007fbcb5be1000,0x00007fbcb5ce2000)]
      0x00007fbc6800f800 JavaThread "Thread-42" [_thread_blocked, id=3372, stack(0x00007fbcb5ae0000,0x00007fbcb5be1000)]
      0x00007fbc6800e800 JavaThread "Thread-36" [_thread_in_native, id=3343, stack(0x00007fbcb5de3000,0x00007fbcb5ee4000)]
      0x00007fbc6800d800 JavaThread "Thread-37" [_thread_blocked, id=3342, stack(0x00007fbcb5ce2000,0x00007fbcb5de3000)]
      0x00007fbc6800c800 JavaThread "Thread-28" [_thread_in_native, id=3325, stack(0x00007fbcb5ee4000,0x00007fbcb5fe5000)]
      0x00007fbc6800b800 JavaThread "Thread-29" [_thread_blocked, id=3324, stack(0x00007fbcb5fe5000,0x00007fbcb60e6000)]
      0x00007fbc6800a000 JavaThread "Thread-19" [_thread_in_native, id=3214, stack(0x00007fbcb60e6000,0x00007fbcb61e7000)]
      0x00007fbc68008800 JavaThread "Thread-20" [_thread_blocked, id=3213, stack(0x00007fbcb61e7000,0x00007fbcb62e8000)]
      0x00007fbc68007800 JavaThread "Thread-17" [_thread_in_native, id=3211, stack(0x00007fbcb62e8000,0x00007fbcb63e9000)]
      0x00007fbc68006800 JavaThread "Thread-18" [_thread_blocked, id=3210, stack(0x00007fbcb63e9000,0x00007fbcb64ea000)]
      0x00007fbc68003000 JavaThread "Thread-11" [_thread_in_native, id=3190, stack(0x00007fbcb67f1000,0x00007fbcb68f2000)]
      0x00007fbc68002000 JavaThread "Thread-12" [_thread_blocked, id=3189, stack(0x00007fbcb64ea000,0x00007fbcb65eb000)]
      0x00007fbc74005800 JavaThread "Thread-5" [_thread_in_native, id=3162, stack(0x00007fbcb6af4000,0x00007fbcb6bf5000)]
      0x00007fbc74004000 JavaThread "Thread-1" [_thread_blocked, id=3161, stack(0x00007fbcb6bf5000,0x00007fbcb6cf6000)]
      0x00007fbc7800e800 JavaThread "Thread-3" [_thread_in_native, id=3160, stack(0x00007fbcb6cf6000,0x00007fbcb6df7000)]
      0x00007fbc7800d000 JavaThread "Thread-4" [_thread_blocked, id=3159, stack(0x00007fbcb6df7000,0x00007fbcb6ef8000)]
      0x00007fbcc4007800 JavaThread "DestroyJavaVM" [_thread_blocked, id=3135, stack(0x00007fbcc8160000,0x00007fbcc8261000)]
      0x00007fbcc4625800 JavaThread "Thread-2" [_thread_in_native, id=3149, stack(0x00007fbcb6ef8000,0x00007fbcb6ff9000)]
      0x00007fbcc4619800 JavaThread "Thread-0" [_thread_blocked, id=3148, stack(0x00007fbcb6ff9000,0x00007fbcb70fa000)]
      0x00007fbcc40ea000 JavaThread "Service Thread" daemon [_thread_blocked, id=3146, stack(0x00007fbcb7afb000,0x00007fbcb7bfc000)]
    =>0x00007fbcc40e7800 JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=3145, stack(0x00007fbcb7bfc000,0x00007fbcb7cfd000)]
      0x00007fbcc40e4800 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=3144, stack(0x00007fbcb7cfd000,0x00007fbcb7dfe000)]
      0x00007fbcc40e2800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=3143, stack(0x00007fbcb7dfe000,0x00007fbcb7eff000)]
      0x00007fbcc4099000 JavaThread "Finalizer" daemon [_thread_blocked, id=3142, stack(0x00007fbcb7eff000,0x00007fbcb8000000)]
      0x00007fbcc4096800 JavaThread "Reference Handler" daemon [_thread_blocked, id=3141, stack(0x00007fbcbc0ef000,0x00007fbcbc1f0000)]
    Other Threads:
      0x00007fbcc408f800 VMThread [stack: 0x00007fbcbc1f0000,0x00007fbcbc2f1000] [id=3140]
      0x00007fbcc40f4800 WatcherThread [stack: 0x00007fbcb79fa000,0x00007fbcb7afb000] [id=3147]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    PSYoungGen      total 108032K, used 64372K [0x00000000eaab0000, 0x00000000f53b0000, 0x0000000100000000)
      eden space 100224K, 63% used [0x00000000eaab0000,0x00000000ee8dd1b8,0x00000000f0c90000)
      from space 7808K, 9% used [0x00000000f0c90000,0x00000000f0d40000,0x00000000f1430000)
      to   space 7552K, 0% used [0x00000000f4c50000,0x00000000f4c50000,0x00000000f53b0000)
    ParOldGen       total 29952K, used 15594K [0x00000000c0000000, 0x00000000c1d40000, 0x00000000eaab0000)
      object space 29952K, 52% used [0x00000000c0000000,0x00000000c0f3a848,0x00000000c1d40000)
    PSPermGen       total 21248K, used 6931K [0x00000000bae00000, 0x00000000bc2c0000, 0x00000000c0000000)
      object space 21248K, 32% used [0x00000000bae00000,0x00000000bb4c4c10,0x00000000bc2c0000)
    Card table byte_map: [0x00007fbcc0574000,0x00007fbcc079e000] byte_map_base: 0x00007fbcbff9d000
    Polling page: 0x00007fbcc91ab000
    Code Cache  [0x00007fbcc079e000, 0x00007fbcc0a0e000, 0x00007fbcc379e000)
    total_blobs=549 nmethods=296 adapters=205 free_code_cache=47745Kb largest_free_block=48842112
    Compilation events (10 events):
    Event: 5283.138 Thread 0x00007fbcc40e4800 nmethod 293 0x00007fbcc08e5950 code [0x00007fbcc08e5a80, 0x00007fbcc08e5af8]
    Event: 5447.824 Thread 0x00007fbcc40e7800  294             Main.GameObject::aiGetMovementPath (1009 bytes)
    Event: 5447.912 Thread 0x00007fbcc40e7800 nmethod 294 0x00007fbcc0901610 code [0x00007fbcc0901a00, 0x00007fbcc0903d70]
    Event: 5481.887 Thread 0x00007fbcc40e4800  295             Main.GameObject::aiGetTargetInRange (212 bytes)
    Event: 5481.896 Thread 0x00007fbcc40e4800 nmethod 295 0x00007fbcc08e5f90 code [0x00007fbcc08e61c0, 0x00007fbcc08e68f0]
    Event: 5536.215 Thread 0x00007fbcc40e7800  296             Main.GameObject::getBestPath (333 bytes)
    Event: 5536.245 Thread 0x00007fbcc40e7800 nmethod 296 0x00007fbcc0906950 code [0x00007fbcc0906c20, 0x00007fbcc0908190]
    Event: 5553.050 Thread 0x00007fbcc40e4800  297             IsoInfo.Main.Unit::canMove (58 bytes)
    Event: 5553.051 Thread 0x00007fbcc40e4800 nmethod 297 0x00007fbcc08e77d0 code [0x00007fbcc08e7920, 0x00007fbcc08e7a78]
    Event: 5652.525 Thread 0x00007fbcc40e7800  298             Main.GameObject::aiMoveUnit (1510 bytes)
    GC Heap History (10 events):
    Event: 907.123 GC heap before
    {Heap before GC invocations=8 (full 1):
    PSYoungGen      total 39808K, used 32448K [0x00000000eaab0000, 0x00000000eda10000, 0x0000000100000000)
      eden space 31936K, 100% used [0x00000000eaab0000,0x00000000ec9e0000,0x00000000ec9e0000)
      from space 7872K, 6% used [0x00000000ed1e0000,0x00000000ed260000,0x00000000ed990000)
      to   space 8192K, 0% used [0x00000000ec9e0000,0x00000000ec9e0000,0x00000000ed1e0000)
    ParOldGen       total 29952K, used 15297K [0x00000000c0000000, 0x00000000c1d40000, 0x00000000eaab0000)
      object space 29952K, 51% used [0x00000000c0000000,0x00000000c0ef0798,0x00000000c1d40000)
    PSPermGen       total 21248K, used 6721K [0x00000000bae00000, 0x00000000bc2c0000, 0x00000000c0000000)
      object space 21248K, 31% used [0x00000000bae00000,0x00000000bb4904f8,0x00000000bc2c0000)
    Event: 907.125 GC heap after
    Heap after GC invocations=8 (full 1):
    PSYoungGen      total 40128K, used 768K [0x00000000eaab0000, 0x00000000ef8d0000, 0x0000000100000000)
      eden space 31936K, 0% used [0x00000000eaab0000,0x00000000eaab0000,0x00000000ec9e0000)
      from space 8192K, 9% used [0x00000000ec9e0000,0x00000000ecaa0000,0x00000000ed1e0000)
      to   space 8256K, 0% used [0x00000000ef0c0000,0x00000000ef0c0000,0x00000000ef8d0000)
    ParOldGen       total 29952K, used 15297K [0x00000000c0000000, 0x00000000c1d40000, 0x00000000eaab0000)
      object space 29952K, 51% used [0x00000000c0000000,0x00000000c0ef0798,0x00000000c1d40000)
    PSPermGen       total 21248K, used 6721K [0x00000000bae00000, 0x00000000bc2c0000, 0x00000000c0000000)
      object space 21248K, 31% used [0x00000000bae00000,0x00000000bb4904f8,0x00000000bc2c0000)
    Event: 1532.671 GC heap before
    {Heap before GC invocations=9 (full 1):
    PSYoungGen      total 40128K, used 32704K [0x00000000eaab0000, 0x00000000ef8d0000, 0x0000000100000000)
      eden space 31936K, 100% used [0x00000000eaab0000,0x00000000ec9e0000,0x00000000ec9e0000)
      from space 8192K, 9% used [0x00000000ec9e0000,0x00000000ecaa0000,0x00000000ed1e0000)
      to   space 8256K, 0% used [0x00000000ef0c0000,0x00000000ef0c0000,0x00000000ef8d0000)
    ParOldGen       total 29952K, used 15297K [0x00000000c0000000, 0x00000000c1d40000, 0x00000000eaab0000)
      object space 29952K, 51% used [0x00000000c0000000,0x00000000c0ef0798,0x00000000c1d40000)
    PSPermGen       total 21248K, used 6764K [0x00000000bae00000, 0x00000000bc2c0000, 0x00000000c0000000)
      object space 21248K, 31% used [0x00000000bae00000,0x00000000bb49b0d0,0x00000000bc2c0000)
    Event: 1532.674 GC heap after
    Heap after GC invocations=9 (full 1):
    PSYoungGen      total 71232K, used 640K [0x00000000eaab0000, 0x00000000ef870000, 0x0000000100000000)
      eden space 63360K, 0% used [0x00000000eaab0000,0x00000000eaab0000,0x00000000ee890000)
      from space 7872K, 8% used [0x00000000ef0c0000,0x00000000ef160000,0x00000000ef870000)
      to   space 8128K, 0% used [0x00000000ee890000,0x00000000ee890000,0x00000000ef080000)
    ParOldGen       total 29952K, used 15297K [0x00000000c0000000, 0x00000000c1d40000, 0x00000000eaab0000)
      object space 29952K, 51% used [0x00000000c0000000,0x00000000c0ef0798,0x00000000c1d40000)
    PSPermGen       total 21248K, used 6764K [0x00000000bae00000, 0x00000000bc2c0000, 0x00000000c0000000)
      object space 21248K, 31% used [0x00000000bae00000,0x00000000bb49b0d0,0x00000000bc2c0000)
    Event: 2415.833 GC heap before
    {Heap before GC invocations=10 (full 1):
    PSYoungGen      total 71232K, used 64000K [0x00000000eaab0000, 0x00000000ef870000, 0x0000000100000000)
      eden space 63360K, 100% used [0x00000000eaab0000,0x00000000ee890000,0x00000000ee890000)
      from space 7872K, 8% used [0x00000000ef0c0000,0x00000000ef160000,0x00000000ef870000)
      to   space 8128K, 0% used [0x00000000ee890000,0x00000000ee890000,0x00000000ef080000)
    ParOldGen       total 29952K, used 15297K [0x00000000c0000000, 0x00000000c1d40000, 0x00000000eaab0000)
      object space 29952K, 51% used [0x00000000c0000000,0x00000000c0ef0798,0x00000000c1d40000)
    PSPermGen       total 21248K, used 6811K [0x00000000bae00000, 0x00000000bc2c0000, 0x00000000c0000000)
      object space 21248K, 32% used [0x00000000bae00000,0x00000000bb4a6d00,0x00000000bc2c0000)
    Event: 2415.834 GC heap after
    Heap after GC invocations=10 (full 1):
    PSYoungGen      total 71488K, used 960K [0x00000000eaab0000, 0x00000000f1c60000, 0x0000000100000000)
      eden space 63360K, 0% used [0x00000000eaab0000,0x00000000eaab0000,0x00000000ee890000)
      from space 8128K, 11% used [0x00000000ee890000,0x00000000ee980000,0x00000000ef080000)
      to   space 7936K, 0% used [0x00000000f14a0000,0x00000000f14a0000,0x00000000f1c60000)
    ParOldGen       total 29952K, used 15393K [0x00000000c0000000, 0x00000000c1d40000, 0x00000000eaab0000)
      object space 29952K, 51% used [0x00000000c0000000,0x00000000c0f087e8,0x00000000c1d40000)
    PSPermGen       total 21248K, used 6811K [0x00000000bae00000, 0x00000000bc2c0000, 0x00000000c0000000)
      object space 21248K, 32% used [0x00000000bae00000,0x00000000bb4a6d00,0x00000000bc2c0000)
    Event: 3564.860 GC heap before
    {Heap before GC invocations=11 (full 1):
    PSYoungGen      total 71488K, used 64320K [0x00000000eaab0000, 0x00000000f1c60000, 0x0000000100000000)
      eden space 63360K, 100% used [0x00000000eaab0000,0x00000000ee890000,0x00000000ee890000)
      from space 8128K, 11% used [0x00000000ee890000,0x00000000ee980000,0x00000000ef080000)
      to   space 7936K, 0% used [0x00000000f14a0000,0x00000000f14a0000,0x00000000f1c60000)
    ParOldGen       total 29952K, used 15393K [0x00000000c0000000, 0x00000000c1d40000, 0x00000000eaab0000)
      object space 29952K, 51% used [0x00000000c0000000,0x00000000c0f087e8,0x00000000c1d40000)
    PSPermGen       total 21248K, used 6848K [0x00000000bae00000, 0x00000000bc2c0000, 0x00000000c0000000)
      object space 21248K, 32% used [0x00000000bae00000,0x00000000bb4b0338,0x00000000bc2c0000)
    Event: 3564.862 GC heap after
    Heap after GC invocations=11 (full 1):
    PSYoungGen      total 107584K, used 576K [0x00000000eaab0000, 0x00000000f1bd0000, 0x0000000100000000)
      eden space 100224K, 0% used [0x00000000eaab0000,0x00000000eaab0000,0x00000000f0c90000)
      from space 7360K, 7% used [0x00000000f14a0000,0x00000000f1530000,0x00000000f1bd0000)
      to   space 7808K, 0% used [0x00000000f0c90000,0x00000000f0c90000,0x00000000f1430000)
    ParOldGen       total 29952K, used 15562K [0x00000000c0000000, 0x00000000c1d40000, 0x00000000eaab0000)
      object space 29952K, 51% used [0x00000000c0000000,0x00000000c0f32848,0x00000000c1d40000)
    PSPermGen       total 21248K, used 6848K [0x00000000bae00000, 0x00000000bc2c0000, 0x00000000c0000000)
      object space 21248K, 32% used [0x00000000bae00000,0x00000000bb4b0338,0x00000000bc2c0000)
    Event: 4661.819 GC heap before
    {Heap before GC invocations=12 (full 1):
    PSYoungGen      total 107584K, used 100800K [0x00000000eaab0000, 0x00000000f1bd0000, 0x0000000100000000)
      eden space 100224K, 100% used [0x00000000eaab0000,0x00000000f0c90000,0x00000000f0c90000)
      from space 7360K, 7% used [0x00000000f14a0000,0x00000000f1530000,0x00000000f1bd0000)
      to   space 7808K, 0% used [0x00000000f0c90000,0x00000000f0c90000,0x00000000f1430000)
    ParOldGen       total 29952K, used 15562K [0x00000000c0000000, 0x00000000c1d40000, 0x00000000eaab0000)
      object space 29952K, 51% used [0x00000000c0000000,0x00000000c0f32848,0x00000000c1d40000)
    PSPermGen       total 21248K, used 6868K [0x00000000bae00000, 0x00000000bc2c0000, 0x00000000c0000000)
      object space 21248K, 32% used [0x00000000bae00000,0x00000000bb4b53c8,0x00000000bc2c0000)
    Event: 4661.820 GC heap after
    Heap after GC invocations=12 (full 1):
    PSYoungGen      total 108032K, used 704K [0x00000000eaab0000, 0x00000000f53b0000, 0x0000000100000000)
      eden space 100224K, 0% used [0x00000000eaab0000,0x00000000eaab0000,0x00000000f0c90000)
      from space 7808K, 9% used [0x00000000f0c90000,0x00000000f0d40000,0x00000000f1430000)
      to   space 7552K, 0% used [0x00000000f4c50000,0x00000000f4c50000,0x00000000f53b0000)
    ParOldGen       total 29952K, used 15594K [0x00000000c0000000, 0x00000000c1d40000, 0x00000000eaab0000)
      object space 29952K, 52% used [0x00000000c0000000,0x00000000c0f3a848,0x00000000c1d40000)
    PSPermGen       total 21248K, used 6868K [0x00000000bae00000, 0x00000000bc2c0000, 0x00000000c0000000)
      object space 21248K, 32% used [0x00000000bae00000,0x00000000bb4b53c8,0x00000000bc2c0000)
    Deoptimization events (10 events):
    Event: 1030.601 Thread 0x00007fbcc4619800 Uncommon trap -34 fr.pc 0x00007fbcc0863418
    Event: 1175.846 Thread 0x00007fbcc4619800 Uncommon trap -34 fr.pc 0x00007fbcc0863418
    Event: 1182.839 Thread 0x00007fbcc4619800 Uncommon trap -34 fr.pc 0x00007fbcc0863418
    Event: 1297.158 Thread 0x00007fbcc4619800 Uncommon trap -122 fr.pc 0x00007fbcc0851b3c
    Event: 1665.442 Thread 0x00007fbcc4619800 Uncommon trap -83 fr.pc 0x00007fbcc08a20fc
    Event: 1665.442 Thread 0x00007fbcc4619800 Uncommon trap -83 fr.pc 0x00007fbcc0881eb4
    Event: 1682.396 Thread 0x00007fbcc4619800 Uncommon trap -83 fr.pc 0x00007fbcc086908c
    Event: 1800.266 Thread 0x00007fbcc4619800 Uncommon trap -83 fr.pc 0x00007fbcc085da7c
    Event: 2579.579 Thread 0x00007fbcc4619800 Uncommon trap -12 fr.pc 0x00007fbcc08b2584
    Event: 4892.024 Thread 0x00007fbcc4619800 Uncommon trap -12 fr.pc 0x00007fbcc08b7598
    Internal exceptions (10 events):
    Event: 135.214 Thread 0x00007fbcc4619800 Threw 0x00000000eaf84e08 at /HUDSON/workspace/jdk7u6-2-build-linux-amd64-product/jdk7u6/hotspot/src/share/vm/prims/jvm.cpp:1166
    Event: 135.215 Thread 0x00007fbcc4619800 Threw 0x00000000eafed3c8 at /HUDSON/workspace/jdk7u6-2-build-linux-amd64-product/jdk7u6/hotspot/src/share/vm/prims/jvm.cpp:1166
    Event: 263.679 Thread 0x00007fbcc4619800 Threw 0x00000000eb855ba8 at /HUDSON/workspace/jdk7u6-2-build-linux-amd64-product/jdk7u6/hotspot/src/share/vm/prims/jvm.cpp:1166
    Event: 769.972 Thread 0x00007fbcc4619800 Threw 0x00000000ebe42428 at /HUDSON/workspace/jdk7u6-2-build-linux-amd64-product/jdk7u6/hotspot/src/share/vm/prims/jvm.cpp:1166
    Event: 769.973 Thread 0x00007fbcc4619800 Threw 0x00000000ebe46b98 at /HUDSON/workspace/jdk7u6-2-build-linux-amd64-product/jdk7u6/hotspot/src/share/vm/prims/jvm.cpp:1166
    Event: 1297.157 Thread 0x00007fbcc4619800 Threw 0x00000000ebdad4e0 at /HUDSON/workspace/jdk7u6-2-build-linux-amd64-product/jdk7u6/hotspot/src/share/vm/prims/jvm.cpp:1166
    Event: 1665.441 Thread 0x00007fbcc4619800 Threw 0x00000000eb8d6848 at /HUDSON/workspace/jdk7u6-2-build-linux-amd64-product/jdk7u6/hotspot/src/share/vm/prims/jvm.cpp:1166
    Event: 2400.274 Thread 0x00007fbc68014000 Threw 0x00000000eabbec48 at /HUDSON/workspace/jdk7u6-2-build-linux-amd64-product/jdk7u6/hotspot/src/share/vm/prims/jni.cpp:742
    Event: 2579.579 Thread 0x00007fbcc4619800 Implicit null exception at 0x00007fbcc08b11b6 to 0x00007fbcc08b2571
    Event: 4892.024 Thread 0x00007fbcc4619800 Implicit null exception at 0x00007fbcc08b621a to 0x00007fbcc08b7585
    Events (10 events):
    Event: 4948.484 Thread 0x00007fbc74265000 Thread added: 0x00007fbc74265000
    Event: 4948.484 Thread 0x00007fbc7426b800 Thread added: 0x00007fbc7426b800
    Event: 4948.616 Executing VM operation: RevokeBias
    Event: 4948.616 Executing VM operation: RevokeBias done
    Event: 4948.616 Thread 0x00007fbc7426b800 Thread exited: 0x00007fbc7426b800
    Event: 4948.622 Executing VM operation: RevokeBias
    Event: 4948.622 Executing VM operation: RevokeBias done
    Event: 4948.622 Thread 0x00007fbc74265000 Thread exited: 0x00007fbc74265000
    Event: 5481.896 Thread 0x00007fbcc40e4800 flushing nmethod 0x00007fbcc0851690
    Event: 5536.245 Thread 0x00007fbcc40e7800 flushing nmethod 0x00007fbcc0862510
    Dynamic libraries:
    00400000-00401000 r-xp 00000000 08:02 658256                             /usr/java/jre1.7.0_06/bin/java
    00600000-00601000 rw-p 00000000 08:02 658256                             /usr/java/jre1.7.0_06/bin/java
    01ae6000-01b07000 rw-p 00000000 00:00 0                                  [heap]
    bae00000-bc2c0000 rw-p 00000000 00:00 0
    bc2c0000-c0000000 rw-p 00000000 00:00 0
    c0000000-c1d40000 rw-p 00000000 00:00 0
    c1d40000-eaab0000 rw-p 00000000 00:00 0
    eaab0000-f53b0000 rw-p 00000000 00:00 0
    f53b0000-100000000 rw-p 00000000 00:00 0
    3647c00000-3647c20000 r-xp 00000000 08:06 343                            /lib64/ld-2.12.so
    3647e1f000-3647e20000 r--p 0001f000 08:06 343                            /lib64/ld-2.12.so
    3647e20000-3647e21000 rw-p 00020000 08:06 343                            /lib64/ld-2.12.so
    3647e21000-3647e22000 rw-p 00000000 00:00 0
    3648000000-364818a000 r-xp 00000000 08:06 344                            /lib64/libc-2.12.so
    364818a000-3648389000 ---p 0018a000 08:06 344                            /lib64/libc-2.12.so
    3648389000-364838d000 r--p 00189000 08:06 344                            /lib64/libc-2.12.so
    364838d000-364838e000 rw-p 0018d000 08:06 344                            /lib64/libc-2.12.so
    364838e000-3648393000 rw-p 00000000 00:00 0
    3648400000-3648483000 r-xp 00000000 08:06 348                            /lib64/libm-2.12.so
    3648483000-3648682000 ---p 00083000 08:06 348                            /lib64/libm-2.12.so
    3648682000-3648683000 r--p 00082000 08:06 348                            /lib64/libm-2.12.so
    3648683000-3648684000 rw-p 00083000 08:06 348                            /lib64/libm-2.12.so
    3648800000-3648802000 r-xp 00000000 08:06 351                            /lib64/libdl-2.12.so
    3648802000-3648a02000 ---p 00002000 08:06 351                            /lib64/libdl-2.12.so
    3648a02000-3648a03000 r--p 00002000 08:06 351                            /lib64/libdl-2.12.so
    3648a03000-3648a04000 rw-p 00003000 08:06 351                            /lib64/libdl-2.12.so
    3648c00000-3648c17000 r-xp 00000000 08:06 345                            /lib64/libpthread-2.12.so
    3648c17000-3648e17000 ---p 00017000 08:06 345                            /lib64/libpthread-2.12.so
    3648e17000-3648e18000 r--p 00017000 08:06 345                            /lib64/libpthread-2.12.so
    3648e18000-3648e19000 rw-p 00018000 08:06 345                            /lib64/libpthread-2.12.so
    3648e19000-3648e1d000 rw-p 00000000 00:00 0
    3649400000-3649407000 r-xp 00000000 08:06 352                            /lib64/librt-2.12.so
    3649407000-3649606000 ---p 00007000 08:06 352                            /lib64/librt-2.12.so
    3649606000-3649607000 r--p 00006000 08:06 352                            /lib64/librt-2.12.so
    3649607000-3649608000 rw-p 00007000 08:06 352                            /lib64/librt-2.12.so
    364a000000-364a016000 r-xp 00000000 08:06 386                            /lib64/libresolv-2.12.so
    364a016000-364a216000 ---p 00016000 08:06 386                            /lib64/libresolv-2.12.so
    364a216000-364a217000 r--p 00016000 08:06 386                            /lib64/libresolv-2.12.so
    364a217000-364a218000 rw-p 00017000 08:06 386                            /lib64/libresolv-2.12.so
    364a218000-364a21a000 rw-p 00000000 00:00 0
    7fbc34000000-7fbc34021000 rw-p 00000000 00:00 0
    7fbc34021000-7fbc38000000 ---p 00000000 00:00 0
    7fbc38000000-7fbc38021000 rw-p 00000000 00:00 0
    7fbc38021000-7fbc3c000000 ---p 00000000 00:00 0
    7fbc3c000000-7fbc3c021000 rw-p 00000000 00:00 0
    7fbc3c021000-7fbc40000000 ---p 00000000 00:00 0
    7fbc40000000-7fbc40021000 rw-p 00000000 00:00 0
    7fbc40021000-7fbc44000000 ---p 00000000 00:00 0
    7fbc44000000-7fbc44021000 rw-p 00000000 00:00 0
    7fbc44021000-7fbc48000000 ---p 00000000 00:00 0
    7fbc48000000-7fbc48021000 rw-p 00000000 00:00 0
    7fbc48021000-7fbc4c000000 ---p 00000000 00:00 0
    7fbc4c000000-7fbc4c021000 rw-p 00000000 00:00 0
    7fbc4c021000-7fbc50000000 ---p 00000000 00:00 0
    7fbc50000000-7fbc50021000 rw-p 00000000 00:00 0
    7fbc50021000-7fbc54000000 ---p 00000000 00:00 0
    7fbc54000000-7fbc54040000 rw-p 00000000 00:00 0
    7fbc54040000-7fbc58000000 ---p 00000000 00:00 0
    7fbc58000000-7fbc58021000 rw-p 00000000 00:00 0
    7fbc58021000-7fbc5c000000 ---p 00000000 00:00 0
    7fbc5c000000-7fbc5c021000 rw-p 00000000 00:00 0
    7fbc5c021000-7fbc60000000 ---p 00000000 00:00 0
    7fbc60000000-7fbc60021000 rw-p 00000000 00:00 0
    7fbc60021000-7fbc64000000 ---p 00000000 00:00 0
    7fbc64000000-7fbc64021000 rw-p 00000000 00:00 0
    7fbc64021000-7fbc68000000 ---p 00000000 00:00 0
    7fbc68000000-7fbc68024000 rw-p 00000000 00:00 0
    7fbc68024000-7fbc6c000000 ---p 00000000 00:00 0
    7fbc6c000000-7fbc6c021000 rw-p 00000000 00:00 0
    7fbc6c021000-7fbc70000000 ---p 00000000 00:00 0
    7fbc70000000-7fbc70021000 rw-p 00000000 00:00 0
    7fbc70021000-7fbc74000000 ---p 00000000 00:00 0
    7fbc74000000-7fbc7428b000 rw-p 00000000 00:00 0
    7fbc7428b000-7fbc78000000 ---p 00000000 00:00 0
    7fbc78000000-7fbc78021000 rw-p 00000000 00:00 0
    7fbc78021000-7fbc7c000000 ---p 00000000 00:00 0
    7fbc7c000000-7fbc7c021000 rw-p 00000000 00:00 0
    7fbc7c021000-7fbc80000000 ---p 00000000 00:00 0
    7fbc80000000-7fbc80021000 rw-p 00000000 00:00 0
    7fbc80021000-7fbc84000000 ---p 00000000 00:00 0
    7fbc84000000-7fbc84a1b000 rw-p 00000000 00:00 0
    7fbc84a1b000-7fbc88000000 ---p 00000000 00:00 0
    7fbc88000000-7fbc8a3cf000 rw-p 00000000 00:00 0
    7fbc8a3cf000-7fbc8c000000 ---p 00000000 00:00 0
    7fbc8c000000-7fbc8c021000 rw-p 00000000 00:00 0
    7fbc8c021000-7fbc90000000 ---p 00000000 00:00 0
    7fbc92170000-7fbc98000000 r--p 00000000 08:02 796195                     /usr/lib/locale/locale-archive
    7fbc98000000-7fbc98021000 rw-p 00000000 00:00 0
    7fbc98021000-7fbc9c000000 ---p 00000000 00:00 0
    7fbc9c000000-7fbc9c021000 rw-p 00000000 00:00 0
    7fbc9c021000-7fbca0000000 ---p 00000000 00:00 0
    7fbca0000000-7fbca0021000 rw-p 00000000 00:00 0
    7fbca0021000-7fbca4000000 ---p 00000000 00:00 0
    7fbca4000000-7fbca4021000 rw-p 00000000 00:00 0
    7fbca4021000-7fbca8000000 ---p 00000000 00:00 0
    7fbca8000000-7fbca8021000 rw-p 00000000 00:00 0
    7fbca8021000-7fbcac000000 ---p 00000000 00:00 0
    7fbcb0000000-7fbcb0021000 rw-p 00000000 00:00 0
    7fbcb0021000-7fbcb4000000 ---p 00000000 00:00 0
    7fbcb50d6000-7fbcb50d9000 ---p 00000000 00:00 0
    7fbcb50d9000-7fbcb51d7000 rw-p 00000000 00:00 0
    7fbcb51d7000-7fbcb51da000 ---p 00000000 00:00 0
    7fbcb51da000-7fbcb52d8000 rw-p 00000000 00:00 0
    7fbcb52d8000-7fbcb52db000 ---p 00000000 00:00 0
    7fbcb52db000-7fbcb53d9000 rw-p 00000000 00:00 0
    7fbcb53d9000-7fbcb53dc000 ---p 00000000 00:00 0
    7fbcb53dc000-7fbcb54da000 rw-p 00000000 00:00 0
    7fbcb54da000-7fbcb54dd000 ---p 00000000 00:00 0
    7fbcb54dd000-7fbcb55db000 rw-p 00000000 00:00 0
    7fbcb55db000-7fbcb55de000 ---p 00000000 00:00 0
    7fbcb55de000-7fbcb56dc000 rw-p 00000000 00:00 0
    7fbcb56dc000-7fbcb56df000 ---p 00000000 00:00 0
    7fbcb56df000-7fbcb57dd000 rw-p 00000000 00:00 0
    7fbcb57dd000-7fbcb57e0000 ---p 00000000 00:00 0
    7fbcb57e0000-7fbcb58de000 rw-p 00000000 00:00 0
    7fbcb58de000-7fbcb58e1000 ---p 00000000 00:00 0
    7fbcb58e1000-7fbcb59df000 rw-p 00000000 00:00 0
    7fbcb59df000-7fbcb59e2000 ---p 00000000 00:00 0
    7fbcb59e2000-7fbcb5ae0000 rw-p 00000000 00:00 0
    7fbcb5ae0000-7fbcb5ae3000 ---p 00000000 00:00 0
    7fbcb5ae3000-7fbcb5be1000 rw-p 00000000 00:00 0
    7fbcb5be1000-7fbcb5be4000 ---p 00000000 00:00 0
    7fbcb5be4000-7fbcb5ce2000 rw-p 00000000 00:00 0
    7fbcb5ce2000-7fbcb5ce5000 ---p 00000000 00:00 0
    7fbcb5ce5000-7fbcb5de3000 rw-p 00000000 00:00 0
    7fbcb5de3000-7fbcb5de6000 ---p 00000000 00:00 0
    7fbcb5de6000-7fbcb5ee4000 rw-p 00000000 00:00 0
    7fbcb5ee4000-7fbcb5ee7000 ---p 00000000 00:00 0
    7fbcb5ee7000-7fbcb5fe5000 rw-p 00000000 00:00 0
    7fbcb5fe5000-7fbcb5fe8000 ---p 00000000 00:00 0
    7fbcb5fe8000-7fbcb60e6000 rw-p 00000000 00:00 0
    7fbcb60e6000-7fbcb60e9000 ---p 00000000 00:00 0
    7fbcb60e9000-7fbcb61e7000 rw-p 00000000 00:00 0
    7fbcb61e7000-7fbcb61ea000 ---p 00000000 00:00 0
    7fbcb61ea000-7fbcb62e8000 rw-p 00000000 00:00 0
    7fbcb62e8000-7fbcb62eb000 ---p 00000000 00:00 0
    7fbcb62eb000-7fbcb63e9000 rw-p 00000000 00:00 0
    7fbcb63e9000-7fbcb63ec000 ---p 00000000 00:00 0
    7fbcb63ec000-7fbcb64ea000 rw-p 00000000 00:00 0
    7fbcb64ea000-7fbcb64ed000 ---p 00000000 00:00 0
    7fbcb64ed000-7fbcb65eb000 rw-p 00000000 00:00 0
    7fbcb65eb000-7fbcb65f0000 r-xp 00000000 08:06 8064                       /lib64/libnss_dns-2.12.so
    7fbcb65f0000-7fbcb67ef000 ---p 00005000 08:06 8064                       /lib64/libnss_dns-2.12.so
    7fbcb67ef000-7fbcb67f0000 r--p 00004000 08:06 8064                       /lib64/libnss_dns-2.12.so
    7fbcb67f0000-7fbcb67f1000 rw-p 00005000 08:06 8064                       /lib64/libnss_dns-2.12.so
    7fbcb67f1000-7fbcb67f4000 ---p 00000000 00:00 0
    7fbcb67f4000-7fbcb68f2000 rw-p 00000000 00:00 0
    7fbcb68f2000-7fbcb68f5000 ---p 00000000 00:00 0
    7fbcb68f5000-7fbcb69f3000 rw-p 00000000 00:00 0
    7fbcb69f3000-7fbcb69f6000 ---p 00000000 00:00 0
    7fbcb69f6000-7fbcb6af4000 rw-p 00000000 00:00 0
    7fbcb6af4000-7fbcb6af7000 ---p 00000000 00:00 0
    7fbcb6af7000-7fbcb6bf5000 rw-p 00000000 00:00 0
    7fbcb6bf5000-7fbcb6bf8000 ---p 00000000 00:00 0
    7fbcb6bf8000-7fbcb6cf6000 rw-p 00000000 00:00 0
    7fbcb6cf6000-7fbcb6cf9000 ---p 00000000 00:00 0
    7fbcb6cf9000-7fbcb6df7000 rw-p 00000000 00:00 0
    7fbcb6df7000-7fbcb6dfa000 ---p 00000000 00:00 0
    7fbcb6dfa000-7fbcb6ef8000 rw-p 00000000 00:00 0
    7fbcb6ef8000-7fbcb6efb000 ---p 00000000 00:00 0
    7fbcb6efb000-7fbcb6ff9000 rw-p 00000000 00:00 0
    7fbcb6ff9000-7fbcb6ffc000 ---p 00000000 00:00 0
    7fbcb6ffc000-7fbcb70fa000 rw-p 00000000 00:00 0
    7fbcb70fa000-7fbcb710f000 r-xp 00000000 08:02 658313                     /usr/java/jre1.7.0_06/lib/amd64/libnet.so
    7fbcb710f000-7fbcb730f000 ---p 00015000 08:02 658313                     /usr/java/jre1.7.0_06/lib/amd64/libnet.so
    7fbcb730f000-7fbcb7310000 rw-p 00015000 08:02 658313                     /usr/java/jre1.7.0_06/lib/amd64/libnet.so
    7fbcb7310000-7fbcb7320000 r-xp 00000000 08:02 658314                     /usr/java/jre1.7.0_06/lib/amd64/libnio.so
    7fbcb7320000-7fbcb7520000 ---p 00010000 08:02 658314                     /usr/java/jre1.7.0_06/lib/amd64/libnio.so
    7fbcb7520000-7fbcb7521000 rw-p 00010000 08:02 658314                     /usr/java/jre1.7.0_06/lib/amd64/libnio.so
    7fbcb7521000-7fbcb7527000 r-xp 00000000 08:02 658276                     /usr/java/jre1.7.0_06/lib/amd64/headless/libmawt.so
    7fbcb7527000-7fbcb7727000 ---p 00006000 08:02 658276                     /usr/java/jre1.7.0_06/lib/amd64/headless/libmawt.so
    7fbcb7727000-7fbcb7728000 rw-p 00006000 08:02 658276                     /usr/java/jre1.7.0_06/lib/amd64/headless/libmawt.so
    7fbcb7728000-7fbcb77ca000 r-xp 00000000 08:02 658281                     /usr/java/jre1.7.0_06/lib/amd64/libawt.so
    7fbcb77ca000-7fbcb79ca000 ---p 000a2000 08:02 658281                     /usr/java/jre1.7.0_06/lib/amd64/libawt.so
    7fbcb79ca000-7fbcb79d6000 rw-p 000a2000 08:02 658281                     /usr/java/jre1.7.0_06/lib/amd64/libawt.so
    7fbcb79d6000-7fbcb79fa000 rw-p 00000000 00:00 0
    7fbcb79fa000-7fbcb79fb000 ---p 00000000 00:00 0
    7fbcb79fb000-7fbcb7afb000 rw-p 00000000 00:00 0
    7fbcb7afb000-7fbcb7afe000 ---p 00000000 00:00 0
    7fbcb7afe000-7fbcb7bfc000 rw-p 00000000 00:00 0
    7fbcb7bfc000-7fbcb7bff000 ---p 00000000 00:00 0
    7fbcb7bff000-7fbcb7cfd000 rw-p 00000000 00:00 0
    7fbcb7cfd000-7fbcb7d00000 ---p 00000000 00:00 0
    7fbcb7d00000-7fbcb7dfe000 rw-p 00000000 00:00 0
    7fbcb7dfe000-7fbcb7e01000 ---p 00000000 00:00 0
    7fbcb7e01000-7fbcb7eff000 rw-p 00000000 00:00 0
    7fbcb7eff000-7fbcb7f02000 ---p 00000000 00:00 0
    7fbcb7f02000-7fbcb8000000 rw-p 00000000 00:00 0
    7fbcb8000000-7fbcb8021000 rw-p 00000000 00:00 0
    7fbcb8021000-7fbcbc000000 ---p 00000000 00:00 0
    7fbcbc0ef000-7fbcbc0f2000 ---p 00000000 00:00 0
    7fbcbc0f2000-7fbcbc1f0000 rw-p 00000000 00:00 0
    7fbcbc1f0000-7fbcbc1f1000 ---p 00000000 00:00 0
    7fbcbc1f1000-7fbcbd31a000 rw-p 00000000 00:00 0
    7fbcbd31a000-7fbcbd4e6000 r--s 01665000 08:02 658895                     /usr/java/jre1.7.0_06/lib/rt.jar
    7fbcbd4e6000-7fbcc001a000 rw-p 00000000 00:00 0
    7fbcc001a000-7fbcc001b000 ---p 00000000 00:00 0
    7fbcc001b000-7fbcc011b000 rw-p 00000000 00:00 0
    7fbcc011b000-7fbcc011c000 ---p 00000000 00:00 0
    7fbcc011c000-7fbcc021c000 rw-p 00000000 00:00 0
    7fbcc021c000-7fbcc021d000 ---p 00000000 00:00 0
    7fbcc021d000-7fbcc031d000 rw-p 00000000 00:00 0
    7fbcc031d000-7fbcc031e000 ---p 00000000 00:00 0
    7fbcc031e000-7fbcc042d000 rw-p 00000000 00:00 0
    7fbcc042d000-7fbcc0574000 rw-p 00000000 00:00 0
    7fbcc0574000-7fbcc057f000 rw-p 00000000 00:00 0
    7fbcc057f000-7fbcc059d000 rw-p 00000000 00:00 0
    7fbcc059d000-7fbcc05ac000 rw-p 00000000 00:00 0
    7fbcc05ac000-7fbcc06f2000 rw-p 00000000 00:00 0
    7fbcc06f2000-7fbcc0747000 rw-p 00000000 00:00 0
    7fbcc0747000-7fbcc079d000 rw-p 00000000 00:00 0
    7fbcc079d000-7fbcc079e000 rw-p 00000000 00:00 0
    7fbcc079e000-7fbcc0a0e000 rwxp 00000000 00:00 0
    7fbcc0a0e000-7fbcc379e000 rw-p 00000000 00:00 0
    7fbcc379e000-7fbcc37b8000 r-xp 00000000 08:02 658325                     /usr/java/jre1.7.0_06/lib/amd64/libzip.so
    7fbcc37b8000-7fbcc39b8000 ---p 0001a000 08:02 658325                     /usr/java/jre1.7.0_06/lib/amd64/libzip.so
    7fbcc39b8000-7fbcc39b9000 rw-p 0001a000 08:02 658325                     /usr/java/jre1.7.0_06/lib/amd64/libzip.so
    7fbcc39b9000-7fbcc39c5000 r-xp 00000000 08:06 8068                       /lib64/libnss_files-2.12.so
    7fbcc39c5000-7fbcc3bc5000 ---p 0000c000 08:06 8068                       /lib64/libnss_files-2.12.so
    7fbcc3bc5000-7fbcc3bc6000 r--p 0000c000 08:06 8068                       /lib64/libnss_files-2.12.so
    7fbcc3bc6000-7fbcc3bc7000 rw-p 0000d000 08:06 8068                       /lib64/libnss_files-2.12.so
    7fbcc3bc7000-7fbcc3bf0000 r-xp 00000000 08:02 658295                     /usr/java/jre1.7.0_06/lib/amd64/libjava.so
    7fbcc3bf0000-7fbcc3df0000 ---p 00029000 08:02 658295                     /usr/java/jre1.7.0_06/lib/amd64/libjava.so
    7fbcc3df0000-7fbcc3df2000 rw-p 00029000 08:02 658295                     /usr/java/jre1.7.0_06/lib/amd64/libjava.so
    7fbcc3df2000-7fbcc3dff000 r-xp 00000000 08:02 658324                     /usr/java/jre1.7.0_06/lib/amd64/libverify.so
    7fbcc3dff000-7fbcc3ffe000 ---p 0000d000 08:02 658324                     /usr/java/jre1.7.0_06/lib/amd64/libverify.so
    7fbcc3ffe000-7fbcc4000000 rw-p 0000c000 08:02 658324                     /usr/java/jre1.7.0_06/lib/amd64/libverify.so
    7fbcc4000000-7fbcc462c000 rw-p 00000000 00:00 0
    7fbcc462c000-7fbcc8000000 ---p 00000000 00:00 0
    7fbcc803d000-7fbcc804f000 r--s 000d8000 08:08 21758031                   /home/jesse/isoserver/IsoServer.jar
    7fbcc804f000-7fbcc8082000 rw-p 00000000 00:00 0
    7fbcc8082000-7fbcc80a0000 rw-p 00000000 00:00 0
    7fbcc80a0000-7fbcc80aa000 rw-p 00000000 00:00 0
    7fbcc80aa000-7fbcc8160000 rw-p 00000000 00:00 0
    7fbcc8160000-7fbcc8163000 ---p 00000000 00:00 0
    7fbcc8163000-7fbcc8261000 rw-p 00000000 00:00 0
    7fbcc8261000-7fbcc8ca8000 r-xp 00000000 08:02 658329                     /usr/java/jre1.7.0_06/lib/amd64/server/libjvm.so
    7fbcc8ca8000-7fbcc8ea7000 ---p 00a47000 08:02 658329                     /usr/java/jre1.7.0_06/lib/amd64/server/libjvm.so
    7fbcc8ea7000-7fbcc8f4a000 rw-p 00a46000 08:02 658329                     /usr/java/jre1.7.0_06/lib/amd64/server/libjvm.so
    7fbcc8f4a000-7fbcc8f89000 rw-p 00000000 00:00 0
    7fbcc8f89000-7fbcc8f9f000 r-xp 00000000 08:02 658278                     /usr/java/jre1.7.0_06/lib/amd64/jli/libjli.so
    7fbcc8f9f000-7fbcc919e000 ---p 00016000 08:02 658278                     /usr/java/jre1.7.0_06/lib/amd64/jli/libjli.so
    7fbcc919e000-7fbcc919f000 rw-p 00015000 08:02 658278                     /usr/java/jre1.7.0_06/lib/amd64/jli/libjli.so
    7fbcc919f000-7fbcc91a0000 rw-p 00000000 00:00 0
    7fbcc91a1000-7fbcc91a2000 rw-p 00000000 00:00 0
    7fbcc91a2000-7fbcc91aa000 rw-s 00000000 08:07 292                        /tmp/hsperfdata_root/3126
    7fbcc91aa000-7fbcc91ab000 rw-p 00000000 00:00 0
    7fbcc91ab000-7fbcc91ac000 r--p 00000000 00:00 0
    7fbcc91ac000-7fbcc91ad000 rw-p 00000000 00:00 0
    7fffad99a000-7fffad9af000 rw-p 00000000 00:00 0                          [stack]
    7fffad9ff000-7fffada00000 r-xp 00000000 00:00 0                          [vdso]
    ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
    VM Arguments:
    jvm_args: -Xmx1024m
    java_command: Main.IsoServer nogui
    Launcher Type: SUN_STANDARD
    Environment Variables:
    JAVA_HOME=/usr/local/jdk
    CLASSPATH=.:/usr/local/jdk/lib/classes.zip:/usr/local/jdk/lib/mysql-connector-java-5.1.6.jar
    PATH=/usr/local/jdk/bin:/usr/lib64/qt-3.3/bin:/usr/lib/courier-imap/sbin:/usr/lib/courier-imap/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin
    SHELL=/bin/bash
    Signal Handlers:
    SIGSEGV: [libjvm.so+0x8a5a80], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGBUS: [libjvm.so+0x8a5a80], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGFPE: [libjvm.so+0x741b60], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGPIPE: [libjvm.so+0x741b60], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGXFSZ: [libjvm.so+0x741b60], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGILL: [libjvm.so+0x741b60], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
    SIGUSR2: [libjvm.so+0x7414b0], sa_mask[0]=0x00000000, sa_flags=0x10000004
    SIGHUP: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000
    SIGINT: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000
    SIGTERM: [libjvm.so+0x743840], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGQUIT: [libjvm.so+0x743840], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    ---------------  S Y S T E M  ---------------
    OS:CentOS release 6.4 (Final)
    uname:Linux 2.6.32-220.13.1.el6.x86_64 #1 SMP Tue Apr 17 23:56:34 BST 2012 x86_64
    libc:glibc 2.12 NPTL 2.12
    rlimit: STACK 10240k, CORE 0k, NPROC 15830, NOFILE 1024, AS infinity
    load average:0.08 0.02 0.01
    /proc/meminfo:
    MemTotal:        2045524 kB
    MemFree:           93212 kB
    Buffers:          215936 kB
    Cached:           957604 kB
    SwapCached:         7300 kB
    Active:           977036 kB
    Inactive:         786260 kB
    Active(anon):     338308 kB
    Inactive(anon):   253632 kB
    Active(file):     638728 kB
    Inactive(file):   532628 kB
    Unevictable:           0 kB
    Mlocked:               0 kB
    SwapTotal:       4095992 kB
    SwapFree:        4084172 kB
    Dirty:                20 kB
    Writeback:             0 kB
    AnonPages:        586236 kB
    Mapped:            31028 kB
    Shmem:              2128 kB
    Slab:             133656 kB
    SReclaimable:     102016 kB
    SUnreclaim:        31640 kB
    KernelStack:        2056 kB
    PageTables:        14972 kB
    NFS_Unstable:          0 kB
    Bounce:                0 kB
    WritebackTmp:          0 kB
    CommitLimit:     5118752 kB
    Committed_AS:    2418356 kB
    VmallocTotal:   34359738367 kB
    VmallocUsed:      275704 kB
    VmallocChunk:   34359355248 kB
    HardwareCorrupted:     0 kB
    AnonHugePages:    233472 kB
    HugePages_Total:       0
    HugePages_Free:        0
    HugePages_Rsvd:        0
    HugePages_Surp:        0
    Hugepagesize:       2048 kB
    DirectMap4k:        7744 kB
    DirectMap2M:     2080768 kB
    CPU:total 4 (4 cores per cpu, 1 threads per core) family 6 model 30 stepping 5, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, tsc, tscinvbit
    /proc/cpuinfo:
    processor    : 0
    vendor_id    : GenuineIntel
    cpu family    : 6
    model        : 30
    model name    : Intel(R) Core(TM) i5 CPU         760  @ 2.80GHz
    stepping    : 5
    cpu MHz        : 2800.022
    cache size    : 8192 KB
    physical id    : 0
    siblings    : 4
    core id        : 0
    cpu cores    : 4
    apicid        : 0
    initial apicid    : 0
    fpu        : yes
    fpu_exception    : yes
    cpuid level    : 11
    wp        : yes
    flags        : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida dts tpr_shadow vnmi flexpriority ept vpid
    bogomips    : 5600.04
    clflush size    : 64
    cache_alignment    : 64
    address sizes    : 36 bits physical, 48 bits virtual
    power management:
    processor    : 1
    vendor_id    : GenuineIntel
    cpu family    : 6
    model        : 30
    model name    : Intel(R) Core(TM) i5 CPU         760  @ 2.80GHz
    stepping    : 5
    cpu MHz        : 2800.022
    cache size    : 8192 KB
    physical id    : 0
    siblings    : 4
    core id        : 1
    cpu cores    : 4
    apicid        : 2
    initial apicid    : 2
    fpu        : yes
    fpu_exception    : yes
    cpuid level    : 11
    wp        : yes
    flags        : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida dts tpr_shadow vnmi flexpriority ept vpid
    bogomips    : 5599.14
    clflush size    : 64
    cache_alignment    : 64
    address sizes    : 36 bits physical, 48 bits virtual
    power management:
    processor    : 2
    vendor_id    : GenuineIntel
    cpu family    : 6
    model        : 30
    model name    : Intel(R) Core(TM) i5 CPU         760  @ 2.80GHz
    stepping    : 5
    cpu MHz        : 2800.022
    cache size    : 8192 KB
    physical id    : 0
    siblings    : 4
    core id        : 2
    cpu cores    : 4
    apicid        : 4
    initial apicid    : 4
    fpu        : yes
    fpu_exception    : yes
    cpuid level    : 11
    wp        : yes
    flags        : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida dts tpr_shadow vnmi flexpriority ept vpid
    bogomips    : 5599.14
    clflush size    : 64
    cache_alignment    : 64
    address sizes    : 36 bits physical, 48 bits virtual
    power management:
    processor    : 3
    vendor_id    : GenuineIntel
    cpu family    : 6
    model        : 30
    model name    : Intel(R) Core(TM) i5 CPU         760  @ 2.80GHz
    stepping    : 5
    cpu MHz        : 2800.022
    cache size    : 8192 KB
    physical id    : 0
    siblings    : 4
    core id        : 3
    cpu cores    : 4
    apicid        : 6
    initial apicid    : 6
    fpu        : yes
    fpu_exception    : yes
    cpuid level    : 11
    wp        : yes
    flags        : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida dts tpr_shadow vnmi flexpriority ept vpid
    bogomips    : 5599.14
    clflush size    : 64
    cache_alignment    : 64
    address sizes    : 36 bits physical, 48 bits virtual
    power management:
    Memory: 4k page, physical 2045524k(93212k free), swap 4095992k(4084172k free)
    vm_info: Java HotSpot(TM) 64-Bit Server VM (23.2-b09) for linux-amd64 JRE (1.7.0_06-b24), built on Aug  9 2012 19:49:48 by "java_re" with gcc 4.3.0 20080428 (Red Hat 4.3.0-8)
    time: Tue Jun 18 13:37:03 2013
    elapsed time: 5652 seconds

    Hi!
    I've got the jvm crashing when it calls native methods
    via the JNI.
    The same native method run without a glitch in "pure"
    C. So there is no bug in the native method, I suppose.
    What is more interesting
    is that the same java program with the same native
    interface runs fine using gij (from gnu) too!
    $ java -version
    java version "1.4.2"
    Java(TM) 2 Runtime Environment, Standard Edition
    (build 1.4.2-b28)
    Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed
    mode)
    The native methods are in C. Compiled using gcc.
    $ gcc -v
    Reading specs from
    /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs
    Configured with: ../configure --prefix=/usr
    mandir=/usr/share/man infodir=/usr/share/info
    enable-shared enable-threads=posix
    disable-checking host=i386-redhat-linux
    with-system-zlib enable-__cxa_atexit
    Thread model: posix
    gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
    The machine is P4 on Red hat linux 8.0
    $ uname -a
    Linux vanee.mlaproxy.iitk.ac.in 2.4.18-14 #1 Wed Sep 4
    13:35:50 EDT 2002 i686 i686 i386 GNU/Linux
    The error message is
    An unexpected exception has been detected in native
    code outside the VM.
    Unexpected Signal : 11 occurred at PC=0x4CDBEDA3
    Function=Java_Medico_Producer_vanee+0x2B3
    Library=/home/asingh/Java/medico/develop/Source/libnati
    elib.so
    Current Java thread:
    at Medico.Producer.vanee(Native Method)
    at Medico.Producer.run(Producer.java:18)
    If you are interested, I can also post the dyanamic
    libraries.
    Any help is appreciated. Please cc me a copy at
    [email protected]
    Thanks,
    Abhishek.Signal 11 is a segmentation fault. If this runs fine in pure C then you may be passing it a null value on the Java side. I am unfamilar with gij, so I don't know what to say about that

  • Using Intel's MKL C++ Library in JNI causes JVM to Crash at GC

    We're using JDK 1.6.0_07 on RedHat 4 (32-bit) and RedHat 5 (32-bit JVM on 64-bit processor). Our app uses JNI to access Intel's Math Kernel Library (MKL) for optimized algorithms; however, it crashes in libjvm.so/libpthread.so in the GC thread once the garbage collector runs (usually pretty quick).
    The MKL library uses it's own threading model built on pthreads. So, the basic flow goes like this:
    A Java GUI spawns a separate thread to:
    1) Call native method to initialize settings and allocate buffers
    2) Call native method to load data (using mapped buffers)
    3) Call native method to process data
    4) Call native method to unload data back into mapped buffers
    It seems like the MKL threading model (parallel processing) is causing issues with the JVM. Is there a safe way to call a MT native method? BTW, the native code never calls back into Java.

    Crashes normally indicate
    1. A problem with pointers in your code
    2. Incorrect usage of the library that you are calling (which cause a problem with pointers.)
    3. Incorrect usage of JNI.
    C/C++ pointer problem can cause failure much latter than the actual point where the error occurred. Much later in this case would be the garbage collector.
    Might or might not help....as far as I can recall, a recent thread had a gc problem because the JNI code was constructing java objects incorrectly.

  • Java.lang.Class- getFields() results in JVM crash when called through JNI

    From a C++ application, I use Invocation APIs to create a JVM and call some Java methods using JNI
    I get a crash in jvm.dll with EXCEPTION_ACCESS_VIOLATION
    when I try to call "getFields" method of java.lang.Class in order to get the Fields of the java class
    This method call, should return a java/lang/reflect/Fields[] on success
    I am able to get the method ID of this method by using pEnv->GetMethodID(..)
    However, when I call this method using CallObjectMethod(..), HotSpt JVM crashes with access violation with the dump given below.
    Any clues on how to debug and find the problem?
    Or has anyone tried getting the fields of a Java class from C++ by calling reflection APIs uing JNI?
    Thanks in advance!
    Sample code
    jclass testerClass = pEnv->FindClass("com/test/Tester");
    jmethodID cid = pEnv->GetMethodID(testerClass,"<init>","()V");
    if(NULL == cid)
    pEnv->ExceptionDescribe();
    jobject testerObject = pEnv->NewObjectV(testerClass, mid);
    jmethodID mid = pEnv->GetMethodID(testerClass, "getClass",
                             "()Ljava/lang/Class;");
    jobject clsObj = (jobject)pEnv->CallObjectMethod(testerObject, mid);
    pEnv->ExceptionDescribe();
    jclass      jCls = pEnv->GetObjectClass(clsObj);
    jmethodID midGetFields = pEnv->GetMethodID(jCls, "getFields",
                                            "()[Ljava/lang/reflect/Field;");
    jobjectArray jobjArray = (jobjectArray)pEnv->CallObjectMethod(testerObject, midGetFields);
    pEnv->ExceptionDescribe();
    Crash dump
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x809E69F
    Function=JVM_FindSignal+0x11505
    Library=D:\Java\j2re1.4.2_03\bin\client\jvm.dll
    Current Java thread:
         at java.lang.Class.privateGetDeclaredFields(Unknown Source)
         at java.lang.Class.privateGetPublicFields(Unknown Source)
         at java.lang.Class.getFields(Unknown Source)
    Dynamic libraries:
    0x00400000 - 0x00419000      E:\SC\SC12.1\SCApplications\SNMP\Bin\JNITester.exe
    0x77F50000 - 0x77FF7000      C:\WINDOWS\System32\ntdll.dll
    0x77E60000 - 0x77F46000      C:\WINDOWS\system32\kernel32.dll
    0x10000000 - 0x10023000      E:\SC\SC12.1\SCApplications\SNMP\Bin\JniUtils.dll
    0x00320000 - 0x00332000      E:\SnmpIpmNativeTestDriver\MTFStubHelper.dll
    0x00340000 - 0x0035B000      E:\SnmpIpmNativeTestDriver\MTFXMLFileAPI.dll
    0x12000000 - 0x122B1000      e:\sc\sc12.1\bin\xerces-c_2_2_0D.dll
    0x77DD0000 - 0x77E5D000      C:\WINDOWS\system32\ADVAPI32.dll
    0x78000000 - 0x78086000      C:\WINDOWS\system32\RPCRT4.dll
    0x10200000 - 0x1026C000      e:\sc\sc12.1\bin\MSVCRTD.dll
    0x102A0000 - 0x102B7000      e:\sc\sc12.1\bin\MSVCIRTD.dll
    0x5F800000 - 0x5F8E9000      e:\sc\sc12.1\bin\MFC42uD.DLL
    0x77C70000 - 0x77CB0000      C:\WINDOWS\system32\GDI32.dll
    0x77D40000 - 0x77DCC000      C:\WINDOWS\system32\USER32.dll
    0x5F700000 - 0x5F746000      e:\sc\sc12.1\bin\MFCD42uD.DLL
    0x5F500000 - 0x5F5C6000      e:\sc\sc12.1\bin\MFCO42uD.DLL
    0x10480000 - 0x104FE000      e:\sc\sc12.1\bin\MSVCP60D.dll
    0x15020000 - 0x15042000      e:\sc\sc12.1\bin\SCTraceLib.dll
    0x6D510000 - 0x6D58D000      C:\WINDOWS\System32\dbghelp.dll
    0x77C10000 - 0x77C63000      C:\WINDOWS\system32\msvcrt.dll
    0x77C00000 - 0x77C07000      C:\WINDOWS\system32\VERSION.dll
    0x00360000 - 0x0037D000      e:\sc\sc12.1\bin\SCFileManager.dll
    0x76BF0000 - 0x76BFB000      C:\WINDOWS\System32\PSAPI.DLL
    0x00420000 - 0x00580000      e:\sc\sc12.1\bin\BctCoreCL.dll
    0x5D920000 - 0x5D929000      C:\WINDOWS\System32\RPCNS4.dll
    0x71B20000 - 0x71B31000      C:\WINDOWS\system32\MPR.dll
    0x71C20000 - 0x71C6E000      C:\WINDOWS\System32\NETAPI32.dll
    0x71AB0000 - 0x71AC5000      C:\WINDOWS\System32\WS2_32.dll
    0x71AA0000 - 0x71AA8000      C:\WINDOWS\System32\WS2HELP.dll
    0x15000000 - 0x15012000      e:\sc\sc12.1\bin\CTEventLog.dll
    0x773D0000 - 0x77BC2000      C:\WINDOWS\system32\SHELL32.dll
    0x70A70000 - 0x70AD4000      C:\WINDOWS\system32\SHLWAPI.dll
    0x771B0000 - 0x772D1000      C:\WINDOWS\system32\ole32.dll
    0x77120000 - 0x771AB000      C:\WINDOWS\system32\OLEAUT32.dll
    0x1F7A0000 - 0x1F7D6000      C:\WINDOWS\System32\ODBC32.dll
    0x77340000 - 0x773CB000      C:\WINDOWS\system32\COMCTL32.dll
    0x763B0000 - 0x763F5000      C:\WINDOWS\system32\comdlg32.dll
    0x08000000 - 0x08138000      D:\Java\j2re1.4.2_03\bin\client\jvm.dll
    0x76B40000 - 0x76B6C000      C:\WINDOWS\System32\WINMM.dll
    0x5FD00000 - 0x5FD0D000      C:\WINDOWS\System32\MFC42LOC.DLL
    0x71950000 - 0x71A34000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.10.0_x-ww_f7fb5805\comctl32.dll
    0x1F840000 - 0x1F857000      C:\WINDOWS\System32\odbcint.dll
    0x5DAC0000 - 0x5DAC7000      C:\WINDOWS\System32\rdpsnd.dll
    0x00FE0000 - 0x00FE7000      D:\Java\j2re1.4.2_03\bin\hpi.dll
    0x01000000 - 0x0100E000      D:\Java\j2re1.4.2_03\bin\verify.dll
    0x01010000 - 0x01029000      D:\Java\j2re1.4.2_03\bin\java.dll
    0x01030000 - 0x0103D000      D:\Java\j2re1.4.2_03\bin\zip.dll
    0x76C90000 - 0x76CB2000      C:\WINDOWS\system32\imagehlp.dll
    Heap at VM Abort:
    Heap
    def new generation total 576K, used 132K [0x15050000, 0x150f0000, 0x15530000)
    eden space 512K, 25% used [0x15050000, 0x15071250, 0x150d0000)
    from space 64K, 0% used [0x150d0000, 0x150d0000, 0x150e0000)
    to space 64K, 0% used [0x150e0000, 0x150e0000, 0x150f0000)
    tenured generation total 1408K, used 0K [0x15530000, 0x15690000, 0x19050000)
    the space 1408K, 0% used [0x15530000, 0x15530000, 0x15530200, 0x15690000)
    compacting perm gen total 4096K, used 964K [0x19050000, 0x19450000, 0x1d050000)
    the space 4096K, 23% used [0x19050000, 0x191410e0, 0x19141200, 0x19450000)
    Local Time = Wed Aug 25 21:06:44 2004
    Elapsed Time = 0
    # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION
    # Error ID : 4F530E43505002EF
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Java VM: Java HotSpot(TM) Client VM (1.4.2_03-b02 mixed mode)

    You are right, I tried getting the java.lang.Class reference for the com.test.Tester by calling getClass() on com.test.Tester
    And using this jclass reference for java.lang.Class, I tried getting the method ID of getFields and eventually the Field[]
    Thanks for the help
    I have some more questions.
    Assumption - Using JNI, I got the fields array of com.test.Tester and I am iterating through the fields
    1.Assuming that the Tester class had an Integer field say m_nIntVal, then once I get the jobject equivalent of this Field in C++.
    Now I need to get the type of the field (I call the method java.lang.reflect.getType() from JNI)
    This gives me a jclass reference to it's type i.e java.lang.Integer
    2.I need to get the name of this type i.e I want to get the name of the type in a string as "java.lang.Integer"
    For this, on the jclass reference of java.lang.Integer got in Step 1, I call getClass() from JNI (to get the java.lang.Class) and then getName()
    Now, for calling getClass(), I need a temporary object reference corresponding to the jclass of java.lang.Integer, The problem is that Integer does not have a default constructor, so my call to create the jobject fails.
    But, since I do not know that I am constructing an Integer (remember that is what I am trying to find out - getType), I cant pass any values to constructor
    Now, how do I go about creating a jobject of Integer, without knowing that I am constructing that, as this does not have a default constructor without parameters
    Also, I tried using AllocObject to get the jobject and then tried to get the method ID of getClass(). Even this failed
    3. If the com.test.Tester class had a primitive "int" field, say m_nPrimitiveInt
    for which java provides a Class representation, I am able to get the jclass reference to the type of m_nPrimitiveInt
    Now, how do I get the name of the type as "int" in a string?
    Forllowing a similar procedure like in Step 2 fails when I try to pass the jclass reference to the type of m_nPrimitiveInt to the GetMethodID
    with the error FATAL ERROR in native method: JNI received a class argument that is not a class
    Can you tell me what is the way out?
    Thanks in advance,
    Also, can I mail you with some doubts that I have? If its ok, please contact me at [email protected]

  • JNI Com CoCreateInstance VM crash

    I'm trying to use the ActiveHome SDK for use in a project. The SDK is written in vb and c++. I have set up a a main class inside of my JNI wrapper to test the logic. I also set up a main class in the Java class, the test class in c++ works well when I call:
    hresult = CoCreateInstance( __uuidof(ActiveHomeScriptLib::ActiveHome), NULL, CLSCTX_INPROC_SERVER, __uuidof(ActiveHomeScriptLib::IActiveHome), (LPVOID *) &pActiveHome );however this is where java is dieing. I have tried to instead call CoCreate this way:
    hresult = CLSIDFromProgID(OLESTR("ActiveHomeScriptLib.ActiveHome"), &clsid);
    hresult = CoCreateInstance(clsid,NULL,CLSCTX_INPROC_SERVER,__uuidof(ActiveHomeScriptLib::IActiveHome),(LPVOID *) &pActiveHome);This doesnt crash the JVM but it cannot find the OLESTR in the dll using this method.
    Any help would be greatly appreciated.

    karlmarxxx wrote:
    Perhaps you should have read my question, I have already created a class in c++ testing this out and it works, When I run the same code in java the JVM crashes.Sorry the scrolling to see everything in single line obscured it.
    Presumably when you say crash you mean a windows system error dialog versus just an exit.
    When you created the C++ did you use default settings in VC from the console and for creating the jni dll?
    Presumably you are doing nothing else in terms of JNI except executing that line via a JNI method?

  • NewObject crash in a PLI/C/JNI code

    Hi,
    i call NewObject() function in a PLI/C/JNI app to create a java/lang/Vector instance.My Verilog simulator (ModelSim PE 5.4b) crash without display an error code.
    Please take a look , and see what is wrong with my code.
    jclass jclass_Vector;
    jmethodID jmethodID_Vector_new;
    jclass_Vector=_env->FindClass("java/util/Vector");
    if(jclass_Vector==NULL){
    return ;
    jmethodID_Vector_new=_env->GetMethodID(jclass_Vector,"<init>","()V");
    if(jmethodID_Vector_new==NULL){
    return ;
    jobject dataVector;
    dataVector=_env->NewObject(jclass_Vector,jmethodID_Vector_new);
    Thanks in advance,
    Marius

    As far as I can tell, there's nothing wrong with the small snippet of code that you've posted. The problem is elsewhere. Try making a small sample program that demonstrates the failure.
    Also, take a look at Jace - http://jace.reyelts.com/jace
    The equivalent code would be:
    // Create a new Vector
    Vector dataVector(); A lot simpler...
    God bless,
    -Toby Reyelts

  • Crashing of jboss while JNI programm execution

    Hi
    I am working on a project on JSP but our legacy application was written in proc which did the bulk of data intensive tasks.Now i have written a programm in C language which calla java Bean from JSP and Bean gives JNI call to my c programm and from c programm to my Proc programm the problem is that in between of execution of my proc code my application server JBOSS-tomcat crashes can any one help me if they have experienced this thing in past.

    I started having this exact same problem yesterday. I never had it before and nothing had changed on my system prior to the problem starting (no Windows updates, or others). Mine is also GoLive CS2. I have used it every since I purchased it direct from Adobe while it was still the "current version". And likewise, it happens when using SFTP for transfer.
    Thinking maybe a program file had become corrupted, I ran the installation over and selected "repair". It completed without issue. And I reactivated without any problem. But the issue still exists.
    Interestingly, certain files trigger it every time while it seems random otherwise. One file that will do it every time is a small gif image in one site. I recreated that image from scratch and it still does it.

Maybe you are looking for

  • How do you sync your old library to a new laptop?

    Hi, Im currently using a new laptop and wanted to know how can I sync the library I had in the previous one to the new one. When I connect the ipod to the new one, I get a message that says that my Ipod is connected to a different library or somethin

  • Change attributes and/or permissions of folder

    I have searched for this and the answers are not working. I have an app where I copy a folder on a CD onto the C drive. When the app is completed I want to delete the folder. I can't seem to do that with my code. I can manually go to the folder in ex

  • NIK Plugins and window position

    Hi folks, i installed the NIK Plugin Suite. Everythings works fine until i open let's say color efex pro. The menubar goes behind the aperture menubar and i'm not able to click on it to resize color efex. resize is only possible dragging the lower ri

  • Submit Site to Search Engines

    How do you submit a site to search engines? I have done what I can to optimise my meta data - just a kind of painting-by-numbers approach, I notice that some web designers offer this as a "service." I googled it and come accross offers to do it but I

  • Jpeg images cut off

    Bottom lines of jpeg images are missing in pdf.  However, when viewing at 125% they magically reappear.  This is a powerpoint document converted.