JDK-6207824 : JNDI sending premature ABANDON after connection has closed
  • Type: Bug
  • Component: core-libs
  • Sub-Component: javax.naming
  • Affected Version: 1.4.2_06
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-12-13
  • Updated: 2010-04-02
  • Resolved: 2005-10-08
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.
Other Other JDK 6
1.3.1_16Fixed 1.4.2_09Fixed 6 betaFixed
Related Reports
Relates :  
Description
Cu is running Java 1.4.2_xx and is having problems with JNDI connecting to Directory Proxy for certain authentication requests. I have reproduced this problem on Windows and Solaris with Sun 1.4.2 VM and OS X with Apple 1.4.2 VM.

We have a testcase and it is available at:

http://lonestar.red.iplanet.com/~maraja/images/cases/testGPLDLogin.java

javax.naming.CommunicationException: Request: 1 cancelled

The error we SHOULD receive is:

Caught exception at initializing Ldap. javax.naming.AuthenticationException: [LDAP: error code 49 - password expired!]

We see this error when we have the following setup:

Java JNDI --> Directory Proxy --> Directory

Here are the steps to reproduce the problem:

(1)

Run testGPLDLogin.class with the following:

java testGPLDLogin 032test 032test

This should produce:

Caught exception at initializing Ldap. javax.naming.AuthenticationException: [LDAP: error code 49 - password expired!]

That is expected.

(2)

If log level is low (notice) on the Directory Proxy Server and the Directory Proxy Server is configured to disallow anonymous connections, occasionally, you will see the following:

javax.naming.CommunicationException: Request: 1cancelled

When this occurs, the application exits unexpectedly.
###@###.### 2004-12-13 20:34:11 GMT

Comments
EVALUATION There is a race around access to cancel() between the Connection thread and the LdapClient thread. ###@###.### 2005-04-27 01:54:57 GMT
27-04-2005

SUGGESTED FIX Jaya Hangal wrote: > The fix is in the LdapRequest.getReplyBer() method by adding another > state to the LdapRequest that indicates whether the request was > cancelled by the cleanup when the Connection thread exits. When this > happens, LdapRequest.getReplyBer() method goes ahead and reads the reply > instead of throwing the Communication exception. The Connection thread > exits. The LdapClient thread exits only after processing the reply if > there is any. > > The idea behind the fix is to prevent the LdapClient from bailing out > without processing the outstanding reply from the server > when the connection is being closed by the Connection thread. I believe > this fix doesn't have side effects on any other operation. ###@###.### 2005-04-27 01:54:56 GMT
02-03-2005