Skip to content

Thread of applicaton insights agent runs in an endless loop, missing telemetry data #2218

@dvag-holger-krusemark

Description

@dvag-holger-krusemark

Expected behavior

The application insights agent runs smoothly in the background without significant impact on the server or the application.

Actual behavior

In rare cases, one of the "BatchSpanProcessor_WorkerThread-1" thread runs in an endless loop and occupies an entire cpu core.

Stacktrace of this thread:

java.lang.Thread.yield(Native Method)
java.util.concurrent.locks.AbstractQueuedSynchronizer.transferAfterCancelledWait(AbstractQueuedSynchronizer.java:1752)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2119)
java.util.concurrent.ArrayBlockingQueue.poll(ArrayBlockingQueue.java:432)
io.opentelemetry.sdk.trace.export.BatchSpanProcessor$Worker.run(BatchSpanProcessor.java:230)
java.lang.Thread.run(Thread.java:829)

When the problem started, some telemetry data was missing in the Application Insight portal.

To Reproduce

The problem cannot be reproduced specifically. It occurred twice in a load and performance test at high load and once in a productive system under normal load.

Sample Application

System information

Please provide the following information:

  • SDK Version: 3.2.4
  • OS type and version: CentOS Linux 7 (runs in a VM from VMWare), Ubuntu 20.04.4 LTS (runs in a pod on a VM in azure)
  • Application Server type and version (if applicable): Tomcat, spring-boot
  • Using spring-boot? yes
  • Additional relevant libraries (with version, if applicable): -

Logs

No log files, but a heap dump of the Java VM (including the state of all Java objects) is available. For data protection reasons, however, I cannot publish this dump. However, I will be happy to answer any questions about it.

Screenshots

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions