JDK-8068184 : Fix for JDK-8032832 caused a deadlock
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 8u25,8u60
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2014-12-23
  • Updated: 2020-06-01
  • Resolved: 2019-11-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 14 JDK 7 JDK 8 Other
11.0.7-oracleFixed 13.0.3Fixed 14 b25Fixed 7u261Fixed 8u251Fixed openjdk8u252Fixed
Related Reports
Relates :  
Description
Additional classloader synchronization introduced with JDK-8032832 caused a new deadlock in NetBeans.

Related NetBeans bug:
https://netbeans.org/bugzilla/show_bug.cgi?id=248308#c5
Comments
Fix Request (13u) I would like to downport this for parity with 11. Applies clean.
26-03-2020

Fix Request (8u): Please approve backporting this to jdk8u/jdk8u-dev for Oracle JDK feature parity. The patch applies as-is after path unshuffeling. Fails reproducer before. Passes after.
25-02-2020

Fix Request (11u) I would like to downport this for parity with 11.0.7-oracle. Applies clean.
25-11-2019

A compatible with JDK 7 version of the test case was attached to the bug record as the file "JDKBug8068184ExampleForJDK7.zip". It is the original test case, but with all lambda expressions substituted for corresponding anonymous classes in order to let it be compiled and executed by JDK 7.
22-11-2019

URL: https://hg.openjdk.java.net/jdk/jdk/rev/7a3218ad8e7c User: alitvinov Date: 2019-11-21 17:05:41 +0000
21-11-2019

Review thread: https://mail.openjdk.java.net/pipermail/net-dev/2019-November/013325.html
21-11-2019

The attached test case "JDKBug8068184Example.zip" allows to reproduce the bug with JDK 14 compiled with the latest source code in "http://hg.openjdk.java.net/jdk/jdk" repository. Confirm that this bug is a regression of the fix for JDK-8032832. This bug shows that locking on "java.lang.ClassLoader" objects is bad and error prone practice. The fix for the bug JDK-8032832 was addressing Java Plug-in specific deadlock. Support for Java Plug-in ended in March 2019. The only correct way to resolve this bug is to revert changes introduced by that fix.
21-11-2019

Attaching a standalone example to show the problem. Based on examples by phansson from various linked bugs.
31-10-2017

Chris, Anton, can the deadlock be fixed for the nearest JDK 8 update?
20-08-2015

Assigning to Anton, as he worked on JDK-8032832.
23-12-2014

Threaddump
23-12-2014