I am running Java 6 on a Linux machine (RHEL 5) and my program occasionally locks up the input to the computer. No mouse clicks or keyboard strokes work. Oddly enough, the mouse cursor can be moved and the CTRL+ALT+F2 command works (although it doesn’t bring up a terminal).
Using top and jvisualvm I see no memory leaks or other issues with the process. However, the only way to unfreeze the computer is to ssh from another computer and kill the java process. What could possibly be the cause of this behavior?
I can reproduce it occasionally by lowering the memory ceiling. It seems like deadlock might be here:
"Java2D Disposer" daemon prio=10 tid=0xae7d6800 nid=0x4451 in Object.wait() [0xae6ad000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xb3253070> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <0xb3253070> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
at sun.java2d.Disposer.run(Disposer.java:127)
at java.lang.Thread.run(Thread.java:662)
The symptoms that you describe seem to me as an unreleased X11 keyboard&pointer grab. This can easily be caused by buggy or unresponsive GUI -> X11 layer. Check your GUI thread carefully.