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

Concurrency issuses in the nexus partition lead to race conditions with unbind requests on shutdown.

Watch issueLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 1.5.2
    • None
    • None

    Description

      Getting the following stack trace when there is a race condition with server shutdown and an unbind request which tries a getPartition when the partitionTree has been emptied out.

      [21:34:13] ERROR [org.apache.directory.server.ldap.support.UnbindHandler] - failed to unbind session properly
      org.apache.directory.shared.ldap.exception.LdapNameNotFoundException: uid=admin,ou=system
      at org.apache.directory.server.core.partition.DefaultPartitionNexus.getPartition(DefaultPartitionNexus.java:1112)
      at org.apache.directory.server.core.partition.DefaultPartitionNexus.unbind(DefaultPartitionNexus.java:773)
      at org.apache.directory.server.core.interceptor.InterceptorChain$1.unbind(InterceptorChain.java:210)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain.unbind(InterceptorChain.java:794)
      at org.apache.directory.server.core.partition.PartitionNexusProxy.unbind(PartitionNexusProxy.java:683)
      at org.apache.directory.server.core.partition.PartitionNexusProxy.unbind(PartitionNexusProxy.java:700)
      at org.apache.directory.server.core.jndi.ServerLdapContext.ldapUnbind(ServerLdapContext.java:210)
      at org.apache.directory.server.ldap.support.UnbindHandler.messageReceived(UnbindHandler.java:58)
      at org.apache.mina.handler.demux.DemuxingIoHandler.messageReceived(DemuxingIoHandler.java:141)
      at org.apache.directory.server.ldap.LdapProtocolProvider$LdapProtocolHandler.messageReceived(LdapProtocolProvider.java:428)
      at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:570)
      at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
      at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
      at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
      at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimpleProtocolDecoderOutput.java:58)
      at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:176)
      at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
      at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
      at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
      at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:220)
      at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:264)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java.lang.Thread.run(Thread.java:619)
      [21:34:13] WARN [org.apache.directory.server.jndi.ServerContextFactory] - Failed to sent NoD.
      java.lang.IllegalArgumentException: Address not bound: 0.0.0.0/0.0.0.0:10389
      at org.apache.mina.transport.socket.nio.SocketAcceptor.unbind(SocketAcceptor.java:200)
      at org.apache.directory.server.jndi.ServerContextFactory.stopLDAP0(ServerContextFactory.java:727)
      at org.apache.directory.server.jndi.ServerContextFactory.afterShutdown(ServerContextFactory.java:164)
      at org.apache.directory.server.core.DefaultDirectoryService.shutdown(DefaultDirectoryService.java:305)
      at org.apache.directory.server.core.DefaultDirectoryService$1.run(DefaultDirectoryService.java:218)
      at java.lang.Thread.run(Thread.java:619)
      [21:34:30] WARN [org.apache.directory.server.ldap.LdapProtocolProvider$LdapProtocolHandler] - [/127.0.0.1:59971] Unexpected exception from exceptionCaught handler.
      java.util.concurrent.RejectedExecutionException
      at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1759)
      at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767)
      at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:658)
      at org.apache.mina.filter.executor.ExecutorFilter.fireEvent(ExecutorFilter.java:101)
      at org.apache.mina.filter.executor.ExecutorFilter.exceptionCaught(ExecutorFilter.java:204)
      at org.apache.mina.common.support.AbstractIoFilterChain.callNextExceptionCaught(AbstractIoFilterChain.java:345)
      at org.apache.mina.common.support.AbstractIoFilterChain.access$1000(AbstractIoFilterChain.java:53)
      at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.exceptionCaught(AbstractIoFilterChain.java:643)
      at org.apache.mina.common.support.AbstractIoFilterChain$HeadFilter.exceptionCaught(AbstractIoFilterChain.java:494)
      at org.apache.mina.common.support.AbstractIoFilterChain.callNextExceptionCaught(AbstractIoFilterChain.java:345)
      at org.apache.mina.common.support.AbstractIoFilterChain.fireExceptionCaught(AbstractIoFilterChain.java:334)
      at org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.java:228)
      at org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcessor.java:181)
      at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$500(SocketIoProcessor.java:44)
      at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:448)
      at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:39)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java.lang.Thread.run(Thread.java:619)
      [23:52:25] WARN [org.apache.directory.server.core.DefaultDirectoryService] - You didn't change the admin password of directory service instance 'default'. Please update the admin password as soon as possible to prevent a possible security breach.
      [23:52:25] WARN [org.apache.directory.server.jndi.ServerContextFactory] - LDIF load directory '/home/ee/test.ldif' does not exist. No LDIF files will be loaded.
      [23:56:17] WARN [org.apache.directory.server.ldap.support.AbandonHandler] - Got abandon request from client (SOCKET, R: /127.0.0.1:59628, L: /127.0.0.1:10389, S: 0.0.0.0/0.0.0.0:10389) but request must have already terminated. Abandon request org.apache.directory.shared.ldap.message.AbandonRequestImpl@1f270c27 had no effect.
      [23:56:30] WARN [org.apache.directory.server.core.DefaultDirectoryService] - You didn't change the admin password of directory service instance 'default'. Please update the admin password as soon as possible to prevent a possible security breach.
      [23:56:30] WARN [org.apache.directory.server.jndi.ServerContextFactory] - LDIF load directory '/home/ee/ldif' does not exist. No LDIF files will be loaded.
      [23:59:34] ERROR [org.apache.directory.server.ldap.support.UnbindHandler] - failed to unbind session properly
      org.apache.directory.shared.ldap.exception.LdapNameNotFoundException: uid=admin,ou=system
      at org.apache.directory.server.core.partition.DefaultPartitionNexus.getPartition(DefaultPartitionNexus.java:1112)
      at org.apache.directory.server.core.partition.DefaultPartitionNexus.unbind(DefaultPartitionNexus.java:773)
      at org.apache.directory.server.core.interceptor.InterceptorChain$1.unbind(InterceptorChain.java:210)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind(InterceptorChain.java:1412)
      at org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(BaseInterceptor.java:228)
      at org.apache.directory.server.core.interceptor.InterceptorChain.unbind(InterceptorChain.java:794)
      at org.apache.directory.server.core.partition.PartitionNexusProxy.unbind(PartitionNexusProxy.java:683)
      at org.apache.directory.server.core.partition.PartitionNexusProxy.unbind(PartitionNexusProxy.java:700)
      at org.apache.directory.server.core.jndi.ServerLdapContext.ldapUnbind(ServerLdapContext.java:210)
      at org.apache.directory.server.ldap.support.UnbindHandler.messageReceived(UnbindHandler.java:58)
      at org.apache.mina.handler.demux.DemuxingIoHandler.messageReceived(DemuxingIoHandler.java:141)
      at org.apache.directory.server.ldap.LdapProtocolProvider$LdapProtocolHandler.messageReceived(LdapProtocolProvider.java:428)
      at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:570)
      at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
      at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
      at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
      at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimpleProtocolDecoderOutput.java:58)
      at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:176)
      at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
      at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
      at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
      at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:220)
      at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:264)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java.lang.Thread.run(Thread.java:619)

      Attachments

        1. ServerDNConstants.patch
          0.9 kB
          Simon Temple
        2. ServerLdapContext.patch
          1 kB
          Simon Temple

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            akarasulu Alex Karasulu
            akarasulu Alex Karasulu
            Votes:
            6 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment