JDK-6722502 : HTTP Login hang in browser (deadlock)
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 6u10
  • Priority: P3
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2008-07-03
  • Updated: 2010-04-26
  • Resolved: 2009-02-03
Related Reports
Relates :  
Description
J2SE Version (please include all output from java -version flag):
6u10 build25

Does this problem occur on J2SE 1.4.x or 5.0.x or 6.0?  Yes / No (pick one)
Yes, it might related to bug#6648001.


Operating System Configuration Information (be specific):
win_xp

Bug Description:

If an Applet in Firefox access an secure http page (with basic authentication) 
and then the login box is cancel then all follow login boxes will not display. 
There is a deadlock. This is relateded to the bug http://bugs.sun.com/view_bug.do?bug_id=6648001
 
The stacktrace is:

Thread [Thread-0] (Suspended)

Object.wait(long) line: not available [native method]����

HashMap<K,V>(Object).wait() line: 485

AuthenticationInfo.requestIsInProgress(String) line: 117

AuthenticationInfo.getServerAuth(URL, String, char) line: 258
HttpURLConnection.getServerAuthentication(AuthenticationHeader) line: 1640
HttpURLConnection.getInputStream() line: 1087
URL.openStream() line: 1009
TestCancelAuth$1.run() line: 21
Thread.run() line: 619

The problem is that the log is not removed if the login dialog is cancel. 
The only workaround is to close all firefox instances and plugin windows
and restart it. This is very bad.

Wroite a simple test case that show the problem in a command line java program 
which make it easer to debug it.

Comments
EVALUATION This issue is no longer reproducible with the latest 6u10 build. This is most likely because of the fix for 6648001, and subsequently CR 6693244, were fixed in 6u10 bXX. *** (#1 of 1): [ UNSAVED ] ###@###.###
03-02-2009