United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7143070 test/java/awt/print/PaintSetEnabledDeadlock/PaintSetEnabledDeadlock.java freezes on exit
7143070 : test/java/awt/print/PaintSetEnabledDeadlock/PaintSetEnabledDeadlock.java freezes on exit

Details
Type:
Bug
Submit Date:
2012-02-06
Status:
Closed
Updated Date:
2012-03-05
Project Name:
JDK
Resolved Date:
2012-03-05
Component:
other-libs
OS:
windows_7
Sub-Component:
other
CPU:
x86
Priority:
P5
Resolution:
Fixed
Affected Versions:
7u4
Fixed Versions:
7u4

Related Reports
Backport:
Relates:

Sub Tasks

Description
Method TestPanel.stop() stops secondary thread and waits for the moment it is finished using Thread.wait():

    public void stop() {
        active = false;
        try {
            synchronized (sync) {
                sync.notify();
            }
            synchronized (thread) {
                thread.wait();
            }
        } catch (InterruptedException ex) {
        }
    }

Usually system 'notify' occurs for that wait() and the test exits normally, but on some machines (i.e. stt-96-vmw5) it doesn't happen and the test gets frozen.
To resolve this issue 'waiting' code should be rewritten to guarantee the notification of thread's finishing.

                                    

Comments
SUGGESTED FIX

http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/rev/a2377cb4f790
                                     
2012-02-13
EVALUATION

use Thread.join() to wait until the secondary thread finishes
                                     
2012-02-06



Hardware and Software, Engineered to Work Together