tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <mgai...@hotmail.com>
Subject RE: BLOCKED threads
Date Sat, 03 May 2014 01:37:58 GMT
Managing Provider Tokens
Like the provider, the consumer must be responsible for managing the 
OAuth tokens. The necessary interface for managing the consumer tokens 
is OAuthConsumerTokenServices which are only accessible via factory method. Assuming that
the consumer can leverage an active HTTP session, the default HttpSessionBasedTokenServices
and HttpSessionBasedTokenServicesFactory should be adequate.

so it appears that Spring is looking for an implmentor for OAuthConsumerTokenServices either
HttpSessionBasedTokenServices OR
HttpSessionBasedTokenServicesFactory



http://spring-security-oauth.codehaus.org/oauth1.html#Managing_Provider_Tokens

Martin


> Date: Fri, 2 May 2014 15:22:01 -0700
> From: rallavagu@gmail.com
> To: users@tomcat.apache.org
> Subject: BLOCKED threads
> 
> All,
> 
> Tomcat Version: 7.0.47
> JVM Version: 1.7.0_51-b13
> 
> I see many blocked threads (90) in the thread dump. There are mainly two 
> monitors that block 69 threads.
> 
> One of them is below. It appears that it is simply trying to log.
> ----------------------------------------------------------------------------------
> "http-bio-28080-exec-396" daemon prio=10 tid=0x00007fcbc814f000 
> nid=0x5804 runnable [0x00007fcc2144d000]
>     java.lang.Thread.State: RUNNABLE
>          at java.lang.Throwable.getStackTraceElement(Native Method)
>          at java.lang.Throwable.getOurStackTrace(Throwable.java:827)
>          - locked <0x00000007e1886340> (a java.util.NoSuchElementException)
>          at java.lang.Throwable.printStackTrace(Throwable.java:656)
>          - locked <0x00000007e207a5a8> (a java.io.PrintWriter)
>          at java.lang.Throwable.printStackTrace(Throwable.java:721)
>          at 
> java.util.logging.SimpleFormatter.format(SimpleFormatter.java:157)
>          - locked <0x00000007008187e8> (a java.util.logging.SimpleFormatter)
>          at java.util.logging.StreamHandler.publish(StreamHandler.java:196)
>          - locked <0x00000007008187b0> (a java.util.logging.ConsoleHandler)
>          at 
> java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:105)
>          at java.util.logging.Logger.log(Logger.java:610)
>          at java.util.logging.Logger.doLog(Logger.java:631)
>          at java.util.logging.Logger.logp(Logger.java:831)
>          at org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:185)
>          at 
> org.apache.juli.logging.DirectJDKLog.error(DirectJDKLog.java:151)
>          at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
>          at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
>          at 
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
>          at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
>          at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
>          at 
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
>          at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>          at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
>          at 
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
>          at 
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
>          at 
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
>          - locked <0x00000007e0ba5dd8> (a 
> org.apache.tomcat.util.net.SocketWrapper)
>          at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>          at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>          at java.lang.Thread.run(Thread.java:744)
> 
> ----------------------------------------------------------------------------------
> 
> The second one has the lock on StandardClassLoader.
> 
> ----------------------------------------------------------------------------------
> 
> "http-bio-28080-exec-605" daemon prio=10 tid=0x00007fcbc82b8800 
> nid=0x77e6 runnable [0x00007fcb919d6000]
>     java.lang.Thread.State: RUNNABLE
>          at java.lang.ClassLoader.findLoadedClass0(Native Method)
>          at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:1093)
>          at java.lang.ClassLoader.loadClass(ClassLoader.java:407)
>          - locked <0x0000000700810fc8> (a 
> org.apache.catalina.loader.StandardClassLoader)
>          at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>          at 
> java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:2566)
>          at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1436)
>          at java.util.ResourceBundle.findBundle(ResourceBundle.java:1400)
>          at java.util.ResourceBundle.findBundle(ResourceBundle.java:1354)
>          at java.util.ResourceBundle.findBundle(ResourceBundle.java:1354)
>          at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1296)
>          at java.util.ResourceBundle.getBundle(ResourceBundle.java:721)
>          at oracle.net.ns.Message11.getMessage(Message11.java:62)
>          at oracle.net.ns.NetException.getMessage(NetException.java:222)
>          at oracle.net.ano.AnoComm.b(Unknown Source)
>          at oracle.net.ano.AnoComm.o(Unknown Source)
>          at oracle.net.ano.Ano.a(Unknown Source)
>          at oracle.net.ano.Ano.negotiation(Unknown Source)
>          at oracle.net.ns.NSProtocol.connect(NSProtocol.java:407)
>          at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:966)
>          at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:292)
>          at 
> oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:508)
>          at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:203)
>          at 
> oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
>          at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
>          at 
> org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
>          at 
> org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
>          at 
> org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1185)
>          at 
> org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
>          at 
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
>          at 
> org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:141)
>          at 
> org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:292)
>          at 
> org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:297)
>          at 
> org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:169)
>          at 
> org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67)
>          at 
> org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:160)
>          at 
> org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1395)
>          at 
> org.springframework.orm.hibernate4.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:387)
>          at 
> org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371)
>          at 
> org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:334)
>          at 
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:105)
>          at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>          at 
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
>          at 
> com.sun.proxy.$Proxy236.getOauth2AccessTokenByTokenId(Unknown Source)
> ----------------------------------------------------------------------------------
> 
> I need help explain these two locks. I am wondering how would class 
> loader would block those many threads. One clue is that App Dynamics 
> plugin is running for monitoring. However, I do not find it's class in 
> the stack trace. Looking for some clues here. Thanks in advance.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message