JDK-7108598 : Pogo Table Games freeze with JDK 7
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp,windows_7
  • CPU: x86
  • Submitted: 2011-11-04
  • Updated: 2013-07-09
  • Resolved: 2011-12-14
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
7u2Fixed 8 b17Fixed
Description
J2SE Version (please include all output from java -version flag):
JDK 7

Does this problem occur on J2SE 1.4.x, 1.5 or 6?  Yes / No (pick one)
No

Operating System Configuration Information (be specific):
Windows 


Bug Description:

Pogo table games freeze with JRE 1.7.0. Works fine with all previous JDK 6 update releases.


Step to reproduce:

check comment field for acct/pwd information

1) Go to www.pogo.com, sign in with Pogo account.

2) Go to www.pogo.com/games/battleship.

3) Select and Click on any one of Free Game Rooms, such as "Book" game

4) Click on ���Play��� button on Choose a table page; 
   note that game freeze happens, Java console does.

Excepted result: BATTLESHIP game launches normally after clicking ���Play��� button.

www.pogo.com freeze Java debug console log are attached.

Comments
Verified in 7u2!
11-06-2013

SUGGESTED FIX http://cr.openjdk.java.net/~denis/7108598/webrev.00/
17-11-2011

EVALUATION The place mentioned above is exactly the reason. But the lines couldn't just be returned back. We should substitute synchronized(this) with synchronized(getObjectLock()) for all blocks with printing related code in Container.java.
11-11-2011

EVALUATION From the dump stack , found the dead lock mainly happens between 2 classes: java.awt.Container and java.awt.KeyboardFocusManager. compared 2 versions: jdk1.6.0_29 and Jdk1.7.0_01 for JDK source code in java.awt.Container and found following differences located in the place where the dead lock happens: JDK 1.6.0_29: public void paint(Graphics g) { if (isShowing()) { if (printing) { <---------- removed from JDK 7 synchronized (this) { if (printing) { if (printingThreads.contains(Thread.currentThread())) { return; } } } } JDK 1.7.0_01: public void paint(Graphics g) { if (isShowing()) { synchronized (this) { if (printing) { <------- if (printingThreads.contains(Thread.currentThread())) { return; } } } Please check the line of code marked arrow dash and you could see that in JDK1.7.0_01, this line has been removed. It seems removing this line can cause deadlock?
07-11-2011

EVALUATION tested 6u29 + fx2u1(uses 7u1 plugin), and applet works fine. so problem is probably not caused by java plugin.
05-11-2011

EVALUATION Found one Java-level deadlock: ============================= "TickTimer": waiting to lock monitor 0x05a3352c (object 0x2e4d36a0, a java.awt.Component$AWTTreeLock), which is held by "InvalQueue-com.pogo.ui2.awt.ac[ClientApplet-GamePanel,0,0,538x354]-ClientApplet-GamePanel" "InvalQueue-com.pogo.ui2.awt.ac[ClientApplet-GamePanel,0,0,538x354]-ClientApplet-GamePanel": waiting to lock monitor 0x018a2c4c (object 0x2ea72eb8, a com.pogo.ui2.awt.v), which is held by "AWT-EventQueue-4" "AWT-EventQueue-4": waiting to lock monitor 0x05a3352c (object 0x2e4d36a0, a java.awt.Component$AWTTreeLock), which is held by "InvalQueue-com.pogo.ui2.awt.ac[ClientApplet-GamePanel,0,0,538x354]-ClientApplet-GamePanel" Java stack information for the threads listed above: =================================================== "TickTimer": at com.pogo.ui2.awt.ac.a(SourceFile:228) - waiting to lock <0x2e4d36a0> (a java.awt.Component$AWTTreeLock) at com.pogo.game.client2.m.N(SourceFile:552) at com.pogo.game.client2.ah.actionPerformed(SourceFile:2005) at com.pogo.ui2.awt.ab.a(SourceFile:653) at com.pogo.ui2.awt.anim.d.actionPerformed(SourceFile:63) at com.pogo.ui2.awt.ab.a(SourceFile:653) at com.pogo.ui2.awt.t.run(SourceFile:99) at java.lang.Thread.run(Unknown Source) "InvalQueue-com.pogo.ui2.awt.ac[ClientApplet-GamePanel,0,0,538x354]-ClientApplet-GamePanel": at java.awt.Container.paint(Unknown Source) - waiting to lock <0x2ea72eb8> (a com.pogo.ui2.awt.v) at com.pogo.ui2.awt.ab.paint(SourceFile:415) at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source) at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source) at sun.awt.SunGraphicsCallback.runComponents(Unknown Source) at java.awt.Container.paint(Unknown Source) at com.pogo.ui2.awt.ab.paint(SourceFile:415) at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source) at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source) at sun.awt.SunGraphicsCallback.runComponents(Unknown Source) at java.awt.Container.paint(Unknown Source) at com.pogo.ui2.awt.ab.paint(SourceFile:415) at com.pogo.game.client2.table.g.paint(SourceFile:1255) at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source) at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source) at sun.awt.SunGraphicsCallback.runComponents(Unknown Source) at java.awt.Container.paint(Unknown Source) at com.pogo.ui2.awt.ab.paint(SourceFile:415) at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source) at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source) at sun.awt.SunGraphicsCallback.runComponents(Unknown Source) at java.awt.Container.paint(Unknown Source) at com.pogo.ui2.awt.ac.a(SourceFile:301) - locked <0x2e4d36a0> (a java.awt.Component$AWTTreeLock) at com.pogo.ui2.awt.e.run(SourceFile:145) at java.lang.Thread.run(Unknown Source) "AWT-EventQueue-4": at java.awt.KeyboardFocusManager.clearMostRecentFocusOwner(Unknown Source) - waiting to lock <0x2e4d36a0> (a java.awt.Component$AWTTreeLock) at java.awt.Component.disable(Unknown Source) at java.awt.Component.enable(Unknown Source) at java.awt.Component.setEnabled(Unknown Source) at com.pogo.ui2.awt.f.setEnabled(SourceFile:264) at com.pogo.game.client2.table.g.actionPerformed(SourceFile:1051) - locked <0x2ea72eb8> (a com.pogo.ui2.awt.v) at com.pogo.ui2.awt.ab.a(SourceFile:653) at com.pogo.ui2.awt.f.mouseReleased(SourceFile:219) at java.awt.Component.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$000(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Found 1 deadlock.
05-11-2011

EVALUATION I can reproduce the problem on my win7 system with 7u1. attached jstack output of applet jvm and browser jvm. we have deadlock in applet jvm - seems like related to awt/focus issue ? assigning to awt to take a look.
05-11-2011