You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Doug Tillman <do...@texturacorp.com> on 2010/12/02 17:22:07 UTC

Bug in Shutdown?

It seems that during service.shutdown() a call is made into the DN class
to get the name to shut down.  Unfortunately, the call to getName
returns upName but the value called for the lookup to shut down a
partition has already been removed using the normName which though they
are different values refer to the same partition.  So, the partition is
already removed but there is still a key that is stored that references
the removed partition - when the shutdown call tries to remove the
partition it can't be found (DefaultPartitionNexus 965).  This is a
roundabout way of saying that the shutdown manifests a  bug which is
really in the DefaultNexusPartition.initializeSystemPartition() call
that invokes DN.getName instead of DN.getNormName - see line 335.

 

Of course, we could have erred when we tracked into the source so I've
pasted the trace below.  The start up is fine and we're able to do a
lookup so it seems that we've initialized the service and server
correctly.  It would be "extremely" helpful if this is a bug if it could
be remedied quickly.

 

Thanks.

Doug

 

Dec 2, 2010 9:51:59 AM
org.apache.directory.server.core.partition.DefaultPartitionNexus
removeContextPartition

SEVERE: ERR_35 No partition with suffix {0} can be found in the
NamingContexts

Dec 2, 2010 9:51:59 AM
org.apache.directory.server.core.partition.DefaultPartitionNexus
doDestroy

WARNING: Failed to destroy a partition: ou=system

javax.naming.NameNotFoundException: ERR_35 No partition with suffix {0}
can be found in the NamingContexts

      at
org.apache.directory.server.core.partition.DefaultPartitionNexus.removeC
ontextPartition(DefaultPartitionNexus.java:981)

      at
org.apache.directory.server.core.partition.DefaultPartitionNexus.doDestr
oy(DefaultPartitionNexus.java:385)

      at
org.apache.directory.server.core.partition.AbstractPartition.destroy(Abs
tractPartition.java:98)

      at
org.apache.directory.server.core.DefaultDirectoryService.shutdown(Defaul
tDirectoryService.java:965)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:79)

      at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:618)

      at
org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethod
SiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)

      at
org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMet
hodSite.java:52)

      at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteA
rray.java:40)

      at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallS
ite.java:116)

      at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallS
ite.java:120)

      at
com.textura.cpms.service.app.testutils.LdapUtil.shutdown(LdapUtil.groovy
:207)

      at
com.textura.cpms.service.app.testutils.LdapUtil$shutdown.call(Unknown
Source)

      at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteA
rray.java:40)

      at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallS
ite.java:116)

      at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallS
ite.java:120)

      at
com.textura.cpms.service.app.testutils.LdapUtil.main(LdapUtil.groovy:93)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:79)

      at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:618)

      at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)

      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)

      at
groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1302)

      at
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.jav
a:767)

      at
groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java
:271)

      at groovy.lang.GroovyShell.run(GroovyShell.java:227)

      at groovy.lang.GroovyShell.run(GroovyShell.java:157)

      at groovy.ui.GroovyMain.processOnce(GroovyMain.java:496)

      at groovy.ui.GroovyMain.run(GroovyMain.java:311)

      at groovy.ui.GroovyMain.process(GroovyMain.java:297)

      at groovy.ui.GroovyMain.processArgs(GroovyMain.java:112)

      at groovy.ui.GroovyMain.main(GroovyMain.java:93)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:79)

      at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:618)

      at
org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:10
8)

      at
org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:130)

Dec 2, 2010 9:51:59 AM
org.apache.directory.server.core.DefaultDirectoryService shutdown

INFO: Waiting for SynchWorkerThread to die.

 

 


Re: Bug in Shutdown?

Posted by Emmanuel Lecharny <el...@gmail.com>.
On 12/2/10 5:22 PM, Doug Tillman wrote:
> It seems that during service.shutdown() a call is made into the DN class
> to get the name to shut down.  Unfortunately, the call to getName
> returns upName but the value called for the lookup to shut down a
> partition has already been removed using the normName which though they
> are different values refer to the same partition.  So, the partition is
> already removed but there is still a key that is stored that references
> the removed partition - when the shutdown call tries to remove the
> partition it can't be found (DefaultPartitionNexus 965).  This is a
> roundabout way of saying that the shutdown manifests a  bug which is
> really in the DefaultNexusPartition.initializeSystemPartition() call
> that invokes DN.getName instead of DN.getNormName - see line 335.
>
>
>
> Of course, we could have erred when we tracked into the source so I've
> pasted the trace below.  The start up is fine and we're able to do a
> lookup so it seems that we've initialized the service and server
> correctly.  It would be "extremely" helpful if this is a bug if it could
> be remedied quickly.
Sounds like a bug... Worth filling a JIRA with extra informations like 
ADS version.

Thanks for having dig the code !


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com