2012-05-16 52 views
-2

我有一個java死鎖,看起來像groovy的問題。需要建議。Java中的Dealock在Groovy中解釋Jstack的幫助

找到一個Java的水平僵局

"http-26100-Processor20": 
    waiting to lock monitor 0x00007fc22f725b70 (object 0x00007fc248a51a58, a java.lang.Object), 
    which is held by "MEC" 

"MEC": 
    waiting to lock monitor 0x000000000358e2e8 (object 0x00007fc248aed588, a java.beans.PropertyDescriptor), 
    which is held by "IOC" 

"IOC": 
    waiting to lock monitor 0x00007fc22f725b70 (object 0x00007fc248a51a58, a java.lang.Object), 
    which is held by "MEC" 


Java stack information for the threads listed above 


"http-26100-Processor20": 
    at java.beans.Introspector.getBeanInfo(Introspector.java:157) 
    - waiting to lock <0x00007fc248a51a58> (a java.lang.Object) 
    at groovy.lang.MetaClassImpl$15.run(MetaClassImpl.java:2940) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at groovy.lang.MetaClassImpl.addProperties(MetaClassImpl.java:2938) 
    at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:2921) 
    - locked <0x00007fc42e5e48a0> (a groovy.lang.ExpandoMetaClass) 
    at groovy.lang.ExpandoMetaClass.initialize(ExpandoMetaClass.java:463) 
    - locked <0x00007fc42e5e48a0> (a groovy.lang.ExpandoMetaClass) 
    at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:166) 
    at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:182) 
    at org.codehaus.groovy.runtime.callsite.ClassMetaClassGetPropertySite.(ClassMetaClassGetPropertySite.java:35) 
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.createClassMetaClassGetPropertySite(AbstractCallSite.java:304) 
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.createGetPropertySite(AbstractCallSite.java:256) 
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.acceptGetProperty(AbstractCallSite.java:243) 
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:235) 
    at org.codehaus.groovy.grails.plugins.springsecurity.ReflectionUtils.getConfigProperty(ReflectionUtils.groovy:34) 
    at org.codehaus.groovy.grails.plugins.springsecurity.SpringSecurityUtils.isAjax(SpringSecurityUtils.java:296) 
    at org.codehaus.groovy.grails.plugins.springsecurity.AjaxAwareAuthenticationEntryPoint.determineUrlToUseForThisRequest(AjaxAwareAuthenticationEntryPoint.java:35) 
    at org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint.buildRedirectUrlToLoginPage(LoginUrlAuthenticationEntryPoint.java:151) 
    at org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint.commence(LoginUrlAuthenticationEntryPoint.java:141) 
    at org.springframework.security.web.access.ExceptionTranslationFilter.sendStartAuthentication(ExceptionTranslationFilter.java:178) 
    at org.springframework.security.web.access.ExceptionTranslationFilter.handleException(ExceptionTranslationFilter.java:157) 
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117) 
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378) 
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78) 
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378) 
    at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:112) 
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378) 
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) 
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378) 
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187) 
    at org.codehaus.groovy.grails.plugins.springsecurity.RequestHolderAuthenticationFilter.doFilter(RequestHolderAuthenticationFilter.java:40) 
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378) 
    at org.codehaus.groovy.grails.plugins.springsecurity.IpAddressFilter.doFilter(IpAddressFilter.java:75) 
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378) 
    at org.codehaus.groovy.grails.plugins.springsecurity.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:79) 
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378) 
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) 
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378) 
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:167) 
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) 
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) 
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) 
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
    at org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:69) 
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) 
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) 
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
    at org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:69) 
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) 
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) 
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) 
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) 
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) 
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) 
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) 
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) 
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) 
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) 
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) 
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) 
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) 
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) 
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) 
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) 
    at java.lang.Thread.run(Thread.java:662) 

"MEC": 
    at java.beans.PropertyDescriptor.getReadMethod(PropertyDescriptor.java:158) 
    - waiting to lock <0x00007fc248aed588> (a java.beans.PropertyDescriptor) 
    at java.beans.Introspector.processPropertyDescriptors(Introspector.java:683) 
    at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:615) 
    at java.beans.Introspector.getBeanInfo(Introspector.java:407) 
    at java.beans.Introspector.getBeanInfo(Introspector.java:164) 
    - locked <0x00007fc248a51a58> (a java.lang.Object) 
    at groovy.lang.MetaClassImpl$15.run(MetaClassImpl.java:2940) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at groovy.lang.MetaClassImpl.addProperties(MetaClassImpl.java:2938) 
    at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:2921) 
    - locked <0x00007fc42e910328> (a groovy.lang.ExpandoMetaClass) 
    at groovy.lang.ExpandoMetaClass.initialize(ExpandoMetaClass.java:463) 
    - locked <0x00007fc42e910328> (a groovy.lang.ExpandoMetaClass) 
    at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:166) 
    at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:182) 
    at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:210) 
    at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:751) 
    at groovy.lang.GroovyObjectSupport.(GroovyObjectSupport.java:32) 
    at groovy.lang.Closure.(Closure.java:100) 
    at Script1$_run_closure1.(Script1.groovy) 
    at Script1.run(Script1.groovy:1) 
    at Script1$run.call(Unknown Source) 
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40) 
    at Script1$run.call(Unknown Source) 


"IOC": 
    at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1277) 
    - waiting to lock <0x00007fc248a51a58> (a java.lang.Object) 
    at java.beans.Introspector.internalFindMethod(Introspector.java:1312) 
    at java.beans.Introspector.findMethod(Introspector.java:1383) 
    at java.beans.Introspector.findMethod(Introspector.java:1363) 
    at java.beans.PropertyDescriptor.getReadMethod(PropertyDescriptor.java:179) 
    - locked <0x00007fc248aed588> (a java.beans.PropertyDescriptor) 
    at groovy.lang.MetaClassImpl.applyPropertyDescriptors(MetaClassImpl.java:2215) 
    at groovy.lang.MetaClassImpl.setupProperties(MetaClassImpl.java:1995) 
    at groovy.lang.MetaClassImpl.addProperties(MetaClassImpl.java:2950) 
    at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:2921) 
    - locked <0x00007fc42e6276d0> (a groovy.lang.ExpandoMetaClass) 
    at groovy.lang.ExpandoMetaClass.initialize(ExpandoMetaClass.java:463) 
    - locked <0x00007fc42e6276d0> (a groovy.lang.ExpandoMetaClass) 
    at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:166) 
    at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:182) 
    at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:210) 
    at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:751) 
    at groovy.lang.GroovyObjectSupport.(GroovyObjectSupport.java:32) 
    at groovy.lang.Closure.(Closure.java:100) 
+0

「嗨,我的車肯定發生了故障,我該如何解決?」。換句話說:向我們展示您的代碼(儘可能少的代碼)... – thkala

回答

1

這是一個已知的問題與Groovy中使用的代碼,是我們無法控制的(由BeanInfo的收購鎖)。一般情況下,這會在應用程序啓動時承受沉重的負擔。你能給我們更多關於發生這種情況的信息嗎?