JDK-4804511 : AWT app hangs if another AWT app already running under SYSTEM account.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2003-01-16
  • Updated: 2003-02-10
  • Resolved: 2003-02-10
Related Reports
Duplicate :  
Description

Name: rmT116609			Date: 01/16/2003


FULL PRODUCT VERSION :
>java -version
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)

FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195]
Service Pack 2

EXTRA RELEVANT SYSTEM CONFIGURATION :
Open a command window under the System account using the AT
command:
  AT 16:45 /interactive cmd.exe
where 16:45 is a time more than 1 minute from the current
time.

A DESCRIPTION OF THE PROBLEM :
Start a java app that opens a window, using the System
account.
Start another using another account.
The 2nd app hangs trying to paint the window.

Start them in the other order, everything works ok.

  To start the app under the system account, use the AT
command to start cmd.exe, then start the app from that
command window.  (Or exec the app from a windows service
that is running under the System account.)

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1.Create a command window under system account:
   AT 16:45 /interactive cmd.exe

2.Using that command window, start a java app that opens a
window:
  java java -jar c:\j2sdk1.4.1_01
\demo\jfc\FileChooserDemo\FileChooserDemo.jar


I see a similar hand with a slightly different trace when
using the arlier version:
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build
1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
3.Using a different command window running under another
account, start the same app.

EXPECTED VERSUS ACTUAL BEHAVIOR :
If the app running under the System account starts first,
the apps running under the normal accounts cannot paint the
window.

If the app running under the normal account starts first,
subsequent apps running under any account work ok.

The problem also arises if you have a windows service that
runs under the System account, and the service exec's a
java application.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Here is a Ctrl-Break trace of the hung app:
 

>java -jar c:\j2sdk1.4.1_01\demo\jfc\FileChooserDemo\FileChoo
serDemo.jar
Full thread dump Java HotSpot(TM) Client VM (1.4.1_01-b01 mixed mode):

"Java2D Disposer" daemon prio=10 tid=0x0ADD3E70 nid=0x5fc in Object.wait() [b9bf
000..b9bfd8c]
        at java.lang.Object.wait(Native Method)
        - waiting on <02A10220> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
        - locked <02A10220> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
        at sun.java2d.Disposer.run(Disposer.java:97)
        at java.lang.Thread.run(Thread.java:536)

"AWT-EventQueue-0" prio=7 tid=0x0ACF0A80 nid=0x558 runnable [b87f000..b87fd8c]
        at sun.awt.windows.Win32SurfaceData.initOps(Native Method)
        at sun.awt.windows.Win32SurfaceData.<init>(Win32SurfaceData.java:432)
        at sun.awt.windows.Win32SurfaceData.createData(Win32SurfaceData.java:311
)
        at sun.awt.windows.WComponentPeer.replaceSurfaceData(WComponentPeer.java
:320)
        - locked <02A0F3E8> (a sun.awt.windows.WFramePeer)
        - locked <02EF5240> (a java.awt.Component$AWTTreeLock)
        at sun.awt.windows.WComponentPeer$2.run(WComponentPeer.java:333)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:197)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)

        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)

        at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

"AWT-Shutdown" prio=5 tid=0x0ACEBC48 nid=0x620 in Object.wait() [b83f000..b83fd8
c]
        at java.lang.Object.wait(Native Method)
        - waiting on <02F241D8> (a java.lang.Object)
        at java.lang.Object.wait(Object.java:426)
        at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
        - locked <02F241D8> (a java.lang.Object)
        at java.lang.Thread.run(Thread.java:536)

"AWT-Windows" daemon prio=7 tid=0x0ACEC178 nid=0x480 runnable [aecf000..aecfd8c]

        at sun.awt.windows.WToolkit.eventLoop(Native Method)
        at sun.awt.windows.WToolkit.run(WToolkit.java:253)
        at java.lang.Thread.run(Thread.java:536)

"Signal Dispatcher" daemon prio=10 tid=0x008B5070 nid=0x528 waiting on condition
 [0..0]

"Finalizer" daemon prio=9 tid=0x008FF1E8 nid=0x3d4 in Object.wait() [ab4f000..ab
4fd8c]
        at java.lang.Object.wait(Native Method)
        - waiting on <02EF4E88> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
        - locked <02EF4E88> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0x008FDD60 nid=0x474 in Object.wait() [ab
0f000..ab0fd8c]
        at java.lang.Object.wait(Native Method)
        - waiting on <02EF4EF0> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Object.java:426)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:113)
        - locked <02EF4EF0> (a java.lang.ref.Reference$Lock)

"main" prio=5 tid=0x002352A8 nid=0x3a0 waiting for monitor entry [6f000..6fc44]
        at java.awt.Container.preferredSize(Container.java:1175)
        - waiting to lock <02EF5240> (a java.awt.Component$AWTTreeLock)
        at java.awt.Container.getPreferredSize(Container.java:1159)
        at java.awt.Window.pack(Window.java:430)
        at FileChooserDemo.main(FileChooserDemo.java:602)

"VM Thread" prio=5 tid=0x008FCB28 nid=0x1d8 runnable

"VM Periodic Task Thread" prio=10 tid=0x008B34F8 nid=0x2b8 waiting on condition

"Suspend Checker Thread" prio=10 tid=0x008B4688 nid=0x62c runnable

>

REPRODUCIBILITY :
This bug can be reproduced always.
(Review ID: 167067) 
======================================================================

Comments
EVALUATION Sounds exactly like 4455041. Probably a duplicate. ###@###.### 2003-01-16 Contacted the submitter to try and confirm if the 4455041 also fixes his probem. ###@###.### 2003-01-23 The submitter confirmed that the 4455041 fix also avoids this bug, so this is a duplicate. ###@###.### 2003-02-10
23-01-2003