directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny" <elecha...@gmail.com>
Subject Re: DIRSERVER - ConcurrentModificationException problem in org.apache.directory.shared.ldap.message.AttributesImpl
Date Mon, 15 Oct 2007 22:21:09 GMT
Hi,

this seems to be an error in the replication engine. I think that we
need to add some more logic to avoid such concurrent access, but as we
are currently reviewing and refactoring the Attributes classes, it's
pretty clear we will review this point.

I would suggest you fill a JIRA with this stack trace, providing more
informations, like the server versions, Java version, etc.

thanks !

On 10/15/07, B G <fitzbew@gmail.com> wrote:
> I am consistently getting the following exception:
> java.util.ConcurrentModificationException
>         at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>         at java.util.HashMap$KeyIterator.next(HashMap.java:827)
>         at org.apache.directory.shared.ldap.message.AttributesImpl.clone(
> AttributesImpl.java:499)
>         at
> org.apache.directory.server.core.partition.impl.btree.IndexRecord.getAttributes
> (IndexRecord.java:128)
>         at
> org.apache.directory.server.core.partition.impl.btree.BTreeSearchResultEnumeration.next
> (BTreeSearchResultEnumeration.java:192)
>         at
> org.apache.directory.server.core.partition.impl.btree.BTreeSearchResultEnumeration.next
> (BTreeSearchResultEnumeration.java:52)
>         at
> org.apache.directory.server.core.enumeration.SearchResultFilteringEnumeration.prefetch
> (SearchResultFilteringEnumeration.java:303)
>         at
> org.apache.directory.server.core.enumeration.SearchResultFilteringEnumeration
> .<init>(SearchResultFilteringEnumeration.java:118)
>         at org.apache.directory.mitosis.service.ReplicationService.search(
> ReplicationService.java:552)
>         at
> org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.search
> (InterceptorChain.java:1268)
>         at
> org.apache.directory.server.core.interceptor.BaseInterceptor.search(
> BaseInterceptor.java:199)
>         at
> org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.search
> (InterceptorChain.java:1268)
>         at
> org.apache.directory.server.core.interceptor.BaseInterceptor.search(
> BaseInterceptor.java:199)
>         at
> org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.search
> (InterceptorChain.java:1268)
>         at
> org.apache.directory.server.core.collective.CollectiveAttributeService.search
> (CollectiveAttributeService.java:320)
>         at
> org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.search
> (InterceptorChain.java:1268)
>         at org.apache.directory.server.core.subtree.SubentryService.search(
> SubentryService.java:248)
>         at
> org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.search
> (InterceptorChain.java:1268)
>         at org.apache.directory.server.core.schema.SchemaService.search(
> SchemaService.java:517)
>         at
> org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.search
> (InterceptorChain.java:1268)
>         at
> org.apache.directory.server.core.operational.OperationalAttributeService.search
> (OperationalAttributeService.java:310)
>         at
> org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.search
> (InterceptorChain.java:1268)
>         at
> org.apache.directory.server.core.exception.ExceptionService.search(
> ExceptionService.java:525)
>         at
> org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.search
> (InterceptorChain.java:1268)
>         at
> org.apache.directory.server.core.authz.DefaultAuthorizationService.search(
> DefaultAuthorizationService.java:510)
>         at
> org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.search
> (InterceptorChain.java:1268)
>         at
> org.apache.directory.server.core.authz.AuthorizationService.search(
> AuthorizationService.java:945)
>         at
> org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.search
> (InterceptorChain.java:1268)
>         at org.apache.directory.server.core.referral.ReferralService.search(
> ReferralService.java:975)
>         at
> org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.search
> (InterceptorChain.java:1268)
>         at
> org.apache.directory.server.core.authn.AuthenticationService.search(
> AuthenticationService.java:458)
>         at
> org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.search
> (InterceptorChain.java:1268)
>         at
> org.apache.directory.server.core.normalization.NormalizationService.search(
> NormalizationService.java:349)
>         at
> org.apache.directory.server.core.interceptor.InterceptorChain.search(
> InterceptorChain.java:880)
>         at
> org.apache.directory.server.core.partition.PartitionNexusProxy.search(
> PartitionNexusProxy.java:492)
>         at
> org.apache.directory.server.core.partition.PartitionNexusProxy.search(
> PartitionNexusProxy.java:434)
>         at
> org.apache.directory.server.core.jndi.ServerContext.doSearchOperation(
> ServerContext.java:249)
>         at org.apache.directory.server.core.jndi.ServerDirContext.search(
> ServerDirContext.java:642)
>         at
> org.apache.directory.server.ldap.support.SearchHandler.messageReceived(
> SearchHandler.java:376)
>         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)
> javax.naming.NamingException: [LDAP: error code 36 - failed on search
> operation: Unexpected exception.]; remaining name
> 'verastreamuuid=e76ce690-fe53-4647-b33d-e25c1241a401,cn=servers,cn=vms,cn=applications'
>         at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:2981)
>         at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2951)
>         at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2758)
>         at com.sun.jndi.ldap.LdapCtx.c_lookup(LdapCtx.java:997)
>         at com.sun.jndi.toolkit.ctx.ComponentContext.p_lookup(
> ComponentContext.java:526)
>         at com.sun.jndi.toolkit.ctx.PartialCompositeContext.lookup(
> PartialCompositeContext.java:159)
>         at com.sun.jndi.toolkit.ctx.PartialCompositeContext.lookup(
> PartialCompositeContext.java:148)
>         at javax.naming.InitialContext.lookup(InitialContext.java:392)
>         at
> com.attachmate.vms.peermgmt.datastore.directory.DirectoryPeerManagerDataStore.directoryDataChanged
> (DirectoryPeerManagerDataStore.java:376)
>         at
> org.apache.directory.mitosis.operation.support.EventUtil$EventFire.run(
> EventUtil.java:68)
>         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)
>
> I took a look at the offending code and it seems to me that AttributesImpl
> is not thread safe specially with repsect to its inner class iterator
> implementation. I through some synchronization code in and seemed to have
> fixed the problem, at least I am not seeing it manifest in my application.
>
> Is this a known issue? Should this class be thread safe?
>
> Any insight would be appreciated...
>


-- 
Regards,
Cordialement,
Emmanuel L├ęcharny
www.iktek.com

Mime
View raw message