NPE using APM Agent 1.33.0

We are getting NPE's with the Elastic APM Agent 1.33.0.

APM Agent language and version:

elastic-apm-agent-1.33.0.jar: OK
INFO: Downloaded: elastic-apm-agent-1.33.0.jar
INFO: Mount /init-seed found. APM copied to: /init-seed/elastic-apm-agent.jar

Provide logs and/or server output (if relevant):

java.lang.NullPointerException
        at co.elastic.apm.agent.impl.transaction.Span.afterEnd(Span.java:294)
        at co.elastic.apm.agent.impl.transaction.AbstractSpan.end(AbstractSpan.java:563)
        at co.elastic.apm.agent.impl.transaction.AbstractSpan.end(AbstractSpan.java:542)
        at co.elastic.apm.agent.jdbc.StatementInstrumentation$ExecuteWithQueryInstrumentation$AdviceClass.onAfterExecute(StatementInstrumentation.java:113)
        at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java)
        at nl.customcode.ExecuteProvider.execute

Thanks for reporting that @Nick_Stolwijk and welcome to our forum.

Can you tell us at which frequency does this happens ? is that happening once, randomly or on every call the the database ?

I am currently investigating why this might happen, I'll keep you updated about my findings.

We found a potential cause of this issue and opened #2755 to fix it.

As it seems to be quite rare and tricky to reproduce, would you mind testing this snapshot and tell us if the issue is fixed or not in your application ? If that's the case, then it means the fix could be shipped in the next agent release.

I saw it once, but in multiple K8S pods. After a restart it was gone again. I tried the snapshot and it works as expected. I don't think I can be any help in reproducing it unfortunately.

Thanks for testing the snapshot, it was definitely a rare bug that might be quite hard to reproduce. We have merged the PR in the mean time, so it will be included in the next release and should already be in the daily snapshot too.

Don't hesitate to ping us if you see this happening again either with the snapshot or the next release.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.