Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-2025

ApacheDS fails to return sortedResults when searched against a certain number of entries

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-M19
    • Fix Version/s: 2.0.0-M20
    • Component/s: ldap
    • Labels:
      None

      Description

      I could get sorted search working when the number of entries in ADS is <=17. But when I have entries more than 17, I get below exception

      apacheds.log :----

      [12:53:30] WARN [org.apache.directory.mavibot.btree.SpaceReclaimer] - Failed to read the copied page map from /tmp/cpm.db
      [12:53:30] WARN [org.apache.directory.mavibot.btree.SpaceReclaimer] -
      java.lang.NullPointerException
      at org.apache.directory.mavibot.btree.RevisionName.getRevision(RevisionName.java:57)
      at org.apache.directory.mavibot.btree.RevisionName.hashCode(RevisionName.java:126)
      at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:910)
      at java.util.concurrent.ConcurrentHashMap.readObject(ConcurrentHashMap.java:1315)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:991)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1865)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1770)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
      at org.apache.directory.mavibot.btree.SpaceReclaimer.readCopiedPageMap(SpaceReclaimer.java:135)
      at org.apache.directory.mavibot.btree.RecordManager.<init>(RecordManager.java:289)
      at org.apache.directory.mavibot.btree.RecordManager.<init>(RecordManager.java:229)
      at org.apache.directory.server.core.shared.DefaultCoreSession.sortResults(DefaultCoreSession.java:1343)
      at org.apache.directory.server.core.shared.DefaultCoreSession.search(DefaultCoreSession.java:1130)
      at org.apache.directory.server.ldap.handlers.request.SearchRequestHandler.doSimpleSearch(SearchRequestHandler.java:827)
      at org.apache.directory.server.ldap.handlers.request.SearchRequestHandler.handleIgnoringReferrals(SearchRequestHandler.java:1179)
      at org.apache.directory.server.ldap.handlers.request.SearchRequestHandler.handle(SearchRequestHandler.java:212)
      at org.apache.directory.server.ldap.handlers.request.SearchRequestHandler.handle(SearchRequestHandler.java:93)
      at org.apache.directory.server.ldap.handlers.LdapRequestHandler.handleMessage(LdapRequestHandler.java:207)
      at org.apache.directory.server.ldap.handlers.LdapRequestHandler.handleMessage(LdapRequestHandler.java:56)
      at org.apache.mina.handler.demux.DemuxingIoHandler.messageReceived(DemuxingIoHandler.java:221)
      at org.apache.directory.server.ldap.LdapProtocolHandler.messageReceived(LdapProtocolHandler.java:217)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:854)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:542)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:48)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:943)
      at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:74)
      at org.apache.mina.core.session.IoEvent.run(IoEvent.java:63)
      at org.apache.mina.filter.executor.UnorderedThreadPoolExecutor$Worker.runTask(UnorderedThreadPoolExecutor.java:475)
      at org.apache.mina.filter.executor.UnorderedThreadPoolExecutor$Worker.run(UnorderedThreadPoolExecutor.java:429)
      at java.lang.Thread.run(Thread.java:679)

        Activity

        Hide
        akiran Kiran Ayyagari added a comment -

        For now replaced the Mavibot with JDBM.
        After the freepage management code is fixed we can switch back to Mavibot again.

        Committed here http://svn.apache.org/r1642432 and verified with some random test data.

        Show
        akiran Kiran Ayyagari added a comment - For now replaced the Mavibot with JDBM. After the freepage management code is fixed we can switch back to Mavibot again. Committed here http://svn.apache.org/r1642432 and verified with some random test data.
        Hide
        elaborateruse Elaborate Ruse added a comment -

        Hi there,
        Thanks for fixing this issue! I am experiencing this issue in 2.0.0-M19 where a request for a sorted search generates this exception in apacheds.log . Unfortunately, this is causing issues with one of my systems where I can't view users within an OU having 60 users. Is M20 about to be released or do I need to do something more drastic like attempt to merge the fix for this and build from source so my system can browse users in this OU? Thanks!

        Show
        elaborateruse Elaborate Ruse added a comment - Hi there, Thanks for fixing this issue! I am experiencing this issue in 2.0.0-M19 where a request for a sorted search generates this exception in apacheds.log . Unfortunately, this is causing issues with one of my systems where I can't view users within an OU having 60 users. Is M20 about to be released or do I need to do something more drastic like attempt to merge the fix for this and build from source so my system can browse users in this OU? Thanks!
        Hide
        akiran Kiran Ayyagari added a comment -

        M20 is likely to be released in another 2 weeks, but you need to build from sources to avail this fix before that.

        Show
        akiran Kiran Ayyagari added a comment - M20 is likely to be released in another 2 weeks, but you need to build from sources to avail this fix before that.
        Hide
        elaborateruse Elaborate Ruse added a comment -

        Thanks for the quick reply!

        Show
        elaborateruse Elaborate Ruse added a comment - Thanks for the quick reply!

          People

          • Assignee:
            akiran Kiran Ayyagari
            Reporter:
            nneharawatt Neha
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development