AnsweredAssumed Answered

NPE from introscope agent 10.1.0.15

Question asked by tonyindl on Aug 10, 2016
Latest reply on Aug 28, 2016 by tonyindl

Hi All

 

I have introscope agent 10.1.0.15 installed with Websphere Application Server 8.5.5.7.

JVM :

Java version = 1.7.0, Java Runtime Version = pxa6470_27sr3fp10-20150708_01 (SR3 FP10), Java Compiler = j9jit27, Java VM name = IBM J9 VM

 

Recently, I found some NullPointerException printed in native_stderr.log very frequently after global garbage collection got performed.

All the NullPointerException s have the common java stack like below, they all point to this line HighPerformanceIntelligenceStackElement.java:969.

 

 

 

 

 

8/04/16 10:50:30 AM BST [ERROR] [IntroscopeAgent.Agent] java.lang.NullPointerException

 

 

 

java.lang.NullPointerException

 

 

 

        at com.wily.introscope.agent.trace.intelligent.HighPerformanceIntelligenceStackElement$HighPerformanceIntelligenceStackElementVirtualStack.checkForBadEntryPoint(HighPerformanceIntelligenceStackElement.java:969)

 

 

 

        at com.wily.introscope.agent.trace.intelligent.HighPerformanceIntelligenceStackElement$HighPerformanceIntelligenceStackElementVirtualStack.shouldSetTracer(HighPerformanceIntelligenceStackElement.java:939)

 

 

 

        at com.wily.introscope.agent.trace.intelligent.HighPerformanceIntelligenceStackElement$HighPerformanceIntelligenceStackElementVirtualStack.getThreadLocalTracerInstance(HighPerformanceIntelligenceStackElement.java:1007)

 

 

 

        at com.wily.introscope.probebuilder.extension.instrument.intelligent.IntelligentInstrumentationService.getIntelligentInstrumentationTracerForIntelligentShim(IntelligentInstrumentationService.java:241)

 

 

 

        at com.wily.agent.main.IntelligentInstrumentationShim.ProbeBuilderEntryPoint_loadIntelligentInstrumentationTracer(IntelligentInstrumentationShim.java:20)

 

       

 

 

 

 

 

 

Looked into the same line and related code in java class, found declaration of fFirstStartTransactionElement shows it is a weak reference. So I believe the referent can be removed if GC happens.

 

 

 

/*  969 */       AMixedTransactionElement te = (AMixedTransactionElement)this.fFirstStartTransactionElement[1].get();

 


/*  395 */     WeakReference<AMixedTransactionElement>[] fFirstStartTransactionElement = new WeakReference[256];

 

Does anyone encountered the same issue and know how to prevent it ? Since this happens very frequently sometimes, it can fill up our log , even file system quickly, which we don't expect.

If my understanding on GC causing NullPointer is correct, as of the current code base of agent, this issue can occur as long as global GC happens.

Any fix to this ?

 

Thanks

 

 

 

 

 

 

 

     

Outcomes