2 Replies Latest reply: Feb 22, 2007 11:28 AM by 807597 RSS

    JVM crash on NIO

    807596
      Hi,

      I have written a piece of software that does a lot of NIO work by accepting connections on a few Server sockets and reading/writing data on the resulting client sockets. However, "suddenly" my JVM starting crashing shortly after a few tens/hundred clients have connected to this server. I'm saying "suddenly" because I cannot say that the code did not change from the previous version, it did - but whatever I did, crashing the JVM is something I shouldn't be able to do.

      The dump report is below, I'd appreciate any help guys ! :)

      #
      # An unexpected error has been detected by HotSpot Virtual Machine:
      #
      # EXCEPTION_GUARD_PAGE (0x80000001) at pc=0x25fd1a49, pid=6656, tid=5644
      #
      # Java VM: Java HotSpot(TM) Server VM (1.5.0_05-b05 mixed mode)
      # Problematic frame:
      # C [CtxLsp.dll+0x1a49]
      #

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

      Current thread (0x26180130): JavaThread "CommunicationManager" [_thread_in_native, id=5644]

      siginfo: ExceptionCode=0x80000001, ExceptionInformation=0x00000001 0x283e0820

      Registers:
      EAX=0x00001d1c, EBX=0x283dc740, ECX=0x00001cdc, EDX=0x283d95b0
      ESP=0x283d9360, EBP=0x00000000, ESI=0x26026ec8, EDI=0x283d94ac
      EIP=0x25fd1a49, EFLAGS=0x00010202

      Top of Stack: (sp=0x283d9360)
      0x283d9360: 283d9394 283dd744 25fd1cee 283d94ac
      0x283d9370: 283de748 25fd961b 283d93a8 283d94ac
      0x283d9380: 283d95b0 283de748 000b2e30 283d970c
      0x283d9390: 283dc740 26026e08 26026ec8 2602ff68
      0x283d93a0: 25feb018 00000001 00000046 00002374
      0x283d93b0: 0000237c 00002228 00002218 000021d0
      0x283d93c0: 000021c0 0000218c 00002118 000020f4
      0x283d93d0: 000020cc 000020bc 000020a8 00002098

      Instructions: (pc=0x25fd1a49)
      0x25fd1a39: 8d a4 24 00 00 00 00 8b 0e e8 49 51 00 00 8b 0f
      0x25fd1a49: 89 44 8f 04 ff 07 8b 76 08 85 f6 75 ea 5e 33 c0


      Stack: [0x283a0000,0x283e0000), sp=0x283d9360, free space=228k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      C [CtxLsp.dll+0x1a49]

      [error occurred during error reporting, step 120, id 0xc0000005]

      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      j sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(JI[I[I[IJ)I+0
      j sun.nio.ch.WindowsSelectorImpl$SubSelector.poll()I+43
      j sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Lsun/nio/ch/WindowsSelectorImpl$SubSelector;)I+1
      j sun.nio.ch.WindowsSelectorImpl.doSelect(J)I+63
      j sun.nio.ch.SelectorImpl.lockAndDoSelect(J)I+37
      v ~C2IAdapter
      J com.aternity.epm.core.CommunicationManager.doOnce()V
      v ~I2CAdapter
      j com.aternity.system.common.InterruptibleTask.run()V+8
      j java.lang.Thread.run()V+11
      v ~StubRoutines::call_stub

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

      Java Threads: ( => current thread )
      0x266e4e08 JavaThread "pool-1-thread-5" [_thread_blocked, id=6960]
      0x261d4d50 JavaThread "pool-1-thread-4" [_thread_blocked, id=3516]
      0x261ece50 JavaThread "pool-1-thread-3" [_thread_blocked, id=4404]
      0x26244318 JavaThread "pool-1-thread-2" [_thread_blocked, id=6444]
      0x0003d8b8 JavaThread "DestroyJavaVM" [_thread_blocked, id=6652]
      0x26232000 JavaThread "EventConsumerAggregator" [_thread_blocked, id=256]
      0x26256d08 JavaThread "EventConsumerAggregator" [_thread_blocked, id=3644]
      0x26256b88 JavaThread "EventConsumerAggregator" [_thread_blocked, id=6980]
      0x26232f90 JavaThread "RawDataReporterEventConsumer" [_thread_blocked, id=7176]
      0x2622fd90 JavaThread "ResourceManagerInterface" [_thread_blocked, id=7104]
      =>0x26180130 JavaThread "CommunicationManager" [_thread_in_native, id=5644]
      0x261ea2b0 JavaThread "Statistics" [_thread_blocked, id=7888]
      0x25e16238 JavaThread "OutgoingMessageDispatcher" [_thread_blocked, id=2100]
      0x25e09948 JavaThread "IncomingMessageDispatcher" [_thread_blocked, id=7896]
      0x25e11048 JavaThread "MessageListenerThread - epm1" [_thread_blocked, id=5272]
      0x25de8c40 JavaThread "MessageListenerThread - epmsvc" [_thread_blocked, id=2016]
      0x263c4d88 JavaThread "MessageListenerThread - epmservices1" [_thread_blocked, id=5640]
      0x26241e78 JavaThread "pool-2-thread-1" [_thread_blocked, id=7868]
      0x2622db20 JavaThread "pool-1-thread-1" [_thread_blocked, id=5676]
      0x261aad98 JavaThread "MessageListenerThread - client1" [_thread_blocked, id=5848]
      0x268d2618 JavaThread "MessageListenerThread - GR master" [_thread_blocked, id=7848]
      0x26370c78 JavaThread "Timer-0" daemon [_thread_blocked, id=5520]
      0x26326008 JavaThread "Thread-3" [_thread_blocked, id=5868]
      0x2630dc98 JavaThread "Thread-2" [_thread_blocked, id=1792]
      0x26188a88 JavaThread "UIL2(SocketManager.MsgPool@193c0cf client=192.168.111.113:8093)#1" daemon [_thread_blocked, id=6948]
      0x26fbb4c8 JavaThread "Connection Monitor Thread" daemon [_thread_blocked, id=3112]
      0x26343d58 JavaThread "UIL2.SocketManager.WriteTask#2 client=192.168.111.113:8093" daemon [_thread_blocked, id=6860]
      0x268bc008 JavaThread "UIL2.SocketManager.ReadTask#1 client=192.168.111.113:8093" daemon [_thread_in_native, id=6892]
      0x26fabe68 JavaThread "RMI ConnectionExpiration-[192.168.111.113:1098]" daemon [_thread_blocked, id=6184]
      0x26227e48 JavaThread "GC Daemon" daemon [_thread_blocked, id=4552]
      0x25e049a8 JavaThread "RMI RenewClean-[192.168.111.113:1098]" daemon [_thread_blocked, id=5044]
      0x25e20610 JavaThread "Thread-0" daemon [_thread_blocked, id=6168]
      0x25a31120 JavaThread "Monitor Ctrl-Break" daemon [_thread_in_native, id=2524]
      0x00ac7970 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4792]
      0x00ac6678 JavaThread "CompilerThread1" daemon [_thread_blocked, id=5284]
      0x00ac5818 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5828]
      0x00ac48e8 JavaThread "AdapterThread" daemon [_thread_blocked, id=1212]
      0x00ac3d60 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=7520]
      0x00abb028 JavaThread "Finalizer" daemon [_thread_blocked, id=1068]
      0x00aba398 JavaThread "Reference Handler" daemon [_thread_blocked, id=8160]

      Other Threads:
      0x00038cb8 VMThread [id=6460]
      0x00ac38d8 WatcherThread [id=5072]

      VM state:not at safepoint (normal execution)

      VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
      [0x0003d078/0x00002ee0] Heap_lock - owner thread: 0x25e09948

      Heap
      def new generation total 576K, used 16K [0x02ad0000, 0x02b70000, 0x06140000)
      eden space 512K, 3% used [0x02ad0000, 0x02ad4010, 0x02b50000)
      from space 64K, 0% used [0x02b60000, 0x02b60000, 0x02b70000)
      to space 64K, 0% used [0x02b50000, 0x02b50000, 0x02b60000)
      tenured generation total 2812K, used 1685K [0x06140000, 0x063ff000, 0x214d0000)
      the space 2812K, 59% used [0x06140000, 0x062e57f0, 0x062e5800, 0x063ff000)
      compacting perm gen total 16384K, used 9128K [0x214d0000, 0x224d0000, 0x254d0000)
      the space 16384K, 55% used [0x214d0000, 0x21dba1d8, 0x21dba200, 0x224d0000)
      No shared spaces configured.

      Dynamic libraries:
      0x00400000 - 0x0040c000      C:\dev\Java\jdk1.5.0_05\bin\java.exe
      0x7c900000 - 0x7c9b0000      C:\WINDOWS\system32\ntdll.dll
      0x7c800000 - 0x7c8f4000      C:\WINDOWS\system32\kernel32.dll
      0x77dd0000 - 0x77e6b000      C:\WINDOWS\system32\ADVAPI32.dll
      0x77e70000 - 0x77f01000      C:\WINDOWS\system32\RPCRT4.dll
      0x77c10000 - 0x77c68000      C:\WINDOWS\system32\MSVCRT.dll
      0x6d840000 - 0x6dbd8000      C:\dev\Java\jdk1.5.0_05\jre\bin\server\jvm.dll
      0x77d40000 - 0x77dd0000      C:\WINDOWS\system32\USER32.dll
      0x77f10000 - 0x77f57000      C:\WINDOWS\system32\GDI32.dll
      0x76b40000 - 0x76b6d000      C:\WINDOWS\system32\WINMM.dll
      0x629c0000 - 0x629c9000      C:\WINDOWS\system32\LPK.DLL
      0x74d90000 - 0x74dfb000      C:\WINDOWS\system32\USP10.dll
      0x6d2f0000 - 0x6d2f8000      C:\dev\Java\jdk1.5.0_05\jre\bin\hpi.dll
      0x76bf0000 - 0x76bfb000      C:\WINDOWS\system32\PSAPI.DLL
      0x6d680000 - 0x6d68c000      C:\dev\Java\jdk1.5.0_05\jre\bin\verify.dll
      0x6d370000 - 0x6d38d000      C:\dev\Java\jdk1.5.0_05\jre\bin\java.dll
      0x6d6a0000 - 0x6d6af000      C:\dev\Java\jdk1.5.0_05\jre\bin\zip.dll
      0x009a0000 - 0x009a7000      C:\dev\IntelliJ\bin\breakgen.dll
      0x6d530000 - 0x6d543000      C:\dev\Java\jdk1.5.0_05\jre\bin\net.dll
      0x71ab0000 - 0x71ac7000      C:\WINDOWS\system32\WS2_32.dll
      0x71aa0000 - 0x71aa8000      C:\WINDOWS\system32\WS2HELP.dll
      0x25fd0000 - 0x25ff1000      C:\WINDOWS\system32\CtxLsp.dll
      0x7c9c0000 - 0x7d1d5000      C:\WINDOWS\system32\SHELL32.dll
      0x77f60000 - 0x77fd6000      C:\WINDOWS\system32\SHLWAPI.dll
      0x773d0000 - 0x774d2000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
      0x5d090000 - 0x5d127000      C:\WINDOWS\system32\comctl32.dll
      0x43000000 - 0x43005000      C:\Program Files\Google\Google Desktop Search\GoogleDesktopNetwork1.dll
      0x77fe0000 - 0x77ff1000      C:\WINDOWS\system32\Secur32.dll
      0x71a50000 - 0x71a8f000      C:\WINDOWS\system32\mswsock.dll
      0x662b0000 - 0x66308000      C:\WINDOWS\system32\hnetcfg.dll
      0x71a90000 - 0x71a98000      C:\WINDOWS\System32\wshtcpip.dll
      0x5ad70000 - 0x5ada8000      C:\WINDOWS\system32\uxtheme.dll
      0x67330000 - 0x6735f000      C:\PROGRA~1\COMMON~1\SYMANT~1\ANTISPAM\asOEHook.dll
      0x7c340000 - 0x7c396000      C:\WINDOWS\system32\MSVCR71.dll
      0x74720000 - 0x7476b000      C:\WINDOWS\system32\MSCTF.dll
      0x63000000 - 0x63014000      C:\WINDOWS\system32\SynTPFcs.dll
      0x77c00000 - 0x77c08000      C:\WINDOWS\system32\VERSION.dll
      0x76fb0000 - 0x76fb8000      C:\WINDOWS\System32\winrnr.dll
      0x76f60000 - 0x76f8c000      C:\WINDOWS\system32\WLDAP32.dll
      0x76f20000 - 0x76f47000      C:\WINDOWS\system32\DNSAPI.dll
      0x751d0000 - 0x751ee000      C:\WINDOWS\system32\wshbth.dll
      0x77920000 - 0x77a13000      C:\WINDOWS\system32\SETUPAPI.dll
      0x27e40000 - 0x27e5a000      C:\WINDOWS\system32\CtxNsp.dll
      0x76fc0000 - 0x76fc6000      C:\WINDOWS\system32\rasadhlp.dll
      0x6d660000 - 0x6d666000      C:\dev\Java\jdk1.5.0_05\jre\bin\rmi.dll
      0x27e70000 - 0x27e98000      C:\WINDOWS\system32\rsaenh.dll
      0x769c0000 - 0x76a73000      C:\WINDOWS\system32\USERENV.dll
      0x5b860000 - 0x5b8b4000      C:\WINDOWS\system32\netapi32.dll
      0x6d550000 - 0x6d559000      C:\dev\Java\jdk1.5.0_05\jre\bin\nio.dll

      VM Arguments:
      jvm_args: -Xmx512000000 -Daternity.home=C:/Projects/1.0/system/system/PlatformInvoker -Didea.launcher.port=7538 -Didea.launcher.library=C:\dev\IntelliJ\bin\breakgen.dll -Dfile.encoding=windows-1252
      java_command: com.intellij.rt.execution.application.AppMain com.aternity.system.platforminvoker.PlatformInvokerMain

      Environment Variables:
      CLASSPATH=C:\dev\IntelliJ\lib\idea.jar;C:\dev\IntelliJ\lib\jdom.jar;C:\dev\IntelliJ\lib\log4j.jar;C:\dev\IntelliJ\lib\openapi.jar;C:\dev\IntelliJ\bin\lax.jar;
      PATH=C:\oracle\product\10.1.0\db_1\bin;C:\oracle\product\10.1.0\db_1\jre\1.4.2\bin\client;C:\oracle\product\10.1.0\db_1\jre\1.4.2\bin;C:\Program Files\ThinkPad\Utilities;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\ATI Technologies\Fire GL 3D Studio Max;C:\Program Files\Intel\Wireless\Bin\;C:\Program Files\IBM ThinkVantage\Client Security Solution
      USERNAME=shachar
      OS=Windows_NT
      PROCESSOR_IDENTIFIER=x86 Family 6 Model 13 Stepping 6, GenuineIntel



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

      OS: Windows XP Build 2600 Service Pack 2

      CPU:total 1 family 6, cmov, cx8, fxsr, mmx, sse, sse2

      Memory: 4k page, physical 2096048k(682804k free), swap 4038144k(2524356k free)

      vm_info: Java HotSpot(TM) Server VM (1.5.0_05-b05) for windows-x86, built on Aug 26 2005 15:10:30 by "java_re" with MS VC++ 6.0
        • 1. Re: JVM crash on NIO
          807596
          Looks like your VM crashes while attempting to report an error during a select() call. It's quite likely you're doing something wrong there so sharing the relevant bit of code will be helpful. You're right that you sholdnt be able to crash a VM though, try other VMs and see if different behaviour occurs on different VMs.
          • 2. Re: JVM crash on NIO
            807597
            Hi Shachar_Tal

            I am facing a similar problem, my server crashes too..Were you able to resolve this problem somehow?

            Thanks