Question

I want to use spring insight to trace my spring mvc webapp. When starting up the tc server 2.5 developer edition, my application comes up but I see following message in the console:

20.10.2011 09:24:24 com.springsource.insight.intercept.trace.SimpleFrameBuilder enter
FATAL: Frame stack exceeded MAX_FRAMES_PER_TRACE limit or has been aborted limit: 3000 frameCount: 3000 aborted: false
20.10.2011 09:24:24 com.springsource.insight.collection.errorhandling.AdviceErrorHandlingAspect ajc$around$com_springsource_insight_collection_errorhandling_AdviceErrorHandlingAspect$1$e76a6b03
FATAL: Error swallowed in advice adviceexecution(void com.springsource.insight.collection.AbstractOperationCollectionAspect.afterReturning(Object, JoinPoint.StaticPart))

--

java.lang.IllegalStateException: Imbalanced frame stack!  (exit() called too many times)
com.springsource.insight.intercept.trace.ThreadLocalFrameBuilder.exit(ThreadLocalFrameBuilder.java:61)
com.springsource.insight.collection.DefaultOperationCollector.exit(DefaultOperationCollector.java:111)
com.springsource.insight.collection.DefaultOperationCollector.exitNormal(DefaultOperationCollector.java:67)
com.springsource.insight.plugin.springtx.TransactionOperationCollectionAspect.ajc$afterReturning$com_springsource_insight_plugin_springtx_TransactionOperationCollectionAspect$2$e13fb3a0(TransactionOperationCollectionAspect.aj:61)
org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)
org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:393)
org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$afterReturning$org_springframework_transaction_aspectj_AbstractTransactionAspect$3$2a73e96c(AbstractTransactionAspect.aj:78)
...

I can call some controller actions after this message, but at some point the server just refuses to handle my requests and sends the same stack trace to the browser.

Did anyone have experience with this problem? Even deactivating insight plugins annotation, hibernate, jdbc or spring-tx does not sove the problem.

Was it helpful?

Solution

Jon Travis is almost exactly right, but the system property is

-Dinsight-max-frames

The default value is 3000 as seen in insight-intercept-1.5.1.SR2.jar: com.springsource.insight.intercept.trace.FrameBuilder

Changing the value to -Dinsight-max-frames=6000 fixed the issue for me.

OTHER TIPS

Some of this code has been improved in recent versions.

You may want to give Spring Insight 1.5.1 a try -- it comes with tc Server 2.6.1 and is available via springsource.org/insight

EDIT: The issue you are seeing is that a single Trace has attempted to accumulate too many frames (by default it stops counting at 1000). This is because your application may be doing a lot of SQL calls at startup, or a lot of other instrumented calls. Once this is detected, it will stop collecting frames and (currently) get a imbalanced frame stack. The error is benign for your case.

You can increase the # of Frames to max out at by setting a Java sysproperty (insight.max.frames).

In bin/setenv.sh, just add to JVM_OPTS:

-Dinsight.max.frames=2000
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top