JDK-7143070 : test/java/awt/print/PaintSetEnabledDeadlock/PaintSetEnabledDeadlock.java freezes on exit
  • Type: Bug
  • Component: other-libs
  • Sub-Component: other
  • Affected Version: 7u4
  • Priority: P5
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_7
  • CPU: x86
  • Submitted: 2012-02-06
  • Updated: 2012-03-05
  • Resolved: 2012-03-05
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 7 JDK 8
7u4 b13Fixed 8Fixed
Related Reports
Relates :  
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
13-02-2012

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