Results 1 to 8 of 8
  1. #1
    dhivyadevi is offline Member
    Join Date
    Sep 2009
    Posts
    4
    Rep Power
    0

    Default JVM Crashed when using JNI

    Hi,

    Application is using QAS third party services by using JNI.
    Fom java, System is calling C programs (which will call QAS serives) through JNI.
    Only sometime JVM is getting crashed.

    Below is the error report.
    Could you please guide me whether this is a bug in JNI or else in Java version
    1.5.0_06-b05 mixed mode , what needs to be done to fix this issue.

    Thanks in advance.



    #
    # An unexpected error has been detected by HotSpot Virtual Machine:
    #
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7a95b2, pid=27912, tid=8576
    #
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode)
    # Problematic frame:
    # V [jvm.dll+0xc95b2]
    #

    --------------- T H R E A D ---------------

    Current thread (0x009c6558): VMThread [id=8576]

    siginfo: ExceptionCode=0xc0000005, reading address 0x0258005c

    Registers:
    EAX=0x07bdf1c0, EBX=0x00000000, ECX=0x06a802d2, EDX=0x02580000
    ESP=0x0ab5fbf0, EBP=0x0ab5fc2c, ESI=0x06a802f0, EDI=0x6d854988
    EIP=0x6d7a95b2, EFLAGS=0x00010216

    Top of Stack: (sp=0x0ab5fbf0)
    0x0ab5fbf0: 07bdf1c0 6d7a9579 6d854988 6d7a97d9
    0x0ab5fc00: 6d858e8c 6d7f118b 6d858e8c 6d854988
    0x0ab5fc10: 009779b0 6d74ebe1 6d854988 00000000
    0x0ab5fc20: 00000001 009779b0 00000000 0ab5fc94
    0x0ab5fc30: 6d74fe59 00000001 00000000 00000001
    0x0ab5fc40: 00000002 6d854988 6d854988 00000001
    0x0ab5fc50: 009779b0 00000000 00000000 00000001
    0x0ab5fc60: 00000001 0ab5fcec 00000000 00000000

    Instructions: (pc=0x6d7a95b2)
    0x6d7a95a2: 08 8b 40 08 8b 04 88 50 8b 48 04 83 c1 08 8b 11
    0x6d7a95b2: ff 52 5c eb de c3 e9 00 00 00 00 c7 05 84 49 85


    Stack: [0x0ab20000,0x0ab60000), sp=0x0ab5fbf0, free space=254k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    V [jvm.dll+0xc95b2]
    V [jvm.dll+0x6fe59]
    V [jvm.dll+0x6fbd8]
    V [jvm.dll+0x73241]
    V [jvm.dll+0x10876b]
    V [jvm.dll+0x6e9d5]
    V [jvm.dll+0x6f091]
    V [jvm.dll+0x1235ac]
    V [jvm.dll+0x1233f7]
    V [jvm.dll+0x122ec5]
    V [jvm.dll+0x12306e]
    V [jvm.dll+0x122dd3]
    C [MSVCRT.dll+0x2b530]
    C [kernel32.dll+0x24829]

    VM_Operation (0x0b82f918): full generation collection, mode: safepoint, requested by thread 0x0b4348e0


    --------------- P R O C E S S ---------------

    Java Threads: ( => current thread )
    0x0c0ccbf0 JavaThread "Thread-5945" [_thread_blocked, id=27272]
    0x0c243868 JavaThread "Thread-5944" [_thread_blocked, id=12844]
    0x0c654500 JavaThread "Thread-5942" [_thread_blocked, id=23884]
    0x0c09a830 JavaThread "Thread-5940" [_thread_blocked, id=14188]
    0x0c0b7030 JavaThread "Thread-5939" [_thread_blocked, id=30972]
    0x0c0ce8b8 JavaThread "Thread-5002" [_thread_blocked, id=30376]
    0x0c09adb8 JavaThread "Thread-5000" [_thread_blocked, id=28980]
    0x0c11fc18 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=13368]
    0x0c019760 JavaThread "TimerQueue" daemon [_thread_blocked, id=7756]
    0x0083f8f8 JavaThread "DestroyJavaVM" [_thread_blocked, id=27020]
    0x0ae8bac8 JavaThread "AWT-Shutdown" [_thread_blocked, id=28528]
    0x0bf78e48 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=28540]
    0x009aa840 JavaThread "Timer-0" daemon [_thread_blocked, id=21696]
    0x0b4348e0 JavaThread "GC Daemon" daemon [_thread_blocked, id=21296]
    0x0aec54c0 JavaThread "RMI RenewClean-[10.15.170.143:2665]" daemon [_thread_blocked, id=13436]
    0x0b464740 JavaThread "AWT-Windows" daemon [_thread_in_native, id=3624]
    0x009e3d20 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4144]
    0x009e2950 JavaThread "CompilerThread0" daemon [_thread_blocked, id=21628]
    0x009e1a98 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=8304]
    0x009de4b8 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=28140]
    0x009dd0b8 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=10800]
    0x009db6e0 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=24824]
    0x009ca3d8 JavaThread "Finalizer" daemon [_thread_blocked, id=28044]
    0x009c8f38 JavaThread "Reference Handler" daemon [_thread_blocked, id=26812]

    Other Threads:
    =>0x009c6558 VMThread [id=8576]
    0x009d34a8 WatcherThread [id=17236]

    VM state:at safepoint (normal execution)

    VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
    [0x0083ae20/0x000046ac] Threads_lock - owner thread: 0x009c6558
    [0x0083af70/0x00004670] Heap_lock - owner thread: 0x0b4348e0

    Heap
    def new generation total 3712K, used 1027K [0x02a80000, 0x02e80000, 0x02f60000)
    eden space 3328K, 30% used [0x02a80000, 0x02b80e00, 0x02dc0000)
    from space 384K, 0% used [0x02dc0000, 0x02dc0000, 0x02e20000)
    to space 384K, 0% used [0x02e20000, 0x02e20000, 0x02e80000)
    tenured generation total 48260K, used 28954K [0x02f60000, 0x05e81000, 0x06a80000)
    the space 48260K, 59% used [0x02f60000, 0x04ba6ad8, 0x04ba6c00, 0x05e81000)
    compacting perm gen total 18176K, used 18126K [0x06a80000, 0x07c40000, 0x0aa80000)
    the space 18176K, 99% used [0x06a80000, 0x07c33800, 0x07c33800, 0x07c40000)
    No shared spaces configured.

    Dynamic libraries:
    0x00400000 - 0x0040c000 N:\jdk1.5.0_06\bin\javaw.exe
    0x7c800000 - 0x7c8c0000 X:\WINDOWS\system32\ntdll.dll
    0x77e40000 - 0x77f42000 X:\WINDOWS\system32\kernel32.dll
    0x77f50000 - 0x77feb000 X:\WINDOWS\system32\ADVAPI32.dll
    0x77c50000 - 0x77cef000 X:\WINDOWS\system32\RPCRT4.dll
    0x76f50000 - 0x76f63000 X:\WINDOWS\system32\Secur32.dll
    0x77380000 - 0x77411000 X:\WINDOWS\system32\USER32.dll
    0x77c00000 - 0x77c48000 X:\WINDOWS\system32\GDI32.dll
    0x77ba0000 - 0x77bfa000 X:\WINDOWS\system32\MSVCRT.dll
    0x71c20000 - 0x71c32000 X:\WINDOWS\system32\tsappcmp.dll
    0x6e220000 - 0x6e226000 Y:\Program Files\Citrix\system32\RMProcessLink.dll
    0x67230000 - 0x67251000 Y:\Program Files\Citrix\system32\mfaphook.dll
    0x67b80000 - 0x67bbd000 Y:\Program Files\Citrix\system32\CtxSbxHook.dll
    0x66d70000 - 0x66d79000 Y:\Program Files\Citrix\system32\mmhook.dll
    0x668c0000 - 0x668c8000 Y:\Program Files\Citrix\system32\tzhook.dll
    0x66c50000 - 0x66c68000 Y:\Program Files\Citrix\system32\scardhook.dll
    0x10000000 - 0x100e0000 Y:\Program Files\Citrix\system32\Twnhook.dll
    0x67ab0000 - 0x67ab6000 Y:\Program Files\Citrix\system32\cxinjime.dll
    0x669f0000 - 0x669fb000 Y:\Program Files\Citrix\system32\wdmaudhook.dll
    0x6d6e0000 - 0x6d874000 N:\jdk1.5.0_06\jre\bin\client\jvm.dll
    0x76aa0000 - 0x76acd000 X:\WINDOWS\system32\WINMM.dll
    0x6d2f0000 - 0x6d2f8000 N:\jdk1.5.0_06\jre\bin\hpi.dll
    0x76b70000 - 0x76b7b000 X:\WINDOWS\system32\PSAPI.DLL
    0x6d3f0000 - 0x6d425000 N:\jdk1.5.0_06\jre\bin\jdwp.dll
    0x6d6b0000 - 0x6d6bc000 N:\jdk1.5.0_06\jre\bin\verify.dll
    0x6d370000 - 0x6d38d000 N:\jdk1.5.0_06\jre\bin\java.dll
    0x6d6d0000 - 0x6d6df000 N:\jdk1.5.0_06\jre\bin\zip.dll
    0x6d290000 - 0x6d297000 N:\jdk1.5.0_06\jre\bin\dt_socket.dll
    0x71c00000 - 0x71c17000 X:\WINDOWS\system32\WS2_32.dll
    0x71bf0000 - 0x71bf8000 X:\WINDOWS\system32\WS2HELP.dll
    0x71b20000 - 0x71b61000 X:\WINDOWS\System32\mswsock.dll
    0x76ed0000 - 0x76efa000 X:\WINDOWS\system32\DNSAPI.dll
    0x76f70000 - 0x76f77000 X:\WINDOWS\System32\winrnr.dll
    0x76f10000 - 0x76f3e000 X:\WINDOWS\system32\WLDAP32.dll
    0x76f80000 - 0x76f85000 X:\WINDOWS\system32\rasadhlp.dll
    0x5f270000 - 0x5f2ca000 X:\WINDOWS\system32\hnetcfg.dll
    0x71ae0000 - 0x71ae8000 X:\WINDOWS\System32\wshtcpip.dll
    0x6d070000 - 0x6d1d7000 N:\jdk1.5.0_06\jre\bin\awt.dll
    0x73070000 - 0x73097000 X:\WINDOWS\system32\WINSPOOL.DRV
    0x76290000 - 0x762ad000 X:\WINDOWS\system32\IMM32.dll
    0x77670000 - 0x777a9000 X:\WINDOWS\system32\ole32.dll
    0x73860000 - 0x738ab000 X:\WINDOWS\system32\ddraw.dll
    0x73b30000 - 0x73b36000 X:\WINDOWS\system32\DCIMAN32.dll
    0x7c8d0000 - 0x7d0cf000 X:\WINDOWS\system32\shell32.dll
    0x77da0000 - 0x77df2000 X:\WINDOWS\system32\SHLWAPI.dll
    0x77420000 - 0x77523000 X:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.3790.3959_x-ww_D8713E55\comctl32.dll
    0x6d530000 - 0x6d543000 N:\jdk1.5.0_06\jre\bin\net.dll
    0x68000000 - 0x68035000 X:\WINDOWS\system32\rsaenh.dll
    0x76920000 - 0x769e2000 X:\WINDOWS\system32\USERENV.dll
    0x71c40000 - 0x71c97000 X:\WINDOWS\system32\netapi32.dll
    0x6d660000 - 0x6d666000 N:\jdk1.5.0_06\jre\bin\rmi.dll
    0x6d2b0000 - 0x6d2ed000 N:\jdk1.5.0_06\jre\bin\fontmanager.dll
    0x6d550000 - 0x6d559000 N:\jdk1.5.0_06\jre\bin\nio.dll
    0x77530000 - 0x775c7000 X:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_5.82.3790.3959_x-ww_78FCF8D0\comctl32.dll

    VM Arguments:
    jvm_args: -XX:-UsePerfData -DENV=local -Dswing.metalTheme=steel -Xbootclasspath/a:Y:\Program Files\MyEclipse\eclipse\plugins\com.genuitec.eclip se.j2eedt.core_4.1.1\data\libraryset\1.4\activatio n.jar;Y:\Program Files\MyEclipse\eclipse\plugins\com.genuitec.eclip se.j2eedt.core_4.1.1\data\libraryset\1.4\javax.ser vlet.jar;Y:\Program Files\MyEclipse\eclipse\plugins\com.genuitec.eclip se.j2eedt.core_4.1.1\data\libraryset\1.4\javax.ser vlet.jsp.jar;Y:\Program Files\MyEclipse\eclipse\plugins\com.genuitec.eclip se.j2eedt.core_4.1.1\data\libraryset\1.4\jboss-j2ee.jar;Y:\Program Files\MyEclipse\eclipse\plugins\com.genuitec.eclip se.j2eedt.core_4.1.1\data\libraryset\1.4\jboss-jaxrpc.jar;Y:\Program Files\MyEclipse\eclipse\plugins\com.genuitec.eclip se.j2eedt.core_4.1.1\data\libraryset\1.4\jboss-jsr77.jar;Y:\Program Files\MyEclipse\eclipse\plugins\com.genuitec.eclip se.j2eedt.core_4.1.1\data\libraryset\1.4\jboss-saaj.jar;Y:\Program Files\MyEclipse\eclipse\plugins\com.genuitec.eclip se.j2eedt.core_4.1.1\data\libraryset\1.4\mail.jar; Y:\Program Files\MyEclipse\eclipse\plugins\com.genuitec.eclip se.j2eedt.core_4.1.1\data\libraryset\1.4\namespace .jar;Y:\Program Files\MyEclipse\eclipse\plugins\com.genuitec.eclip se.j2eedt.core_4.1.1\data\libraryset\1.4\xml-apis.jar -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=y,address=loc alhost:2169
    java_command: com.spectramarketing.phoenix.ui.application.phoeni x an56 an56 phx103 dcvd 1621 nawinweb031 sde_lnx37 9 SDE.BLOCK_GROUP.BLOCKG_KEY D:/ArcIMS/Website/AXLTest/header.htm D:/ArcIMS/Website/AXLTest/footer.htm 7 1 SDE.POSTAL_BOUNDARY.ZIP 13 true //199.249.171.98/jobs
    Launcher Type: SUN_STANDARD

    Environment Variables:
    JAVA_TOOL_OPTIONS=-XX:-UsePerfData
    PATH=Y:\oracle\ora92\bin;Y:\Program Files\VERITAS\NetBackup\bin\;Y:\PROGRA~1\Serena\vm \win32\bin;Y:\PROGRA~1\Serena\vm\common\bin\win32; X:\Program Files\Oracle\jre\1.3.1\bin;X:\Program Files\Oracle\jre\1.1.8\bin;X:\WINDOWS\system32;X:\ WINDOWS;X:\WINDOWS\System32\Wbem;Y:\informix\bin;X :\Program Files\Microsoft SQL Server\80\Tools\BINN;X:\Program Files\Dell\SysMgt\oma\bin;Y:\Program Files\Citrix\System32\Citrix\IMA;Y:\Program Files\Citrix\System32\Citrix\IMA\Subsystems;X:\WIN DOWS\System32\Citrix\IMA;Y:\Program Files\Citrix\system32;Y:\Profiles\mohammedza01\.vm webclient\Java\bin
    USERNAME=mohammedza01
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel



    --------------- S Y S T E M ---------------

    OS: Windows Server 2003 family Build 3790 Service Pack 2

    CPU:total 4 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht

    Memory: 4k page, physical 2097151k(326700k free), swap 4194303k(4194303k free)

    vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0

  2. #2
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default

    Usually a bug in the native code, rather than Java...a null pointer is most common.
    Can, occasionally, be a RAM problem (duff RAM will cause this), but the null pointer in your C code is the more likely candidate.

  3. #3
    dhivyadevi is offline Member
    Join Date
    Sep 2009
    Posts
    4
    Rep Power
    0

    Default JVM Crashed when using JNI

    Hi,

    Thanks for your reply.
    Actually i couldn't reproduce this issue again with the same senario ... so i thought the issue might not be with code... can you please guide me on this

  4. #4
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default

    All I can say is something in the C code probably has a null pointer.
    Possibly when it's accessing the 3rd party stuff?
    Maybe if QAS (whataver that is) is not available for whatever reason?

    You're just going to have to work through the C code.

  5. #5
    dhivyadevi is offline Member
    Join Date
    Sep 2009
    Posts
    4
    Rep Power
    0

    Default

    thank you... i will do analysis in C code. Actually in system we have only jar file for the C program.
    And I can get the source code.
    In eclipse i can debug the Java files, and when the java file calls the C functions I couldn't do debug.
    Could you please guide how can I do dubugging the C program since I am new to C.


    Thanks in advance.

  6. #6
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default

    All I can suggest is find who wrote the C and get them to debug it.

  7. #7
    dhivyadevi is offline Member
    Join Date
    Sep 2009
    Posts
    4
    Rep Power
    0

    Default

    thank you...

  8. #8
    Cthulhu76 is offline Member
    Join Date
    Dec 2009
    Posts
    1
    Rep Power
    0

    Default

    A few months late, but I'm curious as to what in this specific log indicates a null pointer ? Any time I've encountered a null pointer when in native code, I've always seen this line to indicate that a null pointer was dereferenced:

    siginfo: ExceptionCode=0xc0000005, writing address 0x00000000

    In addition, when it was my code that dereferenced a null pointer, my DLL was the one listed as the "problematic frame" and was the only one in the native code call stack.

    In the OP's case, we see

    siginfo: ExceptionCode=0xc0000005, reading address 0x0258005c

    and it doesn't look like there are any DLLs of his that are on the native code call stack.

    It looks more like a wild pointer was dereferenced somewhere in the C code. Strangely enough, I've encountered this problem intermittently when using JNI and COM in conjunction with each other with COM being used to call a customer's VB6 DLL. Due to analyzing the native code over and over with no results, this solution was re-implemented using sockets (Java code uses a socket to call C# code listening on the other end of the socket and lets .NET take care of all the COM stuff to call VB6).

    What always confused me about the occurrence of the issue is that the native code on the call stack would never have my DLL or the customer's DLL anywhere near the top. Does anyone have any ideas why this would happen if a VB6 DLL is being called ? 50% of the time, I've seen this happen when first dereferencing the interface pointer returned from CoCreateInstance (even after the returned HRESULT was S_OK). For example, this is what I've seen before in my experience where CustomerInfoProxy.dll is my JNI DLL and MIGI.DLL is the customer's VB6 DLL that uses ADO.

    #
    # An unexpected error has been detected by Java Runtime Environment:
    #
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c82a0d0, pid=4176, tid=3424
    #
    # Java VM: Java HotSpot(TM) Client VM (10.0-b23 mixed mode windows-x86)
    # Problematic frame:
    # C [ntdll.dll+0x2a0d0]


    --------------- T H R E A D ---------------

    Current thread (0x49152800): JavaThread "http-8080-Processor24" daemon [_thread_in_native, id=3424, stack(0x4a370000,0x4a3c0000)]

    siginfo: ExceptionCode=0xc0000005, writing address 0x7767ed5a

    Registers:
    EAX=0x7767ed08, EBX=0x00090000, ECX=0x00000020, EDX=0x02e6002b
    ESP=0x4a3be8b0, EBP=0x4a3beacc, ESI=0x7767ed5c, EDI=0x7767ed54
    EIP=0x7c82a0d0, EFLAGS=0x00010202

    Top of Stack: (sp=0x4a3be8b0)
    0x4a3be8b0: 0009ecd8 00000000 00000000 77e622c9
    0x4a3be8c0: 7c829e08 006c006c 7c810000 4a3be8e8
    0x4a3be8d0: 0cffffff 00000000 0000e06c 4a3be8ec
    0x4a3be8e0: 00000020 00090000 000bfcb0 4a3beb14
    0x4a3be8f0: 4a3be900 00090000 7c82a124 00090c28
    0x4a3be900: 4a3beb28 7c82a0b8 7c82a0fc 77c73c08
    0x4a3be910: 000ed458 000b7ed0 4a3beb84 00090778
    0x4a3be920: 4a3beb48 7c82a0b8 7c82a0fc 77796200

    Instructions: (pc=0x7c82a0d0)
    0x7c82a0c0: 84 2c 45 00 00 8d 7e f8 8a 45 dc 8b 4d 10 2a c1
    0x7c82a0d0: 88 47 06 8b c7 c1 e8 03 32 43 04 88 47 04 f6 45


    Stack: [0x4a370000,0x4a3c0000], sp=0x4a3be8b0, free space=314k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C [ntdll.dll+0x2a0d0]
    C [ntdll.dll+0x339e1]
    C [RPCRT4.dll+0x2bc50]
    C [RPCRT4.dll+0x2bc7c]
    C [RPCRT4.dll+0x2c000]
    C [RPCRT4.dll+0x2c0fe]
    C [RPCRT4.dll+0x25589]
    C [RPCRT4.dll+0x25545]
    C [RPCRT4.dll+0x25190]
    C [ole32.dll+0x379ca]
    C [ole32.dll+0x37599]
    C [ole32.dll+0x4100a]
    C [ole32.dll+0x40aac]
    C [ole32.dll+0x40c5b]
    C [ole32.dll+0x422d8]
    C [msado15.dll+0x1c85f]
    C [msado15.dll+0x105ca]
    C [msado15.dll+0xf9a6]
    C [msado15.dll+0xf941]
    C [msado15.dll+0x675ba]
    C [MSVBVM60.DLL+0xe3ad4]
    C [MSVBVM60.DLL+0xd9c9d]
    C [MIGI.DLL+0x331b]
    C [CustomerInfoProxy.dll+0x190a]

    --------------- 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: Sat Dec 26 19:08:06 2009
    elapsed time: 9505 seconds
    Last edited by Cthulhu76; 12-30-2009 at 05:52 PM.

Similar Threads

  1. Folders instead of packages after OS crashed
    By Kubuntek in forum Eclipse
    Replies: 0
    Last Post: 08-03-2008, 02:26 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •