This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 238790

Summary: Deadlock in tests execution.
Product: platform Reporter: Martin Entlicher <mentlicher>
Component: JDK ProblemsAssignee: Antonin Nebuzelsky <anebuzelsky>
Status: RESOLVED WONTFIX    
Severity: normal CC: jrechtacek
Priority: P1 Keywords: TEST
Version: 8.0   
Hardware: PC   
OS: Linux   
URL: http://deadlock.netbeans.org/job/NB-Core-Build/834/testReport/org.netbeans.modules.maven/ProjectOpenedHookImplTest/testGeneratedSources/
Issue Type: DEFECT Exception Reporter:
Attachments: Full thread dump.

Description Martin Entlicher 2013-11-25 17:14:46 UTC
Created attachment 142559 [details]
Full thread dump.

See http://deadlock.netbeans.org/job/NB-Core-Build/834/testReport/org.netbeans.modules.maven/ProjectOpenedHookImplTest/testGeneratedSources/

This is a deadlock:

In Thread Test Watch Dog: testGeneratedSources:
  sun.awt.SunToolkit.initEQ(SunToolkit.java:115) is calling Class.forName("java.awt.EventQueue");
  while it holds a lock from PlatformLogger.getLogger()
and in Thread RequestProcessor queue manager:
  we're in Class.forName("java.awt.EventQueue") which calls
  sun.util.logging.PlatformLogger.getLogger(PlatformLogger.java:196)

Since RequestProcessor access Java private classes, IMHO the source of the problems is there.
Comment 1 Martin Entlicher 2013-11-25 17:20:13 UTC
Maybe it would help if the sun.awt.AppContext code is executed in EQ?
Comment 2 Martin Entlicher 2013-11-25 17:24:46 UTC
Maybe the issue is solved in JDK 8 by http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/b3d6953b9829 ?
Comment 3 Jaroslav Tulach 2013-11-26 13:19:00 UTC
Deadlock in JDK is a JDK problem I think.
Comment 4 Antonin Nebuzelsky 2013-12-16 12:06:21 UTC
(In reply to Martin Entlicher from comment #2)
> Maybe the issue is solved in JDK 8 by
> http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/b3d6953b9829 ?

Martine, are we sure that change fixes the problem for us?

The change is scheduled for backport into 7u60, so I'd like to add a note there that NetBeans encourages the backport.
Comment 5 Antonin Nebuzelsky 2013-12-16 12:10:42 UTC
https://bugs.openjdk.java.net/browse/JDK-8019853
Comment 6 Martin Entlicher 2013-12-16 12:40:52 UTC
The change in JDK 8 definitely modifies the code that is involved in the deadlock and should assure that this particular deadlock will not occur any more.
Comment 7 Martin Entlicher 2015-11-26 16:20:31 UTC
The build seems to use jdk1.7.0_45.
According to https://bugs.openjdk.java.net/browse/JDK-8019853 it's fixed already in more recent JDK 7 and in JDK 8.
This bug should not occur after we change the NB builder to use JDK 8.