JDK-6619480 : Modality-related livelock
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u5
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • CPU: generic
  • Submitted: 2007-10-20
  • Updated: 2010-09-08
  • Resolved: 2008-06-16
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.
6u10 b11Fixed
Related Reports
Relates :  
Relates :  
The simple ModalityTest written for 6605191 is exhibiting livelock at least on IE 7 when we force a reload of the applet while the modal dialog is open. Likely we are leaving a nested message pump running on the browser's main thread due to the premature termination of the applet.

SUGGESTED FIX http://sa.sfbay.sun.com/projects/deployment_data/6u10/6619480.0 testcase: http://j2se.east.sun.com/deployment/www/tests/1.6.0_10/6619480/

EVALUATION There were a few related problems in this bug. The first and most major was that during the message loop in WindowsHelper.c, the event object being used might be destroyed during processing of one of the messages, and if this happened, the previous code would go into an infinite loop due to an incorrect termination condition. This was probably the cause of other mysterious problems in this code seen earlier. Fixed this and simplified the message loop to re-check the event object after each message dispatched. The ModalitySupport class needed to re-notify the browser's main thread after consuming one notification, to properly unwind the stack if multiple message loops were running on the stack. Similar code exists in for example AbstractPlugin.doJavaObjectOp(). A couple of additional error checks were also added to the WindowsEvent and WindowsHelper classes. The preexisting test case in the workspace was enhanced and brought in sync with the regression test for this bug.