jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Jentzsch <simonjentz...@yahoo.de>
Subject Re: Shutdown Hangs
Date Fri, 07 Mar 2008 16:35:57 GMT
Hi Marcel,

Thanx for your response. It's not easy to get a good threaddump, because 
when you shutdown tomcat as a service this option is not available, but 
i used the jdb running the tomcat in debugmode.

I debugged it many times now, and so far thisis my explanition:

  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] 
EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock$WriterLock.acquire 
(null)
  [4] org.apache.jackrabbit.core.RepositoryImpl.shutdown 
(RepositoryImpl.java:939)
  [5] org.apache.jackrabbit.core.TransientRepository.stopRepository 
(TransientRepository.java:275)
  [6] org.apache.jackrabbit.core.TransientRepository.loggedOut 
(TransientRepository.java:427)
  [7] org.apache.jackrabbit.core.SessionImpl.notifyLoggedOut 
(SessionImpl.java:573)
  [8] org.apache.jackrabbit.core.SessionImpl.logout (SessionImpl.java:1.246)
  [9] org.apache.jackrabbit.core.XASessionImpl.logout 
(XASessionImpl.java:403)
  [10] org.apache.jackrabbit.core.RepositoryImpl.doShutdown 
(RepositoryImpl.java:981)
  [11] org.apache.jackrabbit.core.RepositoryImpl.shutdown 
(RepositoryImpl.java:948)
  ...


When shutting down Spring  calls the "shutdown()"-Method, which aquires 
the lock and then closes all sessions. But when the last session will be 
closed, it will call the shutdown-method again [5], but this time he is 
waiting for the lock.

Any Idea why this happens?

thanx

simon


This is my Threaddump:

 > http-80-1:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.tomcat.util.net.AprEndpoint$Worker.await 
(AprEndpoint.java:1.256)
  [4] org.apache.tomcat.util.net.AprEndpoint$Worker.run 
(AprEndpoint.java:1.281)
  [5] java.lang.Thread.run (null)
ajp-8009-1:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.tomcat.util.net.AprEndpoint$Worker.await 
(AprEndpoint.java:1.256)
  [4] org.apache.tomcat.util.net.AprEndpoint$Worker.run 
(AprEndpoint.java:1.281)
  [5] java.lang.Thread.run (null)
ajp-8009-Poller-7:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.tomcat.util.net.AprEndpoint$Poller.run 
(AprEndpoint.java:1.126)
  [4] java.lang.Thread.run (null)
ajp-8009-Poller-6:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.tomcat.util.net.AprEndpoint$Poller.run 
(AprEndpoint.java:1.126)
  [4] java.lang.Thread.run (null)
ajp-8009-Poller-5:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.tomcat.util.net.AprEndpoint$Poller.run 
(AprEndpoint.java:1.126)
  [4] java.lang.Thread.run (null)
ajp-8009-Poller-4:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.tomcat.util.net.AprEndpoint$Poller.run 
(AprEndpoint.java:1.126)
  [4] java.lang.Thread.run (null)
ajp-8009-Poller-3:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.tomcat.util.net.AprEndpoint$Poller.run 
(AprEndpoint.java:1.126)
  [4] java.lang.Thread.run (null)
ajp-8009-Poller-2:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.tomcat.util.net.AprEndpoint$Poller.run 
(AprEndpoint.java:1.126)
  [4] java.lang.Thread.run (null)
ajp-8009-Poller-1:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.tomcat.util.net.AprEndpoint$Poller.run 
(AprEndpoint.java:1.126)
  [4] java.lang.Thread.run (null)
ajp-8009-Poller-0:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.tomcat.util.net.AprEndpoint$Poller.run 
(AprEndpoint.java:1.126)
  [4] java.lang.Thread.run (null)
ajp-8009-Acceptor-0:
  [1] java.lang.Thread.sleep (native method)
  [2] org.apache.tomcat.util.net.AprEndpoint$Acceptor.run 
(AprEndpoint.java:994)
  [3] java.lang.Thread.run (null)
http-80-Sendfile-0:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.tomcat.util.net.AprEndpoint$Sendfile.run 
(AprEndpoint.java:1.487)
  [4] java.lang.Thread.run (null)
http-80-Poller-7:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.tomcat.util.net.AprEndpoint$Poller.run 
(AprEndpoint.java:1.126)
  [4] java.lang.Thread.run (null)
http-80-Poller-6:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.tomcat.util.net.AprEndpoint$Poller.run 
(AprEndpoint.java:1.126)
  [4] java.lang.Thread.run (null)
http-80-Poller-5:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.tomcat.util.net.AprEndpoint$Poller.run 
(AprEndpoint.java:1.126)
  [4] java.lang.Thread.run (null)
http-80-Poller-4:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.tomcat.util.net.AprEndpoint$Poller.run 
(AprEndpoint.java:1.126)
  [4] java.lang.Thread.run (null)
http-80-Poller-3:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.tomcat.util.net.AprEndpoint$Poller.run 
(AprEndpoint.java:1.126)
  [4] java.lang.Thread.run (null)
http-80-Poller-2:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.tomcat.util.net.AprEndpoint$Poller.run 
(AprEndpoint.java:1.126)
  [4] java.lang.Thread.run (null)
http-80-Poller-1:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.tomcat.util.net.AprEndpoint$Poller.run 
(AprEndpoint.java:1.126)
  [4] java.lang.Thread.run (null)
http-80-Poller-0:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.tomcat.util.net.AprEndpoint$Poller.run 
(AprEndpoint.java:1.126)
  [4] java.lang.Thread.run (null)
http-80-Acceptor-0:
  [1] java.lang.Thread.sleep (native method)
  [2] org.apache.tomcat.util.net.AprEndpoint$Acceptor.run 
(AprEndpoint.java:994)
  [3] java.lang.Thread.run (null)
IndexMerger:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.commons.collections.buffer.BlockingBuffer.remove 
(BlockingBuffer.java:107)
  [4] org.apache.jackrabbit.core.query.lucene.IndexMerger.run 
(IndexMerger.java:263)
Timer-1:
  [1] java.lang.Object.wait (native method)
  [2] java.util.TimerThread.mainLoop (null)
  [3] java.util.TimerThread.run (null)
IndexMerger:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.commons.collections.buffer.BlockingBuffer.remove 
(BlockingBuffer.java:107)
  [4] org.apache.jackrabbit.core.query.lucene.IndexMerger.run 
(IndexMerger.java:263)
ObservationManager:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] org.apache.commons.collections.buffer.BlockingBuffer.remove 
(BlockingBuffer.java:107)
  [4] org.apache.jackrabbit.core.observation.ObservationDispatcher.run 
(ObservationDispatcher.java:138)
  [5] java.lang.Thread.run (null)
Thread-4:
  [1] java.lang.Thread.sleep (native method)
  [2] org.x7.core.content.dao.DocLogDAO.run (DocLogDAO.java:191)
  [3] java.lang.Thread.run (null)
Store org.hibernate.cache.StandardQueryCache Spool Thread:
  [1] java.lang.Thread.sleep (native method)
  [2] net.sf.ehcache.store.DiskStore.spoolAndExpiryThreadMain 
(DiskStore.java:573)
  [3] net.sf.ehcache.store.DiskStore.access$800 (DiskStore.java:65)
  [4] net.sf.ehcache.store.DiskStore$SpoolAndExpiryThread.run 
(DiskStore.java:1.057)
Store org.hibernate.cache.UpdateTimestampsCache Spool Thread:
  [1] java.lang.Thread.sleep (native method)
  [2] net.sf.ehcache.store.DiskStore.spoolAndExpiryThreadMain 
(DiskStore.java:573)
  [3] net.sf.ehcache.store.DiskStore.access$800 (DiskStore.java:65)
  [4] net.sf.ehcache.store.DiskStore$SpoolAndExpiryThread.run 
(DiskStore.java:1.057)
Store org.x7.core.content.base.AbstractGUIDObject Spool Thread:
  [1] java.lang.Thread.sleep (native method)
  [2] net.sf.ehcache.store.DiskStore.spoolAndExpiryThreadMain 
(DiskStore.java:573)
  [3] net.sf.ehcache.store.DiskStore.access$800 (DiskStore.java:65)
  [4] net.sf.ehcache.store.DiskStore$SpoolAndExpiryThread.run 
(DiskStore.java:1.057)
Timer-0:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] java.util.TimerThread.mainLoop (null)
  [4] java.util.TimerThread.run (null)
Thread-1:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] 
EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock$WriterLock.acquire 
(null)
  [4] org.apache.jackrabbit.core.RepositoryImpl.shutdown 
(RepositoryImpl.java:939)
  [5] org.apache.jackrabbit.core.TransientRepository.stopRepository 
(TransientRepository.java:275)
  [6] org.apache.jackrabbit.core.TransientRepository.loggedOut 
(TransientRepository.java:427)
  [7] org.apache.jackrabbit.core.SessionImpl.notifyLoggedOut 
(SessionImpl.java:573)
  [8] org.apache.jackrabbit.core.SessionImpl.logout (SessionImpl.java:1.246)
  [9] org.apache.jackrabbit.core.XASessionImpl.logout 
(XASessionImpl.java:403)
  [10] org.apache.jackrabbit.core.RepositoryImpl.doShutdown 
(RepositoryImpl.java:981)
  [11] org.apache.jackrabbit.core.RepositoryImpl.shutdown 
(RepositoryImpl.java:948)
  [12] 
org.springmodules.jcr.jackrabbit.TransientRepositoryFactoryBean.destroy 
(TransientRepositoryFactoryBean.java:67)
  [13] 
org.springframework.beans.factory.support.DisposableBeanAdapter.destroy 
(DisposableBeanAdapter.java:154)
  [14] 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean 
(DefaultSingletonBeanRegistry.java:397)
  [15] 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton 
(DefaultSingletonBeanRegistry.java:375)
  [16] 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons 
(DefaultSingletonBeanRegistry.java:348)
  [17] 
org.springframework.context.support.AbstractApplicationContext.destroyBeans 
(AbstractApplicationContext.java:856)
  [18] 
org.springframework.context.support.AbstractApplicationContext.doClose 
(AbstractApplicationContext.java:834)
  [19] 
org.springframework.context.support.AbstractApplicationContext.close 
(AbstractApplicationContext.java:801)
  [20] 
org.springframework.web.context.ContextLoader.closeWebApplicationContext 
(ContextLoader.java:357)
  [21] 
org.springframework.web.context.ContextLoaderListener.contextDestroyed 
(ContextLoaderListener.java:70)
  [22] org.apache.catalina.core.StandardContext.listenerStop 
(StandardContext.java:3.805)
  [23] org.apache.catalina.core.StandardContext.stop 
(StandardContext.java:4.364)
  [24] org.apache.catalina.core.ContainerBase.removeChild 
(ContainerBase.java:893)
  [25] org.apache.catalina.startup.HostConfig.undeployApps 
(HostConfig.java:1.180)
  [26] org.apache.catalina.startup.HostConfig.stop (HostConfig.java:1.151)
  [27] org.apache.catalina.startup.HostConfig.lifecycleEvent 
(HostConfig.java:313)
  [28] org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent 
(LifecycleSupport.java:120)
  [29] org.apache.catalina.core.ContainerBase.stop 
(ContainerBase.java:1.055)
  [30] org.apache.catalina.core.ContainerBase.stop 
(ContainerBase.java:1.067)
  [31] org.apache.catalina.core.StandardEngine.stop 
(StandardEngine.java:448)
  [32] org.apache.catalina.core.StandardService.stop 
(StandardService.java:510)
  [33] org.apache.catalina.core.StandardServer.stop 
(StandardServer.java:734)
  [34] org.apache.catalina.startup.Catalina.stop (Catalina.java:602)
  [35] org.apache.catalina.startup.Catalina.start (Catalina.java:577)
  [36] sun.reflect.NativeMethodAccessorImpl.invoke0 (native method)
  [37] sun.reflect.NativeMethodAccessorImpl.invoke (null)
  [38] sun.reflect.DelegatingMethodAccessorImpl.invoke (null)
  [39] java.lang.reflect.Method.invoke (null)
  [40] org.apache.catalina.startup.Bootstrap.start (Bootstrap.java:295)
  [41] org.apache.catalina.startup.Bootstrap.main (Bootstrap.java:433)
Attach Listener:
Signal Dispatcher:
Finalizer:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.ref.ReferenceQueue.remove (null)
  [3] java.lang.ref.ReferenceQueue.remove (null)
  [4] java.lang.ref.Finalizer$FinalizerThread.run (null)
Reference Handler:
  [1] java.lang.Object.wait (native method)
  [2] java.lang.Object.wait (Object.java:485)
  [3] java.lang.ref.Reference$ReferenceHandler.run (null)
main:



Marcel Reutegger schrieb:
> Hi Simon,
>
> can you please post the complete thread dump, which includes all other 
> threads?
>
> thanks
>
> regards
>  marcel
>
>
>
> Simon Jentzsch wrote:
>> Hi,
>>
>> I'm using jackrabbit together with spring and the 
>> org.springmodules.jcr.support.OpenSessionInViewFilter.  It works 
>> great and Spring takes care of all the starting and shutdown-cleanup, 
>> but whenever I shutdown my Tomcat the Repository hangs on this line:
>>
>> shutdownLock.writeLock().acquire();    (RepositoryImpl:939)
>>
>> It seemes to me, that the WriterPreferenceReadWriteLock is waiting 
>> for all LockWriters to finish, but he is waiting forever.
>> I don't know who should hold another Lock on it.
>>
>> I just made an update from 1.3 to 1.4 but the shutdown did not get 
>> better.
>>
>> Does anyone have a Idea?
>>
>> Here my spring-config:
>>
>>
>> <!--  JCR -->
>>  <bean id="jcrRepository" 
>> class="org.springmodules.jcr.jackrabbit.RepositoryFactoryBean">
>>    <!-- normal factory beans params -->
>>    <property name="configuration" 
>> value="classpath:/org/x7/core/model/repository.xml"/>
>>    <property name="homeDir" value="file:."/>
>>  </bean>
>>
>>
>> <!-- org.springmodules.jcr.JcrSessionFactory -->
>>
>>   <bean id="jcrSessionFactory" 
>> class="org.springmodules.jcr.jackrabbit.JackrabbitSessionFactory">
>>    <property name="repository" ref="jcrRepository"/>
>>    <property name="credentials">
>>       <bean class="javax.jcr.SimpleCredentials">
>>          <constructor-arg index="0" value="bogus"/>
>>          <constructor-arg index="1">
>>             <bean factory-bean="password" factory-method="toCharArray"/>
>>          </constructor-arg>
>>       </bean>
>>     </property>
>>     <property name="eventListeners">
>>       <list>
>>         <bean class="org.springmodules.jcr.EventListenerDefinition">
>>           <property name="listener" ref="jcrDAO"/>
>>         </bean>
>>       </list>
>>    </property>
>>   </bean>
>>      <!-- create the password to return it as a char[] -->
>>   <bean id="password" class="org.x7.core.util.CharArrayCreator">
>>     <constructor-arg index="0" value="pass"/>
>>   </bean>
>>
>>
>>
>>   <bean id="jcrDAO" class="org.x7.core.jcr.JcrDAO" >
>>     <property name="sessionFactory" ref="jcrSessionFactory"/>
>>     <property name="template">
>>        <bean id="jcrTemplate" class="org.springmodules.jcr.JcrTemplate">
>>         <property name="sessionFactory" ref="jcrSessionFactory"/>
>>         <property name="allowCreate" value="true"/>
>>       </bean>
>>     </property>
>>     <property name="transactionMgr">
>>       <bean 
>> class="org.springmodules.jcr.jackrabbit.LocalTransactionManager">
>>         <property name="sessionFactory" ref="jcrSessionFactory"/>
>>       </bean>
>>     </property>
>>   </bean>
>>  
>>
>>
>> Thanx
>>
>> Regards,
>>
>> Simon
>>
>>
>>
>>            
>> ___________________________________________________________ Der frühe 
>> Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: 
>> http://mail.yahoo.de
>>
>>
>
>


		
___________________________________________________________ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de


Mime
View raw message