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 - Deadlock in tests execution.
Summary: Deadlock in tests execution.
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: JDK Problems (show other bugs)
Version: 8.0
Hardware: PC Linux
: P1 normal (vote)
Assignee: Antonin Nebuzelsky
URL: http://deadlock.netbeans.org/job/NB-C...
Keywords: TEST
Depends on:
Blocks:
 
Reported: 2013-11-25 17:14 UTC by Martin Entlicher
Modified: 2015-11-26 16:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Full thread dump. (36.44 KB, text/plain)
2013-11-25 17:14 UTC, Martin Entlicher
Details

Note You need to log in before you can comment on or make changes to this bug.
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.