directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Karasulu (JIRA)" <>
Subject [jira] Assigned: (DIRSERVER-1180) NPE and hanging search request when using a filter with empty substring sequence
Date Mon, 07 Jul 2008 20:28:31 GMT


Alex Karasulu reassigned DIRSERVER-1180:

    Assignee: Emmanuel Lecharny  (was: Alex Karasulu)

Found the problem and it persists.  I have a few grips here:

    (1) the decoder code should be throwing or taking us out with an exception which causes
normal error handling where the LDAP server tells the client that it encountered a protocol
error due to the request using a proper healthy response.
    (2) the decoder and ASN.1 handling code is so hard to comprehend and maintain that I would
have to spend at least a day analyzing the code to figure out how to fix this problem properly
and the fix is not trivial

Considering #2 I've given up and chosen to continue processing as many bugs as I can as fast
as I can while delegating this one to Emmanuel.  But this situation needs to be fixed so we
can all easily work together on this region of the code.  Please help us get here Emmanuel.

As for the recommended fix:

    Cause string prep functionality to condense sequence of '* ' asterisk characters into
a single character unless of course these are escaped.  Then, after this, condensing operation,
a determination must be made as to whether the assertion is still a substring expression or
an existence expression.  This should not be hard and requires only one more character read
ahead to determine: must find out if the assertion ends after the last asterisk, if not then
it's substring, if so it's an existence assertion. 

    Looking at the decoder code this can be done but you need to take some care when encountering
an asterisk after the '=' inside the assertion before deciding to determine what kind of filter
assertion node this is.  That's when the condensation of a series of '*' to a single asterisk
must be performed.

> NPE and hanging search request when using a filter with empty substring sequence
> --------------------------------------------------------------------------------
>                 Key: DIRSERVER-1180
>                 URL:
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.3, 1.5.2
>            Reporter: Stefan Seelmann
>            Assignee: Emmanuel Lecharny
>            Priority: Blocker
>             Fix For: 1.5.3
> When starting a search request using the seachfilter (cn=**) the request lasts forever.
I testet with JNDI and ldapsearch command. 
> Here is the server log:
> [00:22:01] ERROR [] - The
substring any filter is empty
> [00:22:01] WARN [$LdapProtocolHandler] - [/]
Unexpected exception from exceptionCaught handler.
> java.lang.NullPointerException: message
> 	at org.apache.mina.common.IoFilter$WriteRequest.<init>(
> 	at
> 	at
> 	at$LdapProtocolHandler.exceptionCaught(
> 	at$TailFilter.exceptionCaught(
> 	at
> 	at$1000(
> 	at$EntryImpl$1.exceptionCaught(
> 	at org.apache.mina.common.IoFilterAdapter.exceptionCaught(
> 	at
> 	at$1000(
> 	at$EntryImpl$1.exceptionCaught(
> 	at org.apache.mina.filter.executor.ExecutorFilter.processEvent(
> 	at org.apache.mina.filter.executor.ExecutorFilter$
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(
> 	at java.util.concurrent.ThreadPoolExecutor$
> 	at

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message