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 213926 - Deadlock between PostEventQueue.noEvents, EventQueue.isDispatchThread and SwingUtilities.invokeLater
Summary: Deadlock between PostEventQueue.noEvents, EventQueue.isDispatchThread and Swi...
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: JDK Problems (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Antonin Nebuzelsky
URL:
Keywords:
: 210752 214436 214853 215683 215721 216500 217246 217404 217941 218326 218483 218678 220734 221007 221155 221387 221400 222673 223817 224266 224643 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-06-11 06:18 UTC by Erno Mononen
Modified: 2013-01-10 16:02 UTC (History)
25 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
thread dump (40.68 KB, text/plain)
2012-06-11 06:18 UTC, Erno Mononen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Erno Mononen 2012-06-11 06:18:43 UTC
Created attachment 120633 [details]
thread dump

7.2 beta, JDK 7

The IDE hanged while starting up, attaching a thread dump that shows the deadlock.
Comment 1 Petr Jiricka 2012-06-12 08:49:14 UTC
Martin, can you please investigate? Cc'ing also Petr H as he knows a lot about the copy-on-save support.
Comment 2 Martin Janicek 2012-06-12 09:25:29 UTC
From the thread dump it seems that the deadlock comes from AWT itself. "Indexer Cache" thread and the org.netbeans.modules.maven.j2ee.web.WebCopyOnSave call is present only because it's using SwingUtilities.isEventDispatchThread() which is trying to access blocked "AWT-EventQueue-1".

"AWT-EventQueue-1" is waiting for the lock help by "TimerQueue" and vice versa.. The weird thing is that the "AWT-EventQueue-1" log isn't complete and doesn't contain any information about locking something

Erno do you have a reproducible test case? And could you try to use another JVM? (based on PHejl and TMysik comments it's possible that the problem can be caused by a JVM specific issue)
Comment 3 Erno Mononen 2012-06-12 18:57:54 UTC
Unfortunately I can't reproduce this reliably - the IDE has hanged twice during the startup within two weeks, but I didn't take a thread dump the first time, so can't say for sure whether it was caused by the same issue. I had the same set of Maven projects (6 altogether) opened both times, but most of the time the IDE starts up fine with those projects open. I'll post another thread dump if this happens again and then try with JDK 6.
Comment 4 Martin Janicek 2012-06-14 08:13:12 UTC
Erno, since we are after code freeze I'm closing this one for now. Please, reopen it again once you'll find some other information (unfortunately can't do anything until then). Thanks!
Comment 5 Petr Jiricka 2012-06-14 08:35:40 UTC
> The weird thing is that the "AWT-EventQueue-1" log isn't complete

Right, this looks suspicious. Reassigning to JDK problems - Tondo do you know if we had a situation like this before?

Erno, which exact update release of JDK 7 are you using, please?
Comment 6 Antonin Nebuzelsky 2012-06-14 16:22:55 UTC
The following bug has been filed to Java:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7177040
Comment 7 Erno Mononen 2012-06-18 06:59:04 UTC
(In reply to comment #5)
> 
> Erno, which exact update release of JDK 7 are you using, please?

Here's the exact version info:

Product Version: NetBeans IDE 7.2 Beta (Build 201205031832)
Java: 1.7.0_04; Java HotSpot(TM) 64-Bit Server VM 23.0-b21
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)

FYI, I've been restarting the IDE a lot lately in an effort to reproduce this, but  this hasn't happened again.
Comment 8 Stanislav Aubrecht 2012-06-19 11:47:38 UTC
*** Bug 214436 has been marked as a duplicate of this bug. ***
Comment 9 Antonin Nebuzelsky 2012-07-12 10:39:43 UTC
*** Bug 214853 has been marked as a duplicate of this bug. ***
Comment 10 Antonin Nebuzelsky 2012-07-18 13:26:31 UTC
*** Bug 215683 has been marked as a duplicate of this bug. ***
Comment 11 Antonin Nebuzelsky 2012-07-20 14:35:32 UTC
*** Bug 215721 has been marked as a duplicate of this bug. ***
Comment 12 Antonin Nebuzelsky 2012-08-22 13:06:09 UTC
*** Bug 210752 has been marked as a duplicate of this bug. ***
Comment 13 Antonin Nebuzelsky 2012-08-22 13:10:18 UTC
JDK bug #7177040 should be fixed in the latest promoted build of 7u8.

If you are encountering regularly, try 7u8 b03 or newer.

http://jdk7.java.net/download.html
Comment 14 Antonin Nebuzelsky 2012-08-23 12:52:39 UTC
*** Bug 217246 has been marked as a duplicate of this bug. ***
Comment 15 Antonin Nebuzelsky 2012-09-10 10:41:58 UTC
*** Bug 217941 has been marked as a duplicate of this bug. ***
Comment 16 Antonin Nebuzelsky 2012-09-11 11:49:00 UTC
*** Bug 217404 has been marked as a duplicate of this bug. ***
Comment 17 Antonin Nebuzelsky 2012-09-14 12:51:53 UTC
*** Bug 218326 has been marked as a duplicate of this bug. ***
Comment 18 TomasKraus 2012-09-17 13:05:36 UTC
Saw again with
Product Version: NetBeans IDE Dev (Build 201209170001)
Java: 1.7.0_07; Java HotSpot(TM) 64-Bit Server VM 23.3-b01
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
in bug# 217873.
Comment 19 Antonin Nebuzelsky 2012-09-24 13:00:42 UTC
> Saw again with Java: 1.7.0_07

As noted above, this bug is fixed in promoted builds of JDK 7u10 (previously versioned as 7u8):

http://jdk7.java.net/download.html
Comment 20 Antonin Nebuzelsky 2012-09-24 13:01:02 UTC
*** Bug 218678 has been marked as a duplicate of this bug. ***
Comment 21 Antonin Nebuzelsky 2012-09-25 10:43:02 UTC
*** Bug 218483 has been marked as a duplicate of this bug. ***
Comment 22 Antonin Nebuzelsky 2012-10-04 11:49:25 UTC
*** Bug 216500 has been marked as a duplicate of this bug. ***
Comment 23 Tomas Hurka 2012-10-24 16:10:50 UTC
*** Bug 220734 has been marked as a duplicate of this bug. ***
Comment 24 Milos Kleint 2012-10-29 11:55:14 UTC
*** Bug 221007 has been marked as a duplicate of this bug. ***
Comment 25 Milos Kleint 2012-11-01 08:02:30 UTC
*** Bug 221155 has been marked as a duplicate of this bug. ***
Comment 26 Antonin Nebuzelsky 2012-11-04 22:51:49 UTC
*** Bug 221400 has been marked as a duplicate of this bug. ***
Comment 27 Jan Lahoda 2012-11-05 07:00:44 UTC
*** Bug 221387 has been marked as a duplicate of this bug. ***
Comment 28 Antonin Nebuzelsky 2012-11-26 10:40:43 UTC
*** Bug 222673 has been marked as a duplicate of this bug. ***
Comment 29 Antonin Nebuzelsky 2012-12-17 14:18:31 UTC
*** Bug 223817 has been marked as a duplicate of this bug. ***
Comment 30 Antonin Nebuzelsky 2012-12-17 14:19:57 UTC
JDK 7u10 fixing the deadlock has been released as final last week.

http://www.oracle.com/technetwork/java/javase/downloads/index.html
Comment 31 Petr Cyhelsky 2013-01-07 07:35:43 UTC
*** Bug 224266 has been marked as a duplicate of this bug. ***
Comment 32 Antonin Nebuzelsky 2013-01-10 16:02:03 UTC
*** Bug 224643 has been marked as a duplicate of this bug. ***