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

custom non-parallel classloader deadlock, when kerberos authentication is used

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      other

      Description

      FULL PRODUCT VERSION :


      ADDITIONAL OS VERSION INFORMATION :
      Any OS.

      A DESCRIPTION OF THE PROBLEM :
      As result of http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8032832 we have several deadlocks — https://youtrack.jetbrains.com/issue/IDEA-132532, https://youtrack.jetbrains.com/issue/IDEA-131621

      Problem: Custom class loader is not parallel, but NegotiateAuthentication locks class loader.

      REGRESSION. Last worked in version 8u5

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1) Clone https://github.com/develar/__test-proxy.git
      2) Open project in IDEA (or another IDE).
      3) Run TestProxy run configuration (or TestProxy class if you don't use IDEA).

      You need to use proxy server with Kerberos authentication (Proxy-Authenticate: Kerberos). To simplify I implemented small test proxy just to reproduce the bug.

      4) Run Client run configuration.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      No deadlock.
      ACTUAL -
      "AWT-EventQueue-0@1097" prio=6 tid=0xf nid=NA waiting for monitor entry
        java.lang.Thread.State: BLOCKED
      waiting for main@1 to release lock on <0x4bf> (a org.jetbrains.testProxy.Client$1)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:406)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at org.jetbrains.testProxy.Client$2$1.run(Client.java:26)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
      at java.awt.EventQueue.access$400(EventQueue.java:97)
      at java.awt.EventQueue$3.run(EventQueue.java:697)
      at java.awt.EventQueue$3.run(EventQueue.java:691)
      at java.security.AccessController.doPrivileged(AccessController.java:-1)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:714)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Set thread context loader to fake class loader (see https://github.com/JetBrains/intellij-community/commit/16f81a97df32444689811cba068aafb3e4b02d70#diff-ffd6472c4e25ed3a15cb659209821f13R73).

      Or implement parallel custom classloader. It is not real option because it is dangerous change.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bchristi Brent Christian
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: