Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6784816
Votes 8
Synopsis Remove AWT tree lock from Container methods: getComponent, getComponents, getComponentCount
Category java:classes_awt
Reported Against b15
Release Fixed 7(b55), 6u12(b04) (Bug ID:2170881)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs 6616323 , 6801647
Submit Date 12-DEC-2008
Description
The fix for 6616323 adds synchronization on AWT tree lock to several methods in Container class (probably, in Component as well). AWT tree lock is a public lock that should be used for any hiearchy or layout operations *by developers*, not by AWT. That's why internal synchronization must be removed, and a warning about calling these methods without tree lock should be added.
Posted Date : 2008-12-12 23:20:59.0
Work Around
N/A
Evaluation
Shouldn't take the tree lock when doing some operations w/ children.
Posted Date : 2008-12-29 10:13:33.0

Historically, we didn't get AWT tree lock in these three methods:
    - Container.getComponent(index)
    - Container.getComponents()
    - Container.countComponents()
There are some applications (like Oracle Forms based), that rely on this behavior and face deadlocks after the fix for 6616323. Technically, these applications are incorrect, as JavaDoc for AWT tree lock explicitly says it should be used for component-tree and layout operations, so AWT expects these methods should be synchronized by developers.

The fix for this bug is to revert the old (pre-6u10) behavior and remove newly added synchronization from the methods mentioned above. Still, all the applications that call them without AWT tree lock must realize that they do this on their own risk. For example, due to some timings changes, the methods may return incorrect values without proper synchronization under AWT tree lock.
Posted Date : 2009-01-13 16:06:48.0
Comments
  
  Include a link with my name & email   

Submitted On 15-DEC-2008
JacobDK
Please fix this for 6u12. You currently have deadlocks in Oracle Forms application because of this AWTTreeLock, and according to Oracle Development, Sun must fix this in the JDK. 

See http://forums.java.net/jive/thread.jspa?messageID=318793 for details.

A project of ours currently can't be deployed correctly on Windows Vista, because we can't upgrade to 6u10+ due to this problem.


Submitted On 15-DEC-2008
Mutantpenguin
I would love to see a fix for this too.

Because of the Bug described here http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6532730 we have to atleast use Java 1.6 Update 10 which crashes our Oracle Forms application.

I can provide some stacktraces from JConsole when needed to further investigate this.


Submitted On 15-DEC-2008
w1zard
Would be very nice, yes. As some of our users had autoupdate of JRE on, they got jre 1.6.0_10 installed "by accident", and the forms application simply quit working. And it's rather difficult to tell all of our users not to get the newest jre, and fix the problem every time they forgot to disable autoupdate...



Submitted On 16-DEC-2008
Could you please increase the priority of this bug? We've been long waiting for the release of 1.6.0_10 to support Windows Vista. We develop and distribute a large Oracle Forms application (i.e. applet based) and need the new plugin architecture for Vista support. We've logged several bugs and service requests with Oracle around these issues. However, the JRE issues need to be fixed by Sun.


Submitted On 29-DEC-2008
MichaelCox
Please increase the priority of this Bug.  We also develop an Oracle Forms application and require this Bug to be fixed in order to certify our product for Vista.  This is causing our projects major delays.


Submitted On 02-JAN-2009
JacobDK
If you are using Oracle Forms and can't upgrade to the new plugin, please post a response to my thread at the java.net forum:

http://forums.java.net/jive/thread.jspa?threadID=55377&tstart=0

and describe why a fix to this problem is urgent in relation to your Forms application.


Submitted On 06-JAN-2009
Please fix this bug. java auto-update and security fixes are forcing customers to upgrade to 1.6 and then our forms application does not work. This is critical. 


Submitted On 14-JAN-2009
MichaelCox
Please provide us with a release date for this fix.  A lot of companies have products dependent upon your technology and we need to give our clients status updates.  A release date would help us mitigate our clients concerns.


Submitted On 22-JAN-2009
JacobDK
I can confirm, that this will be fixed in 6u12. See the following "link bug" for verification:

http://bugs.sun.com/view_bug.do?bug_id=2170881

For yet more verification, see this java.net thread:

http://forums.java.net/jive/thread.jspa?threadID=56332

Please verify, that 6u12 fix your issue related to this bug, and report either here or on java.net forum, if you find any problems.



PLEASE NOTE: JDK6 is formerly known as Project Mustang