Skip to content

DeadLockDetectorPerformanceCounter does not send thread stack in TelemetryTrace #1263

@jzanon

Description

@jzanon

Expected behavior

DeadLockDetectorPerformanceCounter shall send some thread stack elements within message of TraceTelemetry.

Actual behavior

DeadLockDetectorPerformanceCounter only send ThreadInfo without thread stack trace in TraceTelemetry.

To Reproduce

  • DeadLockDetectorPerformanceCounter enabled (default behavior)
  • When a deadlock occurs or is created for test purpose

Sample Application

None

System information

Please provide the following information:

  • SDK Version: applicationinsights-core-2.5.1.jar
  • OS type and version: All OS
  • Using spring-boot? No
  • Additional relevant libraries (with version, if applicable): No

Logs

TelemetryTrace message from Application Insights:
Suspected deadlocked threads: XXX-Startup-tasks Id=171 is in WAITING on lock=java.util.concurrent.locks.ReentrantLock$NonfairSync@48ca6b79 is owned by EE-ManagedThreadFactory-default-Thread-2 Id=170 | EE-ManagedThreadFactory-default-Thread-2 Id=170 is in BLOCKED on lock=org.jboss.weld.Container@416c2a69 is owned by XXX-Startup-tasks Id=171 |

Fix idea

Use getThreadInfo(threadId, MAX_STACK_TRACE) here


to have at least MAX_STACK_TRACE elements.

Nice-to-Have: Make MAX_STACK_TRACE configurable using ApplicationInsights.xml

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