JDK-7187752 : Deadlock between TimerQueue and AWT-EventQueue-0
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2012-07-30
  • Updated: 2012-11-29
  • Resolved: 2012-08-22
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 8
8Resolved
Related Reports
Duplicate :  
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Linux 2.6.37.6-0.20-desktop #1 SMP PREEMPT 2011-12-19 23:39:38 +0100 x86_64 x86_64 x86_64 GNU/Linux

EXTRA RELEVANT SYSTEM CONFIGURATION :
The problem occurs on different computers with different Linux 64bit operating systems.

A DESCRIPTION OF THE PROBLEM :
Our application is based on the Netbeans platform (version 7.2). From time to time we have a deadlock while starting the application. The GUI appears but does not react to input and is not refreshed.

REGRESSION.  Last worked in version 6u31

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Unfortunately I'm not able to provide a simple example to reproduce the problem.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The application should not deadlock.
ACTUAL -
Sometimes the application deadlocks.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
When sending the signal 3 to the locked JVM the following message is printed:

Found one Java-level deadlock:
=============================
"TimerQueue":
   waiting for ownable synchronizer 0x00000000bc003f48, (a java.util.concurrent.locks.ReentrantLock$NonfairSync),
   which is held by "AWT-EventQueue-0"
"AWT-EventQueue-0":
   waiting to lock monitor 0x00007fb3519664a0 (object 0x00000000bc006280, a sun.awt.PostEventQueue),
   which is held by "TimerQueue"

Java stack information for the threads listed above:
===================================================
"TimerQueue":
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x00000000bc003f48> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:867)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1197)
	at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:214)
	at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:290)
	at java.awt.EventQueue.postEventPrivate(EventQueue.java:235)
	at java.awt.EventQueue.postEvent(EventQueue.java:221)
	at sun.awt.PostEventQueue.flush(SunToolkit.java:2116)
	- locked <0x00000000bc006280> (a sun.awt.PostEventQueue)
	at sun.awt.SunToolkit.flushPendingEvents(SunToolkit.java:563)
	at java.awt.EventQueue.postEvent(EventQueue.java:220)
	at java.awt.EventQueue.invokeLater(EventQueue.java:1188)
	at javax.swing.SwingUtilities.invokeLater(SwingUtilities.java:1287)
	at javax.swing.Timer$1.run(Timer.java:613)
	at javax.swing.Timer$1.run(Timer.java:611)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.swing.Timer.post(Timer.java:611)
	at javax.swing.TimerQueue.run(TimerQueue.java:181)
	at java.lang.Thread.run(Thread.java:722)
"AWT-EventQueue-0":
	at sun.awt.PostEventQueue.noEvents(SunToolkit.java:2104)
	- waiting to lock <0x00000000bc006280> (a sun.awt.PostEventQueue)
	at sun.awt.SunToolkit.isPostEventQueueEmpty(SunToolkit.java:577)
	at java.awt.EventQueue.detachDispatchThread(EventQueue.java:1048)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:103)

Found 1 deadlock.

REPRODUCIBILITY :
This bug can be reproduced occasionally.