JDK-6750362 : Very large LDAP requests throw a OOM on LDAP servers which aren't aware of Paged Results Controls
  • Type: Bug
  • Component: core-libs
  • Sub-Component: javax.naming
  • Affected Version: 5.0u11
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-09-19
  • Updated: 2017-05-16
  • Resolved: 2011-05-18
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 Other JDK 6 JDK 7
5.0u19-revFixed 5.0u20-revFixed 5.0u21Fixed 6u24-revFixed 7 b134Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
In CR 6747875 we have documented that if an LDAP server responds with many thousands of entries, a client could stop with an "java.lang.OutOfMemoryError: Java heap space" if the request results cannot be processed fast enough. The feature called Paged Results Control has been suggested in order to control the rate of arrival of LDAP results. However, this approach doesn't work with each LDAP server.

This request is to improve the actual jndi producer/consumer implementation in order to make it working even if a LDAP server don't support the Paged Results Control feature.

A testcase is attached to the CR.

Comments
EVALUATION Forward port the JDK6 fix for the time being.
04-02-2011

EVALUATION Need a lot of work to re-design ASN.1 parser.
27-07-2010

WORK AROUND 1) Buy more memory, use a 64 bit JVM and increase the Java heap until it works. Note that this workaround isn't suitable for many customer. 2) Use a LDAP server which supports Paged Results Controls. See also http://java.sun.com/j2se/1.5.0/docs/api/javax/naming/ldap/PagedResultsControl.html Note that this workaround isn't suitable for the customer, as the customer want to support LDAP servers even if they don't have that feature.
19-09-2008