Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6612470

JVM crash at sun.nio.ch.DatagramChannelImpl.finalize()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • None
    • core-libs
    • None
    • x86
    • linux_redhat_4.0

      During an internal test on Linux we sometimes crash the JVM. It is probably related to opening and closing many datagram sockets. Here is the dump from the JVM:

      #
      # An unexpected error has been detected by HotSpot Virtual Machine:
      #
      # SIGSEGV (0xb) at pc=0xf162655c, pid=14107, tid=3450862512
      #
      # Java VM: Java HotSpot(TM) Server VM (1.5.0_12-b04 mixed mode)
      # Problematic frame:
      # v ~BufferBlob::jni_fast_GetIntField
      #
      # Can not save log file, dump to screen..
      #
      # An unexpected error has been detected by HotSpot Virtual Machine:
      #
      # SIGSEGV (0xb) at pc=0xf162655c, pid=14107, tid=3450862512
      #
      # Java VM: Java HotSpot(TM) Server VM (1.5.0_12-b04 mixed mode)
      # Problematic frame:
      # v ~BufferBlob::jni_fast_GetIntField
      #

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

      Current thread (0x081040e8): JavaThread "Finalizer" daemon [_thread_in_native, id=14116]

      siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x00000000

      Registers:
      EAX=0x00000022, EBX=0xcbe47304, ECX=0x00000026, EDX=0x00000000
      ESP=0xcdafe890, EBP=0xcdafe8ac, ESI=0x081041a8, EDI=0x081040e8
      EIP=0xf162655c, CR2=0x00000000, EFLAGS=0x00010246

      Top of Stack: (sp=0xcdafe890)
      0xcdafe890: cbe444d3 081041a8 00000000 00000022
      0xcdafe8a0: cdafe8cc cdafe8d4 cbe47304 cdafe8cc
      0xcdafe8b0: cbe43ee9 081041a8 00000000 ce546f20
      0xcdafe8c0: cdafe8d4 ce546fa8 ce546fa0 cdafe8fc
      0xcdafe8d0: f15eb898 081041a8 cdafe904 00000000
      0xcdafe8e0: cdafe8e0 00000000 cdafe90c ce547b18
      0xcdafe8f0: 00000000 ce546fa8 cdafe90c cdafe92c
      0xcdafe900: f15e5b6b ce547a88 f15e96b9 00000000

      Instructions: (pc=0xf162655c)
      0xf162654c: 00 00 00 8b c1 83 e0 01 8b 54 04 08 8b 44 24 0c
      0xf162655c: 8b 12 c1 e8 02 8b 04 02 8b d0 81 f2 f4 96 bb f7

      Stack: [0xcda7f000,0xcdb00000), sp=0xcdafe890, free space=510k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      v ~BufferBlob::jni_fast_GetIntField
      C [libnio.so+0x3ee9] Java_sun_nio_ch_FileDispatcher_preClose0+0x29
      j sun.nio.ch.FileDispatcher.preClose0(Ljava/io/FileDescriptor;)V+0
      j sun.nio.ch.DatagramDispatcher.preClose(Ljava/io/FileDescriptor;)V+1
      j sun.nio.ch.DatagramChannelImpl.implCloseSelectableChannel()V+14
      j java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel()V+1
      C [libnio.so+0x3ee9] Java_sun_nio_ch_FileDispatcher_preClose0+0x29
      j sun.nio.ch.FileDispatcher.preClose0(Ljava/io/FileDescriptor;)V+0
      j sun.nio.ch.DatagramDispatcher.preClose(Ljava/io/FileDescriptor;)V+1
      j sun.nio.ch.DatagramChannelImpl.implCloseSelectableChannel()V+14
      j java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel()V+1
      j java.nio.channels.spi.AbstractInterruptibleChannel.close()V+23
      j sun.nio.ch.DatagramChannelImpl.finalize()V+1
      v ~StubRoutines::call_stub
      V [libjvm.so+0x267d7c]
      V [libjvm.so+0x437618]
      V [libjvm.so+0x267baf]
      V [libjvm.so+0x292a33]
      V [libjvm.so+0x278db4]
      C [libjava.so+0xb3fe] Java_java_lang_ref_Finalizer_invokeFinalizeMethod+0x6e
      j java.lang.ref.Finalizer.invokeFinalizeMethod(Ljava/lang/Object;)V+0
      j java.lang.ref.Finalizer.runFinalizer()V+45
      j java.lang.ref.Finalizer.access$100(Ljava/lang/ref/Finalizer;)V+1
      j java.lang.ref.Finalizer$FinalizerThread.run()V+11
      v ~StubRoutines::call_stub
      V [libjvm.so+0x267d7c]
      V [libjvm.so+0x437618]
      V [libjvm.so+0x2675d5]
      V [libjvm.so+0x26766e]
      V [libjvm.so+0x2df635]
      V [libjvm.so+0x4d7d13]
      V [libjvm.so+0x438228]
      C [libpthread.so.0+0x5371]

      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      j sun.nio.ch.FileDispatcher.preClose0(Ljava/io/FileDescriptor;)V+0
      j sun.nio.ch.DatagramDispatcher.preClose(Ljava/io/FileDescriptor;)V+1
      j sun.nio.ch.DatagramChannelImpl.implCloseSelectableChannel()V+14
      j java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel()V+1
      j java.nio.channels.spi.AbstractInterruptibleChannel.close()V+23
      j sun.nio.ch.DatagramChannelImpl.finalize()V+1
      v ~StubRoutines::call_stub
      j java.lang.ref.Finalizer.invokeFinalizeMethod(Ljava/lang/Object;)V+0
      j java.lang.ref.Finalizer.runFinalizer()V+45
      j java.lang.ref.Finalizer.access$100(Ljava/lang/ref/Finalizer;)V+1
      j java.lang.ref.Finalizer$FinalizerThread.run()V+11
      v ~StubRoutines::call_stub

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

      Java Threads: ( => current thread )
        0x0812b298 JavaThread "Thread-318" [_thread_in_native, id=15839]

      ... a lot of threads, so no place in the bug Description window...
      (see comments)

        0xcc459ac0 JavaThread "Job_Executor0" daemon [_thread_in_native, id=14127]
        0xcc428348 JavaThread "RMI TCP Accept-19009" daemon [_thread_in_native, id=14124]
        0xcc424d30 JavaThread "RMI TCP Accept-0" daemon [_thread_in_native, id=14123]
        0xcc424760 JavaThread "Timer-0" daemon [_thread_blocked, id=14122]
        0x081125f8 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=14121]
        0x08111120 JavaThread "CompilerThread1" daemon [_thread_in_native, id=14120]
        0x08110070 JavaThread "CompilerThread0" daemon [_thread_in_native, id=14119]
        0x0810eef0 JavaThread "AdapterThread" daemon [_thread_blocked, id=14118]
        0x0810e038 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=14117]
      #
      # Java VM: Java HotSpot(TM) Server VM (1.5.0_12-b04 mixed mode)
      # Problematic frame:
      # v ~BufferBlob::jni_fast_GetIntField
      #
      # Can not save log file, dump to screen..
      #
      # An unexpected error has been detected by HotSpot Virtual Machine:
      #
      # SIGSEGV (0xb) at pc=0xf162655c, pid=14107, tid=3450862512
      #
      # Java VM: Java HotSpot(TM) Server VM (1.5.0_12-b04 mixed mode)
      # Problematic frame:
      # v ~BufferBlob::jni_fast_GetIntField
      #

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

      Current thread (0x081040e8): JavaThread "Finalizer" daemon [_thread_in_native, id=14116]

      siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x00000000

      Registers:
      EAX=0x00000022, EBX=0xcbe47304, ECX=0x00000026, EDX=0x00000000
      ESP=0xcdafe890, EBP=0xcdafe8ac, ESI=0x081041a8, EDI=0x081040e8
      EIP=0xf162655c, CR2=0x00000000, EFLAGS=0x00010246

      Top of Stack: (sp=0xcdafe890)
      0xcdafe890: cbe444d3 081041a8 00000000 00000022
      0xcdafe8a0: cdafe8cc cdafe8d4 cbe47304 cdafe8cc
      0xcdafe8b0: cbe43ee9 081041a8 00000000 ce546f20
      0xcdafe8c0: cdafe8d4 ce546fa8 ce546fa0 cdafe8fc
      0xcdafe8d0: f15eb898 081041a8 cdafe904 00000000
      0xcdafe8e0: cdafe8e0 00000000 cdafe90c ce547b18
      0xcdafe8f0: 00000000 ce546fa8 cdafe90c cdafe92c
      0xcdafe900: f15e5b6b ce547a88 f15e96b9 00000000

      Instructions: (pc=0xf162655c)
      0xf162654c: 00 00 00 8b c1 83 e0 01 8b 54 04 08 8b 44 24 0c
      0xf162655c: 8b 12 c1 e8 02 8b 04 02 8b d0 81 f2 f4 96 bb f7

      Stack: [0xcda7f000,0xcdb00000), sp=0xcdafe890, free space=510k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      v ~BufferBlob::jni_fast_GetIntField
      C [libnio.so+0x3ee9] Java_sun_nio_ch_FileDispatcher_preClose0+0x29
      j sun.nio.ch.FileDispatcher.preClose0(Ljava/io/FileDescriptor;)V+0
      j sun.nio.ch.DatagramDispatcher.preClose(Ljava/io/FileDescriptor;)V+1
      j sun.nio.ch.DatagramChannelImpl.implCloseSelectableChannel()V+14
      j java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel()V+1
      j java.nio.channels.spi.AbstractInterruptibleChannel.close()V+23
      j sun.nio.ch.DatagramChannelImpl.finalize()V+1
      v ~StubRoutines::call_stub
      V [libjvm.so+0x267d7c]
      V [libjvm.so+0x437618]
      V [libjvm.so+0x267baf]
      V [libjvm.so+0x292a33]
      V [libjvm.so+0x278db4]
      C [libjava.so+0xb3fe] Java_java_lang_ref_Finalizer_invokeFinalizeMethod+0x6e
      j java.lang.ref.Finalizer.invokeFinalizeMethod(Ljava/lang/Object;)V+0
      j java.lang.ref.Finalizer.runFinalizer()V+45
      j java.lang.ref.Finalizer.access$100(Ljava/lang/ref/Finalizer;)V+1
      j java.lang.ref.Finalizer$FinalizerThread.run()V+11
      v ~StubRoutines::call_stub
      V [libjvm.so+0x267d7c]
      V [libjvm.so+0x437618]
      V [libjvm.so+0x2675d5]
      V [libjvm.so+0x26766e]
      V [libjvm.so+0x2df635]
      V [libjvm.so+0x4d7d13]
      25%

            Unassigned Unassigned
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: