-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR co.elastic.apm.agent.bci.IndyBootstrap - Advice threw an exception, this should never happen! #3530
Comments
Hi @dbalijapalli0264 , those two exceptions should also have stacktraces in addition to the exception messages. |
Apologies for not getting back earlier. But do see the below for the
|
stack trace right before the error: error.exception.stacktrace |
Are you using
|
Thank you @JonasKunz, looking into it now. Will get back with the outcome. |
Hi @dbalijapalli0264, there hasn't been any update since your last message, is this issue still happening in your environment ? |
Closing this, if it's still an issue, comment or reopen it as needed |
Hello, Sorry for lack of response, we had to roll back the changes as this exception was overloading our production error logs. We are back testing it now. and i do see that the exception is still happening. Here are the exceptions, these both exceptions happen together when they happen. co.elastic.apm.agent.bci.IndyBootstrapmessage:2024-05-09 18:20:20,202 [qtp2056288620-1138] ERROR co.elastic.apm.agent.bci.IndyBootstrap - Advice threw an exception, this should never happen! java.lang.ArrayIndexOutOfBoundsExceptionjava.lang.ArrayIndexOutOfBoundsException: Index 34 out of bounds for length 34 at java.lang.AbstractStringBuilder.charAt(AbstractStringBuilder.java:353) ~[?:?] at java.lang.StringBuilder.charAt(StringBuilder.java:91) ~[?:?] at co.elastic.apm.agent.metrics.Labels$AbstractBase.hash(Labels.java:201) ~[elastic-apm-agent-1.47.0.jar:1.47.0] at co.elastic.apm.agent.metrics.Labels$AbstractBase.hashCode(Labels.java:135) ~[elastic-apm-agent-1.47.0.jar:1.47.0] at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936) ~[?:?] at co.elastic.apm.agent.metrics.MetricRegistry.getOrCreateMetricSet(MetricRegistry.java:233) ~[elastic-apm-agent-1.47.0.jar:1.47.0] at co.elastic.apm.agent.metrics.MetricRegistry.updateTimer(MetricRegistry.java:218) ~[elastic-apm-agent-1.47.0.jar:1.47.0] at co.elastic.apm.agent.impl.transaction.Transaction.trackMetrics(Transaction.java:525) ~[elastic-apm-agent-1.47.0.jar:1.47.0] at co.elastic.apm.agent.impl.transaction.Transaction.afterEnd(Transaction.java:284) ~[elastic-apm-agent-1.47.0.jar:1.47.0] at co.elastic.apm.agent.impl.transaction.AbstractSpan.end(AbstractSpan.java:578) ~[elastic-apm-agent-1.47.0.jar:1.47.0] at co.elastic.apm.agent.impl.transaction.AbstractSpan.end(AbstractSpan.java:548) ~[elastic-apm-agent-1.47.0.jar:1.47.0] at co.elastic.apm.agent.servlet.ServletTransactionHelper.onAfter(ServletTransactionHelper.java:248) ~[elastic-apm-agent-1.47.0.jar:1.47.0] at co.elastic.apm.agent.servlet.ServletApiAdvice.onExitServlet(ServletApiAdvice.java:253) ~[elastic-apm-agent-1.47.0.jar:1.47.0] at co.elastic.apm.agent.servlet.JavaxServletApiAdvice.onExitServletService(JavaxServletApiAdvice.java:45) ~[elastic-apm-agent-1.47.0.jar:1.47.0] |
Could we reopen this issue please? SylvainJuge or jackshirazi |
Hi @dbalijapalli0264 , as Jonas asked previously here do you know if the transaction name is modified using |
@dbalijapalli0264 to be a bit more clear here, we need more information about your context in order to make any progress here, otherwise there is no point in keeping this open if we don't have any actionable insights on the things we might need to fix here. |
Hello, and apologies, that it took me a while before i got back the information, here is the information you requested. @SylvainJuge or @jackshirazi Below is the snippet of our code. The backend to frontend correlation works fine(attached an image, please see), but, our logs are over loaded with the ArrayIndexOutOfBounds and co.elastic.apm.agent.bci.IndyBootstrap errors, which is not acceptable. (PS: Please note in the code below, we don't set the transaction name for the deferred calls. )
From the attached screenshot, as you see, we are just trying to set the template name to the transaction. without the above code to set transaction name, the template name is not being set. If this is not the proper way to do it, could you please let me know how to do it so that we have a proper correlation from backend to frontend. |
Unfortunately that is the only possible explanation for the error you are seeing I can come up with right now. Also we have never seen this error occur before. Could you remove all calls to |
Thanks you for the response @JonasKunz, Checking with our team internally, will get back to you. |
We are trying to remove the Transaction.setName after running a set of tests, please keep this ticket active for a bit longer. |
Was there any closure on this issue? I've just come across the same exception. My application is a grails application. We have no APM API calls in our application, buy I believe the apm agent is 'grails aware' in that it identifies transactions with grails controller entry points, so perhaps it is internally setting the transaction name as mentioned above? This has started to happen as I was increasing the load today. |
please open a discussion item at our forum |
Describe the bug
Hello Elastic team,
Thank you for such an amazing product. I am opening this bug request to see if we can get some help from you on the error we are getting, while implementing elastic-apm-agent-1.45.0.jar or even the latest version elastic-apm-agent-1.47.0.jar. That's available on : https://mvnrepository.com/artifact/co.elastic.apm/elastic-apm-agent.
Our production log files are loaded with these 2 errors when we use the elastic-apm-agent-xxx.jar:
2024-02-15 20:12:34,254 [qtp292545106-1545] ERROR co.elastic.apm.agent.bci.IndyBootstrap - Advice threw an exception, this should never happen!
and
java.lang.ArrayIndexOutOfBoundsException: null
Steps to reproduce
Download teh api package from https://mvnrepository.com/artifact/co.elastic.apm/apm-agent-api/1.45.0 (or even 1.47.0)
Add api jar dependency
import co.elastic.apm.api.ElasticApm;
import co.elastic.apm.api.Transaction;
Transaction transaction = ElasticApm.currentTransaction();
From transaction object we extract following attributes and store with “apmTransaction” key
traceId = transaction.traceId
spanId=transaction.ensureParentId()
sampled=transaction.sampled
Refer: https://www.elastic.co/guide/en/apm/agent/java/current/public-api.html
Expected behavior
Should not spam the logs with these errors:
ERROR co.elastic.apm.agent.bci.IndyBootstrap - Advice threw an exception, this should never happen!
AND
java.lang.ArrayIndexOutOfBoundsException: null
Debug logs
Click to expand
The text was updated successfully, but these errors were encountered: