United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6750362 Very large LDAP requests throw a OOM on LDAP servers which aren't aware of Paged Results Controls
JDK-6750362 : Very large LDAP requests throw a OOM on LDAP servers which aren't aware of Paged Results Controls

Details
Type:
Bug
Submit Date:
2008-09-19
Status:
Closed
Updated Date:
2012-05-22
Project Name:
JDK
Resolved Date:
2011-05-18
Component:
core-libs
OS:
generic
Sub-Component:
javax.naming
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
5.0u11
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:
Relates:
Relates:
Relates:

Sub Tasks

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
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.
                                     
2008-09-19
EVALUATION

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

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



Hardware and Software, Engineered to Work Together