AnsweredAssumed Answered

NPE from introscope agent

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

Hi All


I have introscope agent installed with Websphere Application Server


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






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








        at com.wily.introscope.agent.trace.intelligent.HighPerformanceIntelligenceStackElement$HighPerformanceIntelligenceStackElementVirtualStack.checkForBadEntryPoint(




        at com.wily.introscope.agent.trace.intelligent.HighPerformanceIntelligenceStackElement$HighPerformanceIntelligenceStackElementVirtualStack.shouldSetTracer(




        at com.wily.introscope.agent.trace.intelligent.HighPerformanceIntelligenceStackElement$HighPerformanceIntelligenceStackElementVirtualStack.getThreadLocalTracerInstance(




        at com.wily.introscope.probebuilder.extension.instrument.intelligent.IntelligentInstrumentationService.getIntelligentInstrumentationTracerForIntelligentShim(




        at com.wily.agent.main.IntelligentInstrumentationShim.ProbeBuilderEntryPoint_loadIntelligentInstrumentationTracer(









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 ?