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

Dead lock in java.net.DualStackPlainSocketImpl upon launching Java Control Panel

    Details

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_162"
      Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
      Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      The "Java Control Panel" allocates 1GB of windows "Memory (Private Working Set)" per minute.
      As the PC has 12 GB I let it go up to 10 GB.
      This occurs in one of our Windows machines.
      At least three other java aplications show the same behavior.

      The issue happens when the application tries to open a socket and the connection is not established.

      It is not possible to close the "Java Control Panel". It is necessary to kill the process.

      Using the jstack.exe I see the application is trying to open a socket at:
      java.net.DualStackPlainSocketImpl.connect0



      REGRESSION. Last worked in version 8u152

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Go to the "Windows Control Panel" and click on the java icon.


      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      After starting the "Java Control Panel" the "Windows Task Manager" reported more than 1G bytes of "Memory (Private Working Set)".
      At this time the output of jstack.exe <pid> is:

      2018-03-13 16:37:13
      Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.162-b12 mixed mode):

      "TimerQueue" #23 daemon prio=5 os_prio=0 tid=0x000000001b4e6800 nid=0x2048 waiting on condition [0x000000001e78f000]
         java.lang.Thread.State: WAITING (parking)
      at sun.misc.Unsafe.park(Native Method)
      - parking to wait for <0x0000000781ae8620> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
      at java.util.concurrent.locks.LockSupport.park(Unknown Source)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
      at java.util.concurrent.DelayQueue.take(Unknown Source)
      at javax.swing.TimerQueue.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

      "DestroyJavaVM" #22 prio=5 os_prio=0 tid=0x0000000001ddf000 nid=0x27cc waiting on condition [0x0000000000000000]
         java.lang.Thread.State: RUNNABLE

      "AWT-EventQueue-0" #18 prio=6 os_prio=0 tid=0x000000001bcd5000 nid=0x2e20 runnable [0x000000001d93b000]
         java.lang.Thread.State: RUNNABLE
      at java.net.DualStackPlainSocketImpl.connect0(Native Method)
      at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
      at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
      - locked <0x0000000781b2d4d8> (a java.net.DualStackPlainSocketImpl)
      at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
      at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
      at java.net.PlainSocketImpl.connect(Unknown Source)
      at java.net.SocksSocketImpl.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at java.net.Socket.<init>(Unknown Source)
      at java.net.Socket.<init>(Unknown Source)
      at com.sun.deploy.si.SingleInstanceImpl$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.deploy.si.SingleInstanceImpl.removeSingleInstanceListener(Unknown Source)
      - locked <0x00000007811f44b8> (a java.util.ArrayList)
      at com.sun.deploy.panel.ControlPanel.exitForm(Unknown Source)
      at com.sun.deploy.panel.ControlPanel.access$000(Unknown Source)
      at com.sun.deploy.panel.ControlPanel$2.windowClosing(Unknown Source)
      at java.awt.AWTEventMulticaster.windowClosing(Unknown Source)
      at java.awt.Window.processWindowEvent(Unknown Source)
      at javax.swing.JFrame.processWindowEvent(Unknown Source)
      at java.awt.Window.processEvent(Unknown Source)
      at java.awt.Component.dispatchEventImpl(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Window.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
      at java.awt.EventQueue.access$500(Unknown Source)
      at java.awt.EventQueue$3.run(Unknown Source)
      at java.awt.EventQueue$3.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
      at java.awt.EventQueue$4.run(Unknown Source)
      at java.awt.EventQueue$4.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.run(Unknown Source)

      "AWT-Shutdown" #19 prio=5 os_prio=0 tid=0x000000001bcd2000 nid=0x28e0 in Object.wait() [0x000000001cadf000]
         java.lang.Thread.State: WAITING (on object monitor)
      at java.lang.Object.wait(Native Method)
      - waiting on <0x0000000781048d80> (a java.lang.Object)
      at java.lang.Object.wait(Unknown Source)
      at sun.awt.AWTAutoShutdown.run(Unknown Source)
      - locked <0x0000000781048d80> (a java.lang.Object)
      at java.lang.Thread.run(Unknown Source)

      "Thread-1" #15 daemon prio=5 os_prio=0 tid=0x000000001bc15000 nid=0x2730 runnable [0x000000001d20e000]
         java.lang.Thread.State: RUNNABLE
      at java.net.DualStackPlainSocketImpl.accept0(Native Method)
      at java.net.DualStackPlainSocketImpl.socketAccept(Unknown Source)
      at java.net.AbstractPlainSocketImpl.accept(Unknown Source)
      at java.net.PlainSocketImpl.accept(Unknown Source)
      - locked <0x00000007811f4bf0> (a java.net.SocksSocketImpl)
      at java.net.ServerSocket.implAccept(Unknown Source)
      at java.net.ServerSocket.accept(Unknown Source)
      at com.sun.deploy.si.SingleInstanceImpl$SingleInstanceServer$2.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.deploy.si.SingleInstanceImpl$SingleInstanceServer.run(Unknown Source)

      "AWT-Windows" #13 daemon prio=6 os_prio=0 tid=0x000000001b4e7000 nid=0x123c runnable [0x000000001cc4f000]
         java.lang.Thread.State: RUNNABLE
      at sun.awt.windows.WToolkit.eventLoop(Native Method)
      at sun.awt.windows.WToolkit.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

      "Java2D Disposer" #11 daemon prio=10 os_prio=2 tid=0x000000001bbb2800 nid=0x2e48 in Object.wait() [0x000000001c9af000]
         java.lang.Thread.State: WAITING (on object monitor)
      at java.lang.Object.wait(Native Method)
      - waiting on <0x0000000781043aa0> (a java.lang.ref.ReferenceQueue$Lock)
      at java.lang.ref.ReferenceQueue.remove(Unknown Source)
      - locked <0x0000000781043aa0> (a java.lang.ref.ReferenceQueue$Lock)
      at java.lang.ref.ReferenceQueue.remove(Unknown Source)
      at sun.java2d.Disposer.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

      "traceMsgQueueThread" #10 daemon prio=5 os_prio=0 tid=0x000000001bbab000 nid=0x1b84 in Object.wait() [0x000000001c4ff000]
         java.lang.Thread.State: WAITING (on object monitor)
      at java.lang.Object.wait(Native Method)
      - waiting on <0x0000000781006898> (a java.util.ArrayList)
      at java.lang.Object.wait(Unknown Source)
      at com.sun.deploy.trace.Trace$TraceMsgQueueChecker.run(Unknown Source)
      - locked <0x0000000781006898> (a java.util.ArrayList)
      at java.lang.Thread.run(Unknown Source)

      "Service Thread" #9 daemon prio=9 os_prio=0 tid=0x000000001b174000 nid=0x1200 runnable [0x0000000000000000]
         java.lang.Thread.State: RUNNABLE

      "C1 CompilerThread2" #8 daemon prio=9 os_prio=2 tid=0x000000001b135800 nid=0x29a4 waiting on condition [0x0000000000000000]
         java.lang.Thread.State: RUNNABLE

      "C2 CompilerThread1" #7 daemon prio=9 os_prio=2 tid=0x000000001b0f4000 nid=0xa08 waiting on condition [0x0000000000000000]
         java.lang.Thread.State: RUNNABLE

      "C2 CompilerThread0" #6 daemon prio=9 os_prio=2 tid=0x0000000019956000 nid=0x2924 waiting on condition [0x0000000000000000]
         java.lang.Thread.State: RUNNABLE

      "Attach Listener" #5 daemon prio=5 os_prio=2 tid=0x0000000019954800 nid=0x2d34 waiting on condition [0x0000000000000000]
         java.lang.Thread.State: RUNNABLE

      "Signal Dispatcher" #4 daemon prio=9 os_prio=2 tid=0x0000000019951000 nid=0x1a14 runnable [0x0000000000000000]
         java.lang.Thread.State: RUNNABLE

      "Finalizer" #3 daemon prio=8 os_prio=1 tid=0x000000001993a000 nid=0x2cd4 in Object.wait() [0x000000001adfe000]
         java.lang.Thread.State: WAITING (on object monitor)
      at java.lang.Object.wait(Native Method)
      - waiting on <0x0000000780d08ec0> (a java.lang.ref.ReferenceQueue$Lock)
      at java.lang.ref.ReferenceQueue.remove(Unknown Source)
      - locked <0x0000000780d08ec0> (a java.lang.ref.ReferenceQueue$Lock)
      at java.lang.ref.ReferenceQueue.remove(Unknown Source)
      at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

      "Reference Handler" #2 daemon prio=10 os_prio=2 tid=0x00000000198f3000 nid=0x1aa0 in Object.wait() [0x000000001ac4e000]
         java.lang.Thread.State: WAITING (on object monitor)
      at java.lang.Object.wait(Native Method)
      - waiting on <0x0000000780d06b68> (a java.lang.ref.Reference$Lock)
      at java.lang.Object.wait(Unknown Source)
      at java.lang.ref.Reference.tryHandlePending(Unknown Source)
      - locked <0x0000000780d06b68> (a java.lang.ref.Reference$Lock)
      at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)

      "VM Thread" os_prio=2 tid=0x00000000198eb800 nid=0x28cc runnable

      "GC task thread#0 (ParallelGC)" os_prio=0 tid=0x000000000213d000 nid=0x2964 runnable

      "GC task thread#1 (ParallelGC)" os_prio=0 tid=0x000000000213e800 nid=0x2b70 runnable

      "GC task thread#2 (ParallelGC)" os_prio=0 tid=0x0000000002140000 nid=0x1d88 runnable

      "GC task thread#3 (ParallelGC)" os_prio=0 tid=0x0000000002141800 nid=0x948 runnable

      "VM Periodic Task Thread" os_prio=2 tid=0x000000001b182800 nid=0x185c waiting on condition

      JNI global references: 463

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Use java 1.8.0_152

        Attachments

          Activity

            People

            • Assignee:
              pardesha Pardeep Sharma
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: