For no apparent reason we somtimes experience a spinning thread in our GF.
We run Java 1.7_02 on Windows Server 2008.
The GF has been set up with two CPU and 2G RAM
First we had a lot of trouble when enabling compression; The Thread was
spinning on some native GZip.Defalte-method. When disabling compression the
server seemd to work fine for about a week. After a restart last night, the
server ran well until sometime this morning when one thread startet spinning.
It seems that some error has occured, and there is a loop somewhere...
The thread-statsistics from the server looks like this:
Thread Execution Information:
-----------------------
Thread "common--bg5tnm--http-thread-pool-80(15)" thread-id: 74 thread-state:
RUNNABLE
at: java.lang.Throwable.fillInStackTrace(Native Method)
at: java.lang.Throwable.fillInStackTrace(Throwable.java:782)
at: java.lang.Throwable.(Throwable.java:250)
at: java.lang.Exception.(Exception.java:54)
at: java.lang.InterruptedException.(InterruptedException.java:57)
at:
java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1325)
at:
java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.tryLock(ReentrantReadWriteLock.java:873)
at:
com.sun.corba.ee.impl.oa.poa.POAImpl.acquireLock(POAImpl.java:390)
at: com.sun.corba.ee.impl.oa.poa.POAImpl.readLock(POAImpl.java:422)
at: com.sun.corba.ee.impl.oa.poa.POAImpl.find_POA(POAImpl.java:995)
at:
com.sun.corba.ee.impl.oa.poa.POAFactory.find(POAFactory.java:224)
at:
com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.findObjectAdapter(CorbaServerRequestDispatcherImpl.java:361)
at:
com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:192)
at:
com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1624)
at:
com.sun.corba.ee.impl.protocol.SharedCDRClientRequestDispatcherImpl.marshalingComplete(SharedCDRClientRequestDispatcherImpl.java:126)
at:
com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:273)
at:
com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:200)
at:
com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
at:
com.sun.corba.ee.impl.presentation.rmi.codegen.CodegenStubBase.invoke(CodegenStubBase.java:227)
at:
no.edb.customers.telenormobil.ejb.search._SearchHome_DynamicStub.create(no/edb/customers/telenormobil/ejb/search/_SearchHome_DynamicStub.java)
at:
org.apache.jsp.customers.dynamic.telenormobil.std.invoice_jsp._jspService(invoice_jsp.java:1328)
at:
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
at: javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at:
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
at:
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
at:
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
at: javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at:
org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
at:
org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:787)
at:
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:649)
at:
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:483)
at:
org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:454)
at:
org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:350)
at:
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:300)
at: com.edbteamco.common.servlet.Efaktura.doGet(Efaktura.java:29)
at: javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
at: javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at:
org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
at:
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at:
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at:
com.edbteamco.common.filter.AuthFilter.doFilter(AuthFilter.java:182)
at:
com.edb.security.filter.AuthenticatedUser.run(AuthenticatedUser.java:44)
at: java.security.AccessController.doPrivileged(Native Method)
at: javax.security.auth.Subject.doAsPrivileged(Subject.java:536)
at:
com.edbteamco.common.filter.AuthFilter.doFilter(AuthFilter.java:159)
at:
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at:
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at:
com.edbteamco.common.filter.PathSetter.doFilter(PathSetter.java:95)
at:
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at:
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at:
com.edbteamco.common.filter.Redirecter.doFilter(Redirecter.java:106)
at:
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at:
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at:
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at:
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at:
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at:
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at: com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
at:
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
at:
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
at:
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at:
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at:
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:327)
at:
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at:
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
at:
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
at:
com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
at:
com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
at:
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at:
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at:
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at:
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at:
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at:
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at:
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at: com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at:
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at:
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at: java.lang.Thread.run(Thread.java:722)
Thread Synchronization Statistics:
-----------------------
Number of times this thread was blocked (to enter/reenter a Monitor): 5 472
Number of times this thread waited for a notification (i.e. it was in WAITING
or TIMED_WAITING state): 4 941
Total CPU time for this thread: 2 792 seconds 421 875 000 nanoseconds.
User-level CPU time for this thread: 2 792 seconds 421 875 000 nanoseconds.
Object Monitors currently held or requested by this thread: []
Ownable Synchronizers (e.g. ReentrantLock and ReentrantReadWriteLock) held by
this thread: []
--------------------------------------------------------------------------------
For each subsequent call to the same function, the thread looks the same
except for the CPU-time whcih has increased with the time passed.
Thread Synchronization Statistics:
-----------------------
Number of times this thread was blocked (to enter/reenter a Monitor): 5 472
Number of times this thread waited for a notification (i.e. it was in WAITING
or TIMED_WAITING state): 4 941
Total CPU time for this thread: 4 448 seconds 234 375 000 nanoseconds.
User-level CPU time for this thread: 4 448 seconds 234 375 000 nanoseconds.
Object Monitors currently held or requested by this thread: []
Ownable Synchronizers (e.g. ReentrantLock and ReentrantReadWriteLock) held by
this thread: []
--------------------------------------------------------------------------------
This thread uses 100% of one CPU... Because I run on virual Windows-server,
the server itself sees this as an even load on two CPU's.
What is the cause of this behaviour ? And how can ve avoid it. The server
serves request fine on other threads even if this thread is spinning, but
performance is of cours worse... And if I get one more thread like this, I
have to restart the server. Not a very desirable task...
--
[Message sent by forum member 'frohal']
View Post: http://forums.java.net/node/883878