United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6857363 deadlock caused by sun.awt.X11.XTrayIconPeer$Tooltip.display
JDK-6857363 : deadlock caused by sun.awt.X11.XTrayIconPeer$Tooltip.display

Details
Type:
Bug
Submit Date:
2009-07-03
Status:
Resolved
Updated Date:
2011-01-19
Project Name:
JDK
Resolved Date:
2010-02-16
Component:
client-libs
OS:
linux
Sub-Component:
java.awt
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Relates:

Sub Tasks

Description
The problem reported in the SDN comments for 6280857

-------------------------------------------------------------------
Comment added by mmikucionis : 
here is the stacktrace of AW-XAWT thread:

"AWT-XAWT":
	at java.awt.Component.invalidate(Component.java:2768)
	- waiting to lock <0x75c85c78> (a java.awt.Component$AWTTreeLock)
	at java.awt.Component.invalidateIfValid(Component.java:2788)
	at java.awt.Label.setText(Label.java:244)
	at sun.awt.X11.XTrayIconPeer$Tooltip.display(XTrayIconPeer.java:677)
	at sun.awt.X11.XTrayIconPeer$Tooltip$1.run(XTrayIconPeer.java:603)
	at sun.awt.X11.XToolkit.callTimeoutTasks(XToolkit.java:1563)
	at sun.awt.X11.XToolkit.run(XToolkit.java:547)
	at sun.awt.X11.XToolkit.run(XToolkit.java:523)
	at java.lang.Thread.run(Thread.java:619)

Found 1 deadlock.

Comment added by mmikucionis(###@###.###) : 
It seems that the fix is not good enough. I use JDK 1.6.0_14 and get deadlock when Label.setText is involved, i.e. the code at sun.awt.X11.XTrayIconPeer$Tooltip.display(XTrayIconPeer.java:677) should also be executed on EDT to avoid deadlock.
---------------------------------------------------------------------------------

                                    

Comments
SUGGESTED FIX

http://sa.sfbay.sun.com/projects/awt_data/7/6857363/
                                     
2009-12-28
EVALUATION

The fix is to avoid calling Label.setText on the toolkit thread.
                                     
2009-12-28



Hardware and Software, Engineered to Work Together